Submission #570258

#TimeUsernameProblemLanguageResultExecution timeMemory
570258ZarnigorDoktor (COCI17_doktor)C++17
0 / 100
200 ms5404 KiB
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; vector <int> a(n); for(auto &x: a) cin >> x; int i=-1, j=-1; for(int x=1; x<n; x++){ if(a[x-1]>a[x] && i==-1){ i = x; } if(i!=-1 && a[x-1]<a[x] && j==-1){ j = x; } if(i!=-1 && j!=-1 && a[x-1]<a[x]){ cout << i << " " << j; break; } } cout << 1 << " " << 1; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...