Submission #92642

#TimeUsernameProblemLanguageResultExecution timeMemory
92642janchomathMoney (IZhO17_money)C++14
0 / 100
2 ms376 KiB
#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 + 1; while(a[l] >= a[l-1] || l == i){ l++; } i = l - 1; ans++; } cout << ans; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...