Why time limited exeeded in my O(nlogn) solution

Revision en3, by proAakash, 2024-08-27 04:33:05

i was trying to solve this problem:- https://mirror.codeforces.com/contest/1801/problem/B

My solution :- https://mirror.codeforces.com/contest/1801/submission/278323418

In my solution i wrote a O(nlogn) solution and the judge is showing time limit exceeded. But in editorial the solution given is O(nlogn) and that is getting passed. I am having trouble understanding how this is happening.

plzz help :,(

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English proAakash 2024-08-27 04:33:05 48
en2 English proAakash 2024-08-27 04:32:36 1 Tiny change: 'olution :- 278323418\' -> 'olution :-278323418\'
en1 English proAakash 2024-08-27 04:32:22 402 Initial revision (published)