hiho week 143 register

Ended

Participants:1650

Verdict:Accepted
Score:100 / 100
Submitted:2017-03-30 21:52:17

Lang:Python2

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
N = int(raw_input())
hiho = raw_input().split()
if N==1:
    print hiho[0],
n = N-2
while n - 1 >= 0:
    if(int(hiho[n+1]) > int(hiho[n])):
        n = n - 1
        continue
    else:
        break
print(" ".join(hiho[:n+1]))
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX