Chess tournament

Write a program that given the results of the matches of a chess
tournament, prints the names of the players in alphabetical order and
next to each name, the number of wins, draws and defeats.

Input

Input consists of the number n of players followed by n strings with the
player names. Then, it follows zero or more match results. Each match
result is represented by three strings. First two are the match player
names. The third string can be ’1-0’ (first player is the winner), ’0-1’
(second player is the winner) or ’1/2-1/2’ (for a draw). The number of
players n is always greater than 1.

Output

In alphabetical order and for each player, a line with the name and
numbers of wins, draws an defeats as it is shown in the examples.

Problem information

Author: Proal

Generation: 2026-01-25T13:39:05.001Z

© Jutge.org, 2006–2026.
https://jutge.org
