Max support
Problem
Given a sequence of numbers. For each number, display the current maximum at the time it was entered.
Input
The N
number (the number of numbers in the sequence, 1<=N<=100000) is given first, and then the N
numbers.
Output
Print the current highs.
Examples
# |
Input |
Output |
1 |
7
4 2 5 -1 4 6 2
|
4
4
5
5
5
6
6 |