Comments

The judging for B seems to be inconsistent for python. I have gotten TLE while similar solutions have gotten AC :(

Got TLE even with prefix sum

Pain

Codechef being codechef again :)