Евдокимов Арсений Евгеньевич, 321 группа MaxSubseq 384 | Сазонов Георгий Владимирович, 528 группа MaxSubseq 928 | ||||
---|---|---|---|---|---|
n | 1 | maxl = 0 | n | 1 | longest = 0 |
2 | l = 0 | 2 | cur_len = 0 | ||
3 | prev = 0 | 3 | last = -1 | ||
4 | while (n := int(input())): | 4 | while (x := int(input())): | ||
5 | if n >= prev: | 5 | if x >= last: | ||
6 | l += 1 | 6 | cur_len += 1 | ||
7 | else: | 7 | else: | ||
t | 8 | if l > maxl: | t | 8 | if cur_len > longest: |
9 | maxl = l | 9 | longest = cur_len | ||
10 | l = 1 | 10 | cur_len = 1 | ||
11 | prev = n | 11 | last = x | ||
12 | if l > maxl: | 12 | if cur_len > longest: | ||
13 | maxl = l | 13 | longest = cur_len | ||
14 | print(maxl) | 14 | print(longest) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|