Submission #893274

#TimeUsernameProblemLanguageResultExecution timeMemory
893274kokoueMoney (IZhO17_money)C++14
0 / 100
0 ms348 KiB
#include<bits/stdc++.h> using namespace std; int n; int a[10000]; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cin>>n; for(int i=0;i<n;i++) { cin>>a[i]; } int cntr=0; int i; for( i=0;i<n;i++) { // printf("in i=%d\n",i); int j; for( j=i;j<n-1;j++) { if(a[j]>a[j+1]) {i=j;/*cntr++*/;break;} // printf("%d ",a[j]); } i=j; // printf("\n"); cntr++; } cout<<cntr<<"\n"; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...