aboutsummaryrefslogtreecommitdiff
path: root/codeforces/DiffucltyRatingOrder/DiffucltyRatingOrder.cpp
blob: 1ed740dc5de1edd093e932fddcb268c2651680e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include<bits/stdc++.h>
using namespace std;
bool isIncreasing(vector<int> v) {
  for(int i = 0; i < v.size() - 1; i++) {
    if(v[i+1] < v[i]) {
      return false;
    }
  }
  return true;
}


int main() {
  int tt;
  cin >> tt;
  while(tt--) {
    int n;
    cin >> n;
    vector<int> v(n);
    for(int &x : v) cin >> x;
    cout << (isIncreasing(v) ? "YES" : "NO") << '\n';
  }
}