fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. bool ASCVERIFYING(int arr[], int n77){
  5. for(int i = 0 ; i < n77-1; i++){
  6. if(arr[i]<arr[i+1]){
  7. return false;
  8. }
  9. }
  10. return true;
  11. }
  12.  
  13.  
  14. int main() {
  15.  
  16. int t77 ;cin>>t77;
  17. while(t77--){
  18. int n77 ; cin>>n77;
  19. int arr[n77];
  20. for(int i = 0; i<n77;i++){
  21. cin>>arr[i];
  22.  
  23. }
  24. bool value = ASCVERIFYING(arr,n77);
  25. if(value == false){
  26. cout<<"FALSE"<<"\n";
  27. }
  28. else{
  29. cout<<"TRUE"<<"\n";
  30. }
  31. }
  32.  
  33. return 0;
  34. }
  35.  
Success #stdin #stdout 0.01s 5520KB
stdin
1
5
50 40 20 10 1
stdout
TRUE