Please read the new rule regarding the restriction on the use of AI tools. ×

TLE on 1530D. Secret Santa

Revision en1, by whatthemomooofun1729, 2023-07-01 02:56:45

Hi, I am working on 1530D and I'm not sure why this code gets TLE on test case 4. I've calculated the time complexity several times, and it looks like O(NLogN) (there is a nested loop but it only goes through N iterations in total). I've also tried fast I/O, but that didn't work. Does anybody know why this code is getting TLE? Thank you!

Tags tle

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English whatthemomooofun1729 2023-07-01 02:59:11 54
en1 English whatthemomooofun1729 2023-07-01 02:56:45 477 Initial revision (published)