Why O(nlogn) isn't working for n=200000

Правка en2, от Quirkless, 2021-09-29 00:42:12

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.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Quirkless 2021-09-29 00:42:12 1 Tiny change: ' of vector<long long' -> ' of vector <long long'
en1 Английский Quirkless 2021-09-29 00:41:00 556 Initial revision (published)