Problem
Input format
The first line contains `n`, the number of elements. The second line contains `n` integers separated by spaces. - `1 <= n <= 1000` - values are integers between `-1000000` and `1000000`
Output format
The program prints to standard output the second-largest distinct value, or, if it does not exist, the message `NU EXISTA`, followed by a newline.
Example
5 3 1 4 1 5
4
Stuck?
Use the Get Hint button in the action bar to reveal a guided hint.
💬 Discussion
Loading...No comments yet. Be the first to start the discussion!
Sample cases (from the problem)
Sample Case 1
5 3 1 4 1 5
4
Solve it your way first
Community solutions unlock after you submit a passing solution. Don't peek.
Ready to solve this challenge?
Create a free account to write code, submit solutions, and track your progress.