fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int m,t;
  7. cin>>m;
  8. int count;
  9. while(m--)
  10. {
  11. count=0;
  12. int l;cin>>l;
  13. long long v[l];
  14. for(int i=0;i<l;i++)
  15. {
  16. cin>>v[i];
  17. }
  18. for(int j=0;j<l-1;j++)
  19. {
  20.  
  21. if(v[j]<=v[j+1])
  22. {
  23. count++;
  24. }
  25.  
  26. }
  27. //cout<<count;
  28. if(count==l-1)
  29. {
  30. cout<<"TRUE"<<"\n";
  31. }
  32. else
  33. cout<<"FALSE"<<"\n";
  34. }
  35. return 0;
  36. }
  37.  
  38.  
  39.  
Success #stdin #stdout 0.01s 5448KB
stdin
6
5 
1 2 3 4 5
3
5 7 1
4
2 3 1 4
3
0 0 2
4
1 2 2 3
4
3 2 2 1
stdout
TRUE
FALSE
FALSE
TRUE
TRUE
FALSE