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

11213번 - Black Friday 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 256 MB42830728271.939%

문제

Black Friday is the Friday following Thanksgiving Day in the United States (the fourth Thursday of November). Since the early 2000s, it has been regarded as the beginning of the Christmas shopping season in the US, and most major retailers open very early and offer promotional sales. (Source: Wikipedia)

You work in the IT support division of an electronics store. This year, in an attempt to prevent overcrowding, the management has decided to limit the number of people entering the store. They divide the people at the entrance into groups of size n and process them as follows: all n participants roll a die, and report the outcomes a1, a2, . . . , an. To prevent cheating, instead of selecting the one with the highest outcome, the rule is to select the participant with the highest unique outcome. Everybody not selected has to move to the back of the queue. If there is no winner, the experiment is repeated.

For example, if there are three players and the outcomes are 6, 6 and 5, then the third player wins, because the first and second player lose even though their outcomes are higher, since they both have the same outcome. If instead the third player also rolls 6, then nobody wins. They asked you to write a program for selecting the winner.

입력

The first line of the input contains one integer n, 1 ≤ n ≤ 100, the group size. The second line contains n integers a1, a2, . . . , an (1 ≤ ai ≤ 6 for all 1 ≤ i ≤ n): the outcome of each participant’s die roll.

출력

Output the index of the participant that has the highest unique outcome, or “none” (without the quotes) if nobody has a unique outcome.

제한

예제 입력 1

8
1 1 1 5 3 4 6 6

예제 출력 1

4

예제 입력 2

3
4 4 4

예제 출력 2

none

힌트

출처

Contest > KTH Challenge > KTH Challenge 2015 B번

  • 문제를 만든 사람: Jan Elffers, Ulf Lundström
(追記) (追記ここまで)

출처

대학교 대회

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

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