시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
4 초 (추가 시간 없음) | 1024 MB | 958 | 830 | 747 | 87.986% |
Let us remind you about how the total penalties are calculated for this contest:
Here is a bad news for all of you: we, the problem setters, are planning to join the competition and solve our own problems!
We know our problems really well, so we can solve all the problems before the contest ends. Furthermore, we can precisely predict how long it takes to solve each problem, and how many incorrect verdicts (except compile errors) we get in each problem. Depending on the order of the problems we solve, our total penalty might differ. What is the minimum penalty if we solve all problems?
11 lines are given as the input. The $i$-th line contains two space-separated integers, $D_i$ and $V_i$, where $D_i$ is the amount of minutes required to solve the $i$-th problem, and $V_i$ is the number of incorrect verdicts on the $i$-th problem.
For each $i$, $1 \leq D_i$ and $0 \leq V_i \leq 1\ 000$. Also, $\sum_{i=1}^{11} D_i \leq 300$.
Output the minimum penalty if we solve all problems.
20 1 20 0 20 3 10 0 10 0 10 0 30 0 30 0 30 0 20 0 20 10
1360
The sample input does not necessarily reflect the actual difficulties of the problems.
The problem statement does not necessarily reflect the actual situation of the contest.
University > KAIST > 2019 KAIST 9th ICPC Mock Competition B번