#P14613. [2019 KAIST RUN Fall] And the Winner Is... Ourselves!
[2019 KAIST RUN Fall] And the Winner Is... Ourselves!
题目描述
Let us remind you about how the total penalties are calculated for this contest:
- When you solve a problem at minutes, is added to your penalty, where is the number of incorrect verdicts (except compile errors) received on that problem.
- If you do not solve a problem before the contest ends, the incorrect verdicts on that problem are not counted as penalties.
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 -th line contains two integers, and , where is the amount of minutes required to solve the -th problem, and is the number of incorrect verdicts on the -th problem.
For each , and . Also, .
输出格式
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.
京公网安备 11011102002149号