| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 86949 | sh25_shenpy | 花匠(Day 2) | Python3 | Accepted | 79 MS | 16556 KB | 309 | 2026-04-10 14:49:31 |
n = int(input()) h = list(map(int, input().split())) if n <= 1: print(n) else: up = 1 down = 1 for i in range(1, n): if h[i] > h[i-1]: up = down + 1 elif h[i] < h[i-1]: down = up + 1 # if equal, do nothing print(max(up, down))