Submission #475180

#TimeUsernameProblemLanguageResultExecution timeMemory
475180Ahmed57Po (COCI21_po)C++14
20 / 70
43 ms972 KiB
#include <bits/stdc++.h> using namespace std; int main() { long long n,ans = 0,mi = 1e9; cin>>n; vector<long long>arr(n); for(int i=0;i<n;i++){ cin>>arr[i]; if(arr[i]<mi){ mi = 1e9; ans++; }else if(i&&arr[i]>arr[i-1])ans++; mi = min(mi,arr[i]); } cout<<ans<<"\n"; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...