Recently I gave Codeforces round #660 (Div 2) ============================================= ,
where i solved problem B in O(n) time complexity After doing the problem in O(n) I still get TLE !!! and its not only me I get to know many other also faced this problem
EVEN C++ O(n) SUBMISSION GOT TLE !!!!!
My submission : http://mirror.codeforces.com/contest/1388/submission/88472454
A C++ Submission : https://mirror.codeforces.com/contest/1388/submission/88470034