Codeforces and Polygon may be unavailable from December 6, 19:00 (UTC) to December 6, 21:00 (UTC) due to technical maintenance. ×

Planets Queries II CSES

Revision en4, by Peace_789, 2020-06-25 06:58:52

Hey guys...

Recently 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 :)


UPD

As pwild sir pointed out , I was missing that cases.

To overcome that , I just added small logic to my code and it got ACCEPTED.

If you want to see code...

accepted code
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)