https://blog.csdn.net/lzc504603913/article/details/79702604
https://codeforces.com/contest/957/problem/D
Riverside Curio
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
Arkady decides to observe a river for n consecutive days. The river's water level on each day is equal to some real value.
Arkady goes to the riverside each day and makes a mark on the side of the channel at the height of the water level, but if it coincides with a mark made before, no new mark is created. The water does not wash the marks away. Arkady writes down the number of marks strictly above the water level each day, on the i-th day this value is equal to mi.
Defi