# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
710060 |
2023-03-15T04:13:51 Z |
Tyx2019 |
Money (IZhO17_money) |
C++17 |
|
0 ms |
212 KB |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main(){
int N;
cin >> N;
int A[N];
for(int i=0;i<N;i++) cin >> A[i];
int prev=-1;
int cnt=1;
for(int i=0;i<N;i++){
if(prev==-1){
prev=A[i];
continue;
}
if(A[i]>=A[i-1]) continue;
prev=-1;
cnt++;
i--;
}
cout << cnt;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |