Saleh127

CF 1420A

Oct 13th, 2020
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. #define test int t; cin>>t; for(int cs=1;cs<=t;cs++)
  5. ll a[200000],c,d,e=0,f[200000],i,j,k,l;
  6. int main()
  7. {
  8. ios_base::sync_with_stdio(0);
  9. cin.tie(0);
  10. cout.tie(0);
  11. ///!@]}
  12.  
  13. test
  14. {
  15. cin>>c;
  16. e=1;
  17. for(i=0; i<c; i++)
  18. {
  19. cin>>a[i];
  20. }
  21. for(i=1;i<c;i++)
  22. {
  23. if(a[i]>=a[i-1])
  24. {
  25. e=0;
  26. break;
  27. }
  28. }
  29. if(e==0) cout<<"YES"<<endl;
  30. else cout<<"NO"<<endl;
  31. }
  32.  
  33.  
  34. return 0;
  35. }
  36.  
Advertisement
Add Comment
Please, Sign In to add comment