Codechef Tree Problem Help

Revision en2, by aman_naughty, 2019-03-20 22:18:20

Problem Link : link

code link : code

In the bfs part I am extracting nodes at a given level and then in help function I am greedily sorting the CT and TT by CT time in acsending order as we want the developer to finish the module code asap so that the tester can attend to it. Also I believe that it doesn't matter if we process level 1 first and then subsequent levels as I am adding the time of each level to my answer. Why is this code giving WA. Any help is appreciated.

P.S- No one was able to solve this problem in the contest and thus it seems an interesting problem.

Tags #codechef, #tree, bfs, greedy

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English aman_naughty 2019-03-21 10:16:01 37
en2 English aman_naughty 2019-03-20 22:18:20 103
en1 English aman_naughty 2019-03-20 22:16:43 612 Initial revision (published)