Submission #92640

# Submission time Handle Problem Language Result Execution time Memory
92640 2019-01-04T08:51:40 Z janchomath Money (IZhO17_money) C++14
0 / 100
2 ms 376 KB
#include<bits/stdc++.h>
#define ll long long
#define f first
#define s second
#define pb push_back
using namespace std;
ll n,a[2000005],ans;
int main(){
	cin >> n;
	for(int i=1; i<=n; i++)cin >> a[i];
	for(int i=1; i<=n; i++){
		ll l = i;
		while(a[l] >= a[l-1] || l == i){
			l++;
		}
		i = l - 1;
		ans++;
	}
	
	cout << ans;
	
	
	
	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Incorrect 2 ms 256 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Incorrect 2 ms 256 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Incorrect 2 ms 256 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Incorrect 2 ms 256 KB Output isn't correct
3 Halted 0 ms 0 KB -