Source file: | voting.{c, cpp, java} |
Input file: | voting.in |
Your job is to take this recorded list of votes and determine the outcome.
Rules:
There must be a quorum. If at least half of the members were
absent, respond "need quorum". Otherwise votes are
counted. If there are more yes than no votes, respond
"yes". If there are more no than yes votes, respond
"no". If there are the same number of yes and no votes,
respond "tie".
Input: The input contains of a series of votes, one per line, followed by a single line with the # character. Each vote consists entirely of the uppercase letters discussed above. Each vote will contain at least two letters and no more than 70 letters.
Output: For each vote, the output is one line with the correct choice "need quorum", "yes", "no" or "tie".
Example Input: | Example Output: |
YNNAPYYNY YAYAYAYA PYPPNNYA YNNAA NYAAA # |
yes need quorum tie no need quorum |