| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 306404 | amunduzbaev | Arranging Shoes (IOI19_shoes) | C++14 | 0 ms | 0 KiB |
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>
#define int long long
using namespace std;
int t,n;
main(){
cin>>t;
while(t--){
cin>>n;
vector<int>v(n);
for(int i=0;i<n;i++){
cin>>v[i];
}
bool ok=0;
for(int i=1;i<n;i++){
if(v[i]>=v[i-1]){
ok=1;
break;
}
}
if(ok)
cout<<"YESn";
else
cout<<"NO\n";
}
return 0;
}
