Submission #967974

#TimeUsernameProblemLanguageResultExecution timeMemory
967974Darren0724Line Town (CCO23_day1problem3)C++17
0 / 25
0 ms348 KiB
#include <bits/stdc++.h> using namespace std; #define all(x) x.begin(),x.end() #define ll long long #define LCBorz ios_base::sync_with_stdio(false);cin.tie(0); const int N=1000005; const int mod=1e6+3; int32_t main(){ LCBorz; int n;cin>>n; vector<int> v(n+1); for(int i=1;i<=n;i++){ cin>>v[i]; } int last=-1; for(int i=0;i<n;i++){ if(v[i]<last){ cout<<-1<<endl; return 0; } last=v[i]; } cout<<0<<endl; 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...