Canadian Computing Competition: 2001 Stage 2, Day 2, Problem 3
The nation of Cicoci elects its president using a winner-take-all electoral vote system. Each of the
As election returns are tabulated it becomes possible to determine the outcome of the vote in a number of states. But many remain too close to call. You have been retained by Cicoci Press (CP) to compute the possible winners and losers.
Input Specification
The input may contain several test cases. The first line of each test case contains two positive integers: the number of states, followed by the number of candidates. Neither exceeds
Output Specification
For each candidate numbered X
, in ascending order, print one of the following messages, as appropriate.
Candidate X will become president.
Candidate X may become president.
Candidate X will not become president.
Output a blank line after each test case. The input ends with a line indicating
Sample Input
4 5
3 1 2 3
3 1 3 4
1 2
1 2
0 0
Sample Output
Candidate 1 will not become president.
Candidate 2 may become president.
Candidate 3 will not become president.
Candidate 4 will not become president.
Candidate 5 will not become president.
Comments