# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
897473 |
2024-01-03T07:23:22 Z |
AI_2512 |
Money (IZhO17_money) |
C++17 |
|
0 ms |
436 KB |
#include <bits/stdc++.h>
using namespace std;
signed main(){
int n, res = 0;
bool b = false;
cin >> n;
vector<int> vec(n);
for (int i = 0; i< n; i++) cin >> vec[i];
for (int i = 1; i< n;i++){
if (vec[i-1] < vec[i]){
b = true;
}else{
if (b){
res++;
b = false;
}
}
}
if (b) res++;
cout << res;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Incorrect |
0 ms |
436 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Incorrect |
0 ms |
436 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Incorrect |
0 ms |
436 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Incorrect |
0 ms |
436 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |