Submission #967945

#TimeUsernameProblemLanguageResultExecution timeMemory
967945weakweakweakLine Town (CCO23_day1problem3)C++17
0 / 25
1 ms348 KiB
#include <bits/stdc++.h> using namespace std; int n, a[5000110]; int main () { ios_base::sync_with_stdio(false); cin.tie(0); cin >> n; bool y = 1; for (int i = 1; i <= n; i++) { cin >> a[i]; if (i > 1 and a[i] < a[i - 1]) y = 0; } if (y) cout << "0\n"; else cout << "-1\n"; 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...