next up previous
Next: The Output Up: Australian Voting Previous: Australian Voting

The Input

The first line of input is an integer tex2html_wrap_inline87 indicating the number of candidates. The next n lines consist of the names of the candidates in order. Names may be up to 80 characters in length and may contain any printable characters. Up to 1000 lines follow; each contains the contents of a ballot. That is, each contains the numbers from 1 to n in some order. The first number indicates the candidate of first choice; the second number indicates candidate of second choice, and so on.



ACM Programming Contest Account
Mon Jan 24 15:47:44 EST 2000