https://codeforces.me/problemset/problem/2128/C
Code in c+ :
include
using namespace std;
int main(){ int t; cin >> t; while(t--){ int n; cin >> n; long m = (long)INT_MAX; while(n--){ long b; cin >> b; if(b <= m){ m = b; }else{ if(b > 2*m-1){ cout << "NO" << endl; break; } } if(n==0) cout << "YES" << endl; } } return 0; }
It always shows wrong in test case 2 token 46 The test case is n = 3 1 2 2



