Коляскина Ирина Сергеевна 524 MaxSubseq 1191 | Ворошилова Ксения Михайловна 318 MaxSubseq 1362 | ||||
---|---|---|---|---|---|
n | 1 | max_l = 0 | n | 1 | max_length = 0 |
2 | cur_l = 0 | 2 | intime_length = 0 | ||
3 | prev = None | 3 | previous_number = None | ||
4 | while True: | 4 | while True: | ||
n | 5 | n = int(input()) | n | 5 | number = int(input()) |
6 | if n == 0: | 6 | if number == 0: | ||
7 | break | 7 | break | ||
n | 8 | if prev == None or n >= prev: | n | 8 | if previous_number is None or number >= previous_number: |
9 | cur_l += 1 | 9 | intime_length += 1 | ||
10 | else: | 10 | else: | ||
t | 11 | cur_l = 1 | t | 11 | intime_length = 1 |
12 | max_l = max(cur_l, max_l) | 12 | max_length = max(max_length, intime_length) | ||
13 | prev = n | 13 | previous_number = number | ||
14 | print(max_l) | 14 | print(max_length) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|