Comments

In problem B, If there is no valid pair of x and y. Then why doesn't it give TLE as the time complexcity is O(n^2) ?