TLE on 1530D. Secret Santa

Правка en1, от 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!

Теги tle

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский whatthemomooofun1729 2023-07-01 02:59:11 54
en1 Английский whatthemomooofun1729 2023-07-01 02:56:45 477 Initial revision (published)