#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n,ans = 0,mi = 1e18;
cin>>n;
vector<long long>arr(n);
for(int i=0;i<n;i++){
cin>>arr[i];
if(arr[i]<mi){
mi = 1e18;
ans++;
}else if(i&&arr[i]>arr[i-1])ans++;
mi = min(mi,arr[i]);
}
cout<<ans<<"\n";
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Incorrect |
0 ms |
204 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
4 |
Incorrect |
13 ms |
588 KB |
Output isn't correct |
5 |
Incorrect |
16 ms |
884 KB |
Output isn't correct |
6 |
Correct |
44 ms |
972 KB |
Output is correct |
7 |
Incorrect |
45 ms |
972 KB |
Output isn't correct |