Submission
Status:
[PPPx][P][P][P][P]
Subtask/Task Score:
{0/20}{20/20}{20/20}{20/20}{20/20}
Score: 80
User: Pun_iksd
Problemset: นก
Language: python
Time: 0.012 second
Submitted On: 2026-04-19 11:06:00
N = int(input())
a = list(map(int,input().split()))
c = 0
for i in range(N):
if i == 0:
if a[i] > a[i+1]:
c += 1
elif i < len(a)-1:
if a[i] > a[i+1] and a[i] > a[i-1]:
c += 1
else:
if a[i] > a[i-1]:
c += 1
print(c)