Black Friday

Xem dạng PDF

Gửi bài giải

Điểm: 1,00 (OI)
Giới hạn thời gian: 1.0s
Giới hạn bộ nhớ: 256M
Input: stdin
Output: stdout

Nguồn bài:
Hà Minh Ngọc
Dạng bài
Ngôn ngữ cho phép
C, C++, Java, Kotlin, Pascal, PyPy, Python, Scratch

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.

This year, in an attempt to prevent overcrowding, the management has decided to limit the number of people entering the store. The rule is to select the participant with the highest unique outcome

For example, if there are three players and the outcomes are ~6~, ~6~ and ~5~, then the third player wins. 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.

Input

  • The first line of the input contains one integer ~n~ - the group size ~(1≤n≤100)~.
  • The second line contains ~n~ integers ~a_1,a_2,…,a_n~ - the outcome of each participant's die roll ~(1≤a_i≤6~, ~\forall i \in \{1, 2, \dots, n\})~ .

Output

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

Example Input 1

8
1 1 1 5 3 4 6 6

Example Output 1

4

Example Input 2

3
4 4 4

Example Output 2

none

Bình luận

Hãy đọc nội quy trước khi bình luận.


Không có bình luận tại thời điểm này.