AT_awc0001_b 試験の合格者
Description
Takahashi is a school teacher who is tallying the results of the final exam.
In this exam, only students who scored at least $ L $ points and at most $ R $ points will pass. Students who scored too low will not pass, and students who scored too high are also suspected of cheating, so they will not pass either.
$ N $ students took this exam, and the $ i $ -th student scored $ P_i $ points.
Takahashi wants to know the student ID of the student with the highest score among those who passed.
Find the student ID of the student with the maximum score among the students who passed. If there are multiple such students, output the student ID of the one with the smallest student ID. However, if no students passed, output `-1`.
Input Format
> $ N $ $ L $ $ R $ $ P_1 $ $ P_2 $ $ \ldots $ $ P_N $
- The first line contains $ N $ representing the number of students, $ L $ representing the lower bound of passing scores, and $ R $ representing the upper bound, separated by spaces.
- The second line contains $ P_1, P_2, \ldots, P_N $ representing each student's score, separated by spaces.
Output Format
Output the student ID of the student with the maximum score among the students who passed, on a single line. If no such student exists, output `-1`.
Explanation/Hint
### Constraints
- $ 1 \leq N \leq 2 \times 10^5 $
- $ 0 \leq L \leq R \leq 100 $
- $ 0 \leq P_i \leq 100 $ $ (1 \leq i \leq N) $
- All inputs are integers