# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
475181 | Ahmed57 | Po (COCI21_po) | C++14 | 45 ms | 972 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 |
---|---|---|---|---|
Fetching results... |