Submission #570259

#TimeUsernameProblemLanguageResultExecution timeMemory
570259ZarnigorDoktor (COCI17_doktor)C++14
0 / 100
189 ms2212 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 << j << " " << i; return 0; } } 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...