#include <bits/stdc++.h>
using namespace std;
int main(){
int n,s=1;
cin>>n;
int h[n];
for(int i=0;i<n;i++)
cin>>h[n];
for(int i=1;i<n;i++){
if(h[i-1]-1!=h[i])
s++;
}
cout<<s;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
4 |
Incorrect |
1 ms |
504 KB |
Output isn't correct |
5 |
Incorrect |
104 ms |
3512 KB |
Output isn't correct |
6 |
Incorrect |
118 ms |
3664 KB |
Output isn't correct |
7 |
Incorrect |
84 ms |
3152 KB |
Output isn't correct |
8 |
Incorrect |
83 ms |
3152 KB |
Output isn't correct |
9 |
Incorrect |
96 ms |
3420 KB |
Output isn't correct |
10 |
Incorrect |
93 ms |
3576 KB |
Output isn't correct |