Submission
Status:
[PPPP][P][P][P][P]
Subtask/Task Score:
{20/20}{20/20}{20/20}{20/20}{20/20}
Score: 100
User: lumppengae
Problemset: นก
Language: cpp
Time: 0.004 second
Submitted On: 2026-09-29 15:40:25
/******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
C#, OCaml, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
Code, Compile, Run and Debug online from anywhere in world.
*******************************************************************************/
#include <iostream>
using namespace std;
int main()
{
int a;
cin >>a;
int b[a+2]={0},c=0;
for (int i=1;i<=a;i++){
cin>>b[i];
}
for (int i=1;i<=a;i++){
if (b[i]>b[i-1]&& b[i]>b[i+1]){
c++;
}
}
cout <<c;
}