# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1052549 | 2024-08-10T16:04:20 Z | Enzo | Mountains (IOI17_mountains) | C++17 | 0 ms | 0 KB |
#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; }