This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |