Saleh127

CF 1375C

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