Comments

This is a tragedy! link

I don't know why I was stuck on E. It was TLE on test 3. But my time complexity was right.