| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 2 초 | 2048 MB | 111 | 43 | 29 | 30.851% |
The Ducks and the Sharks have had many adventures in the past year. Because the weather has been so nice lately, they want to organise a water polo tournament. After forming the teams, every team plays one match against every other team. Being caught up in the fun of playing the matches, they don't feel like figuring out who won, so they turn to you for help.
You receive a list of matches and the number of goals made by both teams in a match. For each match, the winner gets 3 points, the loser gets 0 points, and in case of a draw both teams get 1 point. It is your job to figure out which teams got the most points, and provide a top five of the best teams.
A-Z and a-z).Note that every team plays exactly once against every other team.
The names of the top five teams in the water polo competition, followed by their total obtained score. Each team name should be written on a separate line. Each team name and score should be separated by exactly one space. Note:
4 Splashers Sharks 4 2 Ducks Fins 5 2 Fins Splashers 3 5 Ducks Sharks 0 5 Splashers Ducks 8 1 Fins Sharks 1 1
Splashers 9 Sharks 4 Ducks 3 Fins 1
5 A B 5 3 C D 2 9 A E 0 0 C B 1 1 A C 2 5 B E 2 5 D A 1 6 C E 4 2 B D 0 2 E D 5 2
A 7 C 7 E 7 D 6 B 1