Logo
(追記) (追記ここまで)

6940번 - Election Night 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB32266.667%

문제

The nation of Cicoci elects its president using a winner-take-all electoral vote system. Each of the $N$ states has one electoral vote, and that vote is awarded to the candidate receiving the highest popular vote in that state. The candidate with the most electoral votes is elected president. If there is a tie, no president will be elected, a constitutional crisis will ensue and the country will be plunged into civil war.

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.

입력

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 100ドル$. For each state there is a line stating the number of candidates who might yet win the state, and a list of the identifiers of the candidates who might yet win the state. Candidates are identified by consecutive integers starting from 1ドル$.

출력

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 0ドル$ states and 0ドル$ candidates.

제한

예제 입력 1

4 5
3 1 2 3
3 1 3 4
1 2
1 2
0 0

예제 출력 1

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.

힌트

출처

Olympiad > Canadian Computing Competition & Olympiad > 2001 > CCO 2001 6번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /