Hi I solved the question but get time limit many times.
so I saw my friends code and it was the same some so I copied his code to test and I saw the I get time limit again
Can anyone help me?
I change that *** compiler and it get accepted
Why gnu g++ and gnu g++11 does nit work and gnu g++14 works.
I think codeforces should change time limit for these compilers
use three Magical lines
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
Change the compiler from GNU C++ to GNU C++ 14 I did it and it worked Here
cin works faster in C++14 than in other compilers.