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

문제

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