constraints says any a[i] in the test cases should be between 1 <= a[i] <= 10 but some test cases doesn’t fit with this. when i put " if(a[i]>10) while(true); " in the code, i get TLE.
Fixed. Thanks for reporting.