z-menadzer
Mr. Little Z has decided to find a job as a manager. After a few days of looking for a job, he has finally found a job at the famous company Zoogle. At his first day of work he got a serious assignment:
The head manager of the company loves to watch movies. However, he doesn't have enough free time. Mr. Little Z's assignment is to record movies for the head manager. The head manager has given Mr. Little Z a list of movies and for each movie: when it starts, when it ends, and how much money Mr. Little Z will get if he records the movie.
Mr. Little Z has only one recorder and he wants to record the movies so that he can earn as much money as possible.
3
1 5 2
2 6 3
6 8 2Output:
4Additional example:
Input:
4
1 3 2
4 6 2
2 5 8
4 5 3Output:
8Submit solution
Coming laterThe grading service will be connected in a later migration step. You can inspect the task and your previous results now.