시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
2 초 256 MB 683 371 350 56.911%

문제

9694번 한신이는 당내 최고의원을 선출하기 위한 사전 인기 투표의 결과를 받게 되었다.  하지만 공식 선거를 통해서 당내 최고의원이 되기위해선 과반수의 표를 받아야 하기 때문에 현재의 인기 투표 결과를 보고 본 최고의원 선거를 준비하려 한다. 한신이를 도와 누가 최고 득표자인지, 받은 투표수가 과반수득표인지 아닌지를 빠르게 판단할수 있도록 도와주자.

입력

맨 위 첫 번째 줄에 T(1 <T< 500)는 테스트케이스 수를 의미한다. 각 테스트 케이스의 첫 번째 줄에는 n이 주어지고 n은 후보자 수를 의미하며, 다음 n줄에는 순서대로 각 후보자가 받은 득표 수를 입력받는다.

후보자는 최소 2명에서 10명보다 많지 않으며, 득표 수는 50000표를 넘지 않으며, 후보자들은 분명 자기 자신을 찍기 때문에 최소 1표 이상은 받게된다.

출력

각 테스트 케이스는 첫 번째 줄부터 순서대로 출력된다. 최다 득표자가 과반수 득표를 했을경우에는 "majority winner R", 절반 이하의 득표를 하였을 경우엔 "minority winner R"가 되며, 최다 득표자가 없을때(최다 득표자가 1명 초과일 경우)  "no winner"를 출력한다. 이때 R은 최다 득표자의 후보자 번호를 의미하며, 후보자의 번호는 각 케이스에서 1, 2, . . . , n 으로 부여된다.

예제 입력 1

4
3
10
21
10
3
20
10
10
3
10
10
10
4
15
15
15
45

예제 출력 1

majority winner 2
minority winner 1
no winner
minority winner 4
W3sicHJvYmxlbV9pZCI6IjExNjM3IiwicHJvYmxlbV9sYW5nIjoiMCIsInRpdGxlIjoiXHVjNzc4XHVhZTMwIFx1ZDIyY1x1ZDQ1YyIsImRlc2NyaXB0aW9uIjoiPHA+PGEgaHJlZj1cIlwvcHJvYmxlbVwvOTY5NFwiPjk2OTRcdWJjODg8XC9hPiZuYnNwO1x1ZDU1Y1x1YzJlMFx1Yzc3NFx1YjI5NCBcdWIyZjlcdWIwYjQgXHVjZDVjXHVhY2UwXHVjNzU4XHV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cyBtb3JlIHRoYW4gaGFsZiBvZiB0aGUgdm90ZXMsIHByaW50IHRoZSBwaHJhc2UgbWFqb3JpdHkgd2lubmVyIGZvbGxvd2VkIGJ5IHRoZSBjYW5kaWRhdGUgbnVtYmVyIG9mIHRoZSB3aW5uZXIuIElmIHRoZSB3aW5uZXIgZG9lcyBub3QgcmVjZWl2ZSBtb3JlIHRoYW4gaGFsZiBvZiB0aGUgdm90ZXMsIHByaW50IHRoZSBwaHJhc2UgbWlub3JpdHkgd2lubmVyIGZvbGxvd2VkIGJ5IHRoZSBjYW5kaWRhdGUgbnVtYmVyIG9mIHRoZSB3aW5uZXIuIElmIGEgd2lubmVyIGNhbm5vdCBiZSBkZXRlcm1pbmVkIGJlY2F1c2Ugbm8gc2luZ2xlIGNhbmRpZGF0ZSBoYXMgbW9yZSB2b3RlIHRoYW4gb3RoZXJzLCBwcmludCB0aGUgcGhyYXNlIG5vIHdpbm5lci4gVGhlIGNhbmRpZGF0ZSBudW1iZXJzIGluIGVhY2ggY2FzZSBhcmUgMSwgMiwgLiAuIC4gLCBuLjxcL3A+XHJcbiIsImhpbnQiOiIiLCJvcmlnaW5hbCI6IjEiLCJwcm9ibGVtX2xhbmdfY29kZSI6Ilx1YzYwMVx1YzViNCJ9XQ==

출처

ACM-ICPC > Regionals > North America > Rocky Mountain Regional > 2015 Rocky Mountain Regional Contest A번

  • 문제의 오타를 찾은 사람: corea
  • 잘못된 번역을 찾은 사람: psychobabo
  • 어색한 표현을 찾은 사람: solarmagic
  • 문제를 번역한 사람: vumbumy