PTA Review of Programming Contest Rules

本文分析了ACM/ICPC编程竞赛的计分规则,并提出一个模拟策略来寻找最佳解题顺序,以获得尽可能高的排名。通过考虑解题时间和调试时间,利用暴力搜索方法在不超过9题的规模下寻找最佳解题序列,以最小化总时间成本。
摘要由CSDN通过智能技术生成

题目重现

The ACM ICPC’s rule of scoring is as the following:

A problem is solved when it is accepted by the judges. Teams are ranked according to the most problems solved. For the purposes of awards, or in determining qualifier(s) for the World Finals, teams who solve the same number of problems are ranked by least total time. The total time is the sum of the time consumed for each problem solved. The time consumed for a solved problem is the time elapsed from the beginning of the contest to the submittal of the accepted run plus 20 penalty minutes for every rejected run for that problem regardless of submittal time. There is no time consumed for a problem that is not solved.

For example, if one has the following contest record:

  • At the 100th minute submitted problem A, rejected;
  • At the 140th minute submitted problem B, rejected;
  • At the 150th minute submitted problem B, accepted;
  • At the 160th minute submitted problem C, accepted.

Then his total time = (150+20) + 160 = 330. Notice that it took him only 10 minutes to finish problem C. Assume that he spent 40 minutes on reading all the problems through, then if he could do problem C first and problem A last, his contest record might look like:

  • At the 50th minute submitted problem C, accepted;
  • At the 90th minute submitted problem B, rejected;
  • At the 100th minute submitted problem B, accepted;
  • At the 160th minute submitted problem A, rejected.

Then his total time would be 50 + (100+20) = 170. Hence the order of solving the problems will affect one’s final rank.

Now suppose that you are in a one-person team. It will take you t0 ​​ minutes to read all the problems through. Judging by your experience, you may estimate the minutes ti ​​ that you will take to solve problem i . And more, the earlier you get one problem done, the more unlikely that you will make mistakes on programming. Assume that if a solution is first time submitted in the first hour (60 minutes inclusive), it will get accepted at once; if it is first time submitted in the second hour, it will be rejected once; if it is first time submitted in the third hour, it will be rejected twice; etc. You may also estimate the minutes di for debugging problem i every time it is rejected. For the sake of simplic

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值