Need help in DIV 2 #660 : Problem C

Revision en2, by burtmacklin, 2020-07-31 10:05:14

Hi,

I am getting TLE at test case 6. I have added documentation to improve readability.

Things I have tried:

  1. Check for infinite loops : Not possible since I am keeping track of every node visited.
  2. Check time complexity : It is O(n), which should be enough for 2 second limit.
  3. Replace cin and cout with scanf and printf : Didn't work.

Thanks

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English burtmacklin 2020-07-31 10:09:02 6 Tiny change: 'ssion/88564197) at test ' -> 'ssion/88566211) at test '
en2 English burtmacklin 2020-07-31 10:05:14 0 (published)
en1 English burtmacklin 2020-07-31 10:04:38 463 Initial revision (saved to drafts)