|시간 제한||메모리 제한||제출||정답||맞힌 사람||정답 비율|
|1 초 (추가 시간 없음)||1024 MB||12||7||7||58.333%|
Impressed by the performance of the top teams at the recent BAPC preliminaries, you started to wonder whether teams were allowed to use one or multiple computers to implement their solutions.
Instead of unnecessarily bothering the organization with more questions, you will figure this out by yourself. Being a jury member, you already have estimates for the computer time required to solve each problem.
Using this information, and the time in the contest at which the top team solved each of their solved problems, compute the minimal number of computers used by the team.
The team may work on multiple problems before getting any one of them accepted. Furthermore, the contestants are great multitaskers and can work on a single problem using multiple computers at the same time, but each computer can only be used for one problem at a time.
The input consists of:
It is guaranteed that the team solved at least one problem.
Output the minimum number of computers used by the team.
11 50 8 10 6 300 5 6 3 18 5 12 117 23 63 6 -1 48 80 42 37 13 131
1 10 3
2 2 4 3 3
2 4 6 10 10