Submission

Status:

[xSSS][P][x][x][x]

Subtask/Task Score:

{0/20}{20/20}{0/20}{0/20}{0/20}

Score: 20

User: Dee

Problemset: นก

Language: python

Time: 0.014 second

Submitted On: 2026-11-15 14:27:52

n=int(input())
k = 0
count = 0
h=list(map(int,input().split()))
while k<n :
    if (h[k])>(h[k-1]) and (h[k])>(h[k+1]):
        count = count+1
    k=k+1
print(count)