Codechef Tree Problem Help

Правка en3, от aman_naughty, 2019-03-21 10:16:01

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.

Теги #codechef, #tree, bfs, greedy

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский aman_naughty 2019-03-21 10:16:01 37
en2 Английский aman_naughty 2019-03-20 22:18:20 103
en1 Английский aman_naughty 2019-03-20 22:16:43 612 Initial revision (published)