当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

3554:Another Contest

题目描述
The contest is beginning again! To make the contest more interesting, Competition Commission has developed a new rule: There are N problems initially, and for each problem, if one get an "Accepted", he can get some points, equal to the number of contestants that did not solve the problem. The score of each contestant was equal to the sum of points assigned to the problems solved by that contestant.
iSea participated in the contest, but he is confused by the complicated scoring rules, and now he is staring at the results, unable to determine his place in the final standings. Help iSea by writing a program that calculates his score and his ranking.
Before the contest, the contestants were assigned unique IDs from 1 to S inclusive, and iSea's ID was P. The final standings of the competition list the contestants in descending order of their scores. In case of a tie, among the tied contestants, those who have solved more tasks will be listed ahead of those who have solved fewer tasks. In case of a tie by this criterion as well, the contestants with equal results will be listed in ascending order of their IDs.
输入解释
There are several test cases in the input.

The first line of each case contains three integers N, S, P (0 < N, S <= 1000, 1 <= P <= S), their meaning are the same as the description.
Then N lines follows, each line contains S integers, whether 0 or 1, indicating the result of S contestants solving the N problems, 0 means this contestant haven’t solved this problem, 1 means solved.

The input terminates by end of file marker.
输出解释
For each test case, output two integers, indicating iSea’s scores and ranking.
输入样例
3 3 3
1 0 1
1 0 1
1 0 0
输出样例
2 2
来自杭电HDUOJ的附加信息
Author iSea@WHU
Recommend zhouzeyong

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-3554

最后修改于 2020-10-25T23:04:41+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 131072/65536K(Java/Others)