Hello everyone, I need help please. For given problem: https://mirror.codeforces.com/problemset/problem/1574/C my submission: https://mirror.codeforces.com/contest/1574/submission/130212274 My code is giving right answer but on test case 6, it is showing TLE, which it shouldn't as I just used around 2nlogn+5n operations, which I think shouldn't cause problem. Also, I doubt that whether TLE is because of sorting of vector , or maybe sorting of vector<pair<long long,int>>, I don't know , please tell me something.
Auto comment: topic has been updated by Quirkless (previous revision, new revision, compare).
Read in your input fast.
Thanks a lot bro. I didn't even knew about it, I don't know what else do I have to know for CP. Actually, when I used to see other people's code, the line "ios_base::sync_with_stdio(false);" didn't used to make any sense to me, but now I know it