Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|

Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |

Language: Go for Lab Cup!
Description The Lab Cup Table Tennis Competition is going to take place soon among laboratories in PKU. Students from the AI Lab are all extreme enthusiasts in table tennis and hold strong will to represent the lab in the competition. Limited by the quota, however, only one of them can be selected to play in the competition. To make the selection fair, they agreed on a single round robin tournament, in which every pair of students played a match decided by best of 5 games. The one winning the most matches would become representative of the lab. Now Ava, head of the lab, has in hand a form containing the scores of all matches. Who should she decide on for the competition? Input The input contains exactly one test case. The test case starts with a line containing ith student in his/her match with the jth student. Exactly one of a and _{ij}a (_{ji}i ≠ j) is 3 and the other one will be less than 3. All diagonal elements of the matrix are 0’s.Output Output the number of the student who won the most matches. In the case of a tie, choose the one numbered the smallest. Sample Input 4 0 0 3 2 3 0 3 1 2 2 0 2 3 3 3 0 Sample Output 4 Source PKU Local 2007 (POJ Monthly--2007.04.28), ideas from ava, text and test cases by frkstyc |

[Submit] [Go Back] [Status] [Discuss]

All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di

Any problem, Please Contact Administrator