atcoder#ABC134C. [ABC134C] Exception Handling
[ABC134C] Exception Handling
Score : points
Problem Statement
You are given a sequence of length : . For each integer between and (inclusive), answer the following question:
- Find the maximum value among the elements other than in the sequence.
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print lines. The -th line () should contain the maximum value among the elements other than in the sequence.
3
1
4
3
4
3
4
- The maximum value among the two elements other than , that is, and , is .
- The maximum value among the two elements other than , that is, and , is .
- The maximum value among the two elements other than , that is, and , is .
2
5
5
5
5