Submission #896967

#TimeUsernameProblemLanguageResultExecution timeMemory
896967AndrijaMPancake (NOI12_pancake)C++14
4 / 25
14 ms348 KiB
#include <bits/stdc++.h> using namespace std; int main() { int t; cin>>t; int n; while(t--) { cin>>n; vector<int>v; for(int i=0;i<n;i++) { int num; cin>>num; v.push_back(num); } reverse(v.begin(),v.end()); vector<int>s; s=v; sort(s.begin(),s.end()); if(v==s) { cout<<0<<endl; } else { cout<<1<<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...