Submission #475181

# Submission time Handle Problem Language Result Execution time Memory
475181 2021-09-21T10:48:25 Z Ahmed57 Po (COCI21_po) C++14
20 / 70
45 ms 972 KB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    long long n,ans = 0,mi = 1e18;
    cin>>n;
    vector<long long>arr(n);
    for(int i=0;i<n;i++){
        cin>>arr[i];
        if(arr[i]<mi){
            mi = 1e18;
            ans++;
        }else if(i&&arr[i]>arr[i-1])ans++;
        mi = min(mi,arr[i]);
    }
    cout<<ans<<"\n";
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Incorrect 0 ms 204 KB Output isn't correct
3 Incorrect 1 ms 204 KB Output isn't correct
4 Incorrect 13 ms 588 KB Output isn't correct
5 Incorrect 16 ms 884 KB Output isn't correct
6 Correct 44 ms 972 KB Output is correct
7 Incorrect 45 ms 972 KB Output isn't correct