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: Kick-Tipp
Description With the FIFA World Cup 2006 After the world cup, the one who scored highest wins the pot, or, if you decided not to play for money, unstinted admiration for being such an outstanding soccer expert. A few weeks ago you thought that sounded fun, so you are also running a pool for your friends. But now, the world cup is about to end. The finals are tomorrow, and still you do not know who scored how. You decide to write a program that will help you find out. Given a list of the participants, those peoples’ bets, and the outcomes of the games, calculate each participant’s total number of points as well as the number of dots he received and output the sorted list of scores. With your pool, you gain one point for correctly guessing which team wins, respectively whether the game ends in a draw. You receive two additional points for exactly guessing the correct result. Input The first line contains the number of scenarios. Each scenario starts with a line containing the number of participants Each round again consists of individual games, and thus starts with a line containing the number A description of a game is given by a line containing the result followed by exactly Output The output for every scenario begins with a line containing “ - Participants with more points rank higher.
- Among those with an equal number of points, participants with more dots rank higher.
- If there is still a tie, use the order of the input.
In each line, the number of points, the dots, and the name must be separated by single spaces. Terminate the output for the scenario with a blank line. Sample Input 2 2 2 Gerhard Delling Guenter Netzer 1 4 : 3 0 : 1 1 : 0 2 1 : 0 1 : 0 1 : 0 0 : 0 2 : 1 0 : 0 3 1 Johannes B. Kerner Urs Meier Juergen Klopp 1 2 : 1 2 : 1 2 : 1 2 : 1 Sample Output Scenario #1: 7 2 Guenter Netzer 3 0 Gerhard Delling Scenario #2: 3 1 Johannes B. Kerner 3 1 Urs Meier 3 1 Juergen Klopp Source TUD Programming Contest 2006, Darmstadt, Germany |

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

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

Any problem, Please Contact Administrator