문제
Bessie the cow has
What is the maximum number of jobs you can complete? Time starts at
입력
The first line contains
The first line contains
Each of the next
It is guaranteed that the sum of
출력
For each test case, the maximum number of jobs you can complete, on a new line.
부분문제
번호 | 점수 | 조건 |
---|---|---|
#1 | 10점 | Within the same test case, all |
#2 | 20점 | |
#3 | 30점 | |
#4 | 40점 | No additional constraints. |
예제1
3
2
1 4
1 2
2
2 3
1 2
3
1 4
2 3
1 2
1
2
2
For the first test case, you can only complete one of the jobs. After completing one job, it will then be time
For the second test case, you can start the second job at time