Help needed, getting tle

I am getting TLE for this problem :
https://codeforces.com/contest/1176/problem/E

Thanks :slight_smile:

Hi guys… @karangreat234 @l_returns @andrew1234 @aryanc403