fork(1) download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. int t;
  6. cin >> t;
  7. while(t--)
  8. {
  9. int n,f=0;
  10. cin >> n;
  11. vector<int> v;
  12. for(int i=0;i<n;i++)
  13. {
  14. int a;
  15. cin >> a;
  16. v.push_back(a);
  17. }
  18. for(int i=0;i<n;i++)
  19. {
  20. if(v[i]<=2*(max(i,n-1-i)));
  21. {
  22. f=1;
  23. break;
  24. }
  25. }
  26. if(f==1) cout << "NO" << endl;
  27. else cout << "YES" << endl;
  28. }
  29. return 0;
  30. }
Success #stdin #stdout 0.01s 5288KB
stdin
5
2
4 10
2
2 2
3
4 10 5
3
5 3 5
5
12 13 25 17 30
stdout
NO
NO
NO
NO
NO