Problem #9


Wrapping a Paper Cut with a Stone


The Thaumalogical Society (sounds better than coven doesn't it) runs a game night once a week for its members. On game night, the first 20 members to sign in are allowed to play a special version of “scissors, paper, stone”. [“Scissors, paper, stone” is a traditional children's game where the players call out scissors, paper or stone. The possible outcomes are in the form of a round-robin, i. e. scissors cuts paper, paper wraps stone and stone dulls scissors, so there is no absolute correct guess that can be made in order to win. Ties are possible, of course.] This special version is played in pairs and each of the 20 members plays every other of the 20 members once. In other words, each member plays 19 games.

Write a program to simulate game night. During each game, the “play” (a guess of scissors, paper or stone) of each contestant to be simulated by a random number. When all games are completed, the members are sorted on number of wins into descending order and the results output. On output, members are identified by the order of sign in. (I. e. the first member to sign in is given the identifier 1, the second to sign in is given 2, etc.) Output for each member consists of the member number and the number of wins.