Help needed, getting tle

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

Thanks :slight_smile:

Hi guys… @anon55659401 @l_returns @andrew1234 @aryanc403