# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
758243 |
2023-06-14T10:12:43 Z |
vjudge1 |
Money (IZhO17_money) |
C++17 |
|
0 ms |
212 KB |
#include <bits/stdc++.h>
#include <fstream>
#define endl '\n'
#define mod 1000007
#define INF 1000000000000000000
//#define ll long long
///#define cin fin
///#define cout fout
#define fi first
#define se second
using namespace std;
double const EPS = 1e-14;
///ofstream fout("herding.out");
///ifstream fin("herding.in");
/*const int N = 25;
int n;
bool ok[N];
int arr[N];
int ans = INF;
void sol(int siz) {
if(siz = n) {
for(int i = 0; i < n-1; i++) {
if(ok[i+1] == false && arr[i] > arr[i+1]) {
}
}
}
ok[siz] = false;
sol(siz+1);
ok[siz] = true;
sol(siz+1);
ok[siz] = false;
}*/
int main()
{
ios_base::sync_with_stdio(0);cout.tie(0);cin.tie(0);
int n; cin >> n; int ans = 1; int arr[n];
for(int i = 0; i < n; i++) cin >> arr[i];
for(int i = 0; i < n-1; i++) {
if(arr[i] > arr[i+1]) ans++;
}
cout << ans;
return 0;
}
# |
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 |
- |