- Judges's Final Problem C语言怎么做
For any ACM/ICPC participant, it is always discouraging to discover that the real problems they face in the programming world are seldom as interesting as the tasks they face in the algorithm-related contests. While the efficiency of your algorithm is certainly vital to the overall system, still it is seldom valued so much as other factors such as readability, and the ability of coding accurately often takes precedence in many projects. Still, we judges believe that a balance between these two can be achieved - a good programmer should be able to come up with code that is fast, reliable and readable in a reasonable amount of time - and that is why you, the contestant, is asked to solve the problem of building a ranking system for us.
You're probably familiar with the following paragraph taken from Rules of ACM/ICPC:
A problem is solved when it is accepted by the judges. Teams are ranked according to the most problems solved. 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.
During a contest, the following kinds of requests might be submitted by participants:
(Format: S [minute]:[Team No]:[Problem ID]:[Result])
If a team submits a problem which they have already solved, then this submission should be considered invalid and ignored by your system; otherwise, the submission is valid and saved for further processing - if the result is 1 (Correct), then this submission should be considered accepted by the system.
Query a team's place on the rank list.
(Format: R [Team No])
Sort the teams according to the contest rules mentioned above. A tie may occur between two teams who solved equal number of problems and same penalty.
Two teams who solved same number of problems and have same penalty should always have same rank; however, when querying the Kth team on the rank list, even if many teams share the same rank, only one team should be printed (please refer to the rule given below).
Query the Kth team on the rank list.
(Format: T [k])
If a tie occurs, return the team with the minimum last accepted submission time. Note that the submission time of two teams might be different (i.e., in seconds) even though it may appear otherwise in the input.
Initially every team has no submissions, and the contest will last no more than 5 hours.
There are multiple test cases in the input.
Each test case starts with two integers, N and M, (1 <= N <= 10000, 1 <= M <= 10), the number of teams participating in the competition, and the total number of problems in the contest. Teams are numbered from 0 to N - 1. Each of the following lines is either in one of the three formats listed above, or a single line "Contest Ends" followed by an empty line indicating the end of current test case. It is guaranteed that there are no more than 100000 requests in each test case.
Input ends with End-of-File.
For every submission request, if the submitted program is accepted, you need to output a line whose format is [Team No] [Problem ID]; for every query about team's place on the rank list, output the result in one single line; for every query about the team with the Kth highest score, if a team is found, output a line with one integer, the number of the team, or -1 if you are unable to find such a team.
Please print a blank line after each test case.
- 博客 大学四年自学走来，这些私藏的实用工具/学习网站我贡献出来了
- 博客 在中国程序员是青春饭吗？
- 博客 springboot+jwt实现token登陆权限认证
- 博客 技术大佬：我去，你写的 switch 语句也太老土了吧
- 博客 女程序员，为什么比男程序员少？？？
- 博客 总结了 150 余个神奇网站，你不来瞅瞅吗？
- 博客 副业收入是我做程序媛的3倍，工作外的B面人生是怎样的？
- 博客 MySQL数据库面试题（2020最新版）
- 博客 如果你是老板，你会不会踢了这样的员工？
- 博客 我入职阿里后，才知道原来简历这么写
- 博客 程序员写出这样的代码，能不挨骂吗？
- 博客 外包程序员的幸福生活
- 博客 优雅的替换if-else语句
- 博客 离职半年了，老东家又发 offer，回不回？
- 博客 2020阿里全球数学大赛：3万名高手、4道题、2天2夜未交卷
- 博客 为什么你不想学习？只想玩？人是如何一步一步废掉的
- 博客 男生更看重女生的身材脸蛋，还是思想？
- 博客 为什么程序员做外包会被瞧不起？
- 博客 当HR压你价，说你只值7K，你该怎么回答？
- 博客 面试：第十六章：Java中级开发
- 博客 早上躺尸，晚上干活：硅谷科技公司这么流行迟到？
- 博客 面试阿里p7，被按在地上摩擦，鬼知道我经历了什么？
- 博客 终于懂了TCP和UDP协议区别
- 博客 Python爬虫，高清美图我全都要（彼岸桌面壁纸）
- 博客 无代码时代来临，程序员如何保住饭碗？
- 博客 面试了一个 31 岁程序员，让我有所触动，30岁以上的程序员该何去何从？
- 博客 大三实习生，字节跳动面经分享，已拿Offer
- 博客 程序员垃圾简历长什么样？
- 博客 Java岗开发3年，公司临时抽查算法，离职后这几题我记一辈子
- 博客 大胆预测下未来5年的Web开发