doubt about std::swap for gnu pbds

Revision en2, by Nguyendinhbach_69, 2025-04-19 15:06:55

I am solving this problem and get a TLE although i do an O(nlogn^2) solution with time limit = 2s. Is this tle caused by ordered_set swap or is something in my code wrong???

My code

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Nguyendinhbach_69 2025-04-19 15:06:55 6 Tiny change: 'm solving https:[this prob' -> 'm solving [this prob'
en1 English Nguyendinhbach_69 2025-04-19 15:06:39 1587 Initial revision (published)