#include<bits/stdc++.h>
using namespace std;
int main(){
int n,cnt=0;;
cin>>n;
vector<int> v(n);
for(int i=0 ; i<n ; i++) cin>>v[i];
for(int i=0 ; i<n-1 ; i++){
if(v[i]>v[i+1]){
cnt++;
}
}
cout<<cnt;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
4 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
5 |
Incorrect |
167 ms |
3380 KB |
Output isn't correct |
6 |
Incorrect |
175 ms |
3760 KB |
Output isn't correct |
7 |
Incorrect |
140 ms |
3156 KB |
Output isn't correct |
8 |
Incorrect |
136 ms |
3128 KB |
Output isn't correct |
9 |
Incorrect |
157 ms |
3284 KB |
Output isn't correct |
10 |
Incorrect |
153 ms |
3284 KB |
Output isn't correct |