# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1052549 | Enzo | Mountains (IOI17_mountains) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
int cont = 1;
cin>>n;
int a[n];
for(int i = 0; i < n; i++){
cin>>a[i];
}
for(int i = 1; i < n-1; i++){
if(a[i] > a[i+1]){
cont++;
}
}
cout<<cont;
}