Submission #893274

# Submission time Handle Problem Language Result Execution time Memory
893274 2023-12-26T20:02:45 Z kokoue Money (IZhO17_money) C++14
0 / 100
0 ms 348 KB
#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 time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 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 348 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 348 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 348 KB Output isn't correct
3 Halted 0 ms 0 KB -