Who can help me solve this problem about GYM KTU DAY 2
The proble is here. here I have try my best to solve it.... But my method is too complex that got TLE. My code is here.