Guys My code seems to be working perfectly fine for first 2 test cases, while the third one gives TLE. When I checked the test case, they gave 500 as the number of test cases and gave only one test case as input. Is this an error on the part of codeforces, or is there any way to deal with this error?
https://codeforces.net/contest/1638/submission/146412114 this is the link to the submission. Please do let me know!