Planets Queries II CSES

Revision en1, by Peace_789, 2020-06-24 21:07:32

Hey guys...

So I was solving this problem from CSES.

Here is what I have tried...

My idea

By implementing this idea , I am getting WA in one TC ( Out of 11 ).

You can find my code here.

code

So , can someone point out what am I doing wrong or any cases that I am missing.

Thanks in advance :)

Tags #cses, #doubt, #graph theory

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en4 English Peace_789 2020-06-25 06:58:52 3374 Tiny change: 'nt to see accepted code...\n\n<spoil' -> 'nt to see code...\n\n\n<spoil'
en3 English Peace_789 2020-06-24 21:12:09 49
en2 English Peace_789 2020-06-24 21:07:59 11 Tiny change: 'ys... \n\nSo I was sol' -> 'ys... \n\nRecently I was sol'
en1 English Peace_789 2020-06-24 21:07:32 3910 Initial revision (published)