ADDAP spoj

Правка en2, от rahulpadhy, 2016-06-18 17:23:20

I am stuck in this SPOJ question. Can anyone please point out as to where I am going wrong ? I am not even getting the sample test cases correct..

Here's the link to the question :

http://www.spoj.com/problems/ADDAP/

And here's my solution for it. I am using BFS to detect the level of the nodes(I am pushing -1 into the queue after completion of each level & -1 here detects the completion of a level), but unfortunately not getting the correct answer.

http://pastebin.com/WnfkQXXH

Теги spoj, addap

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский rahulpadhy 2016-06-18 17:23:20 107
en1 Английский rahulpadhy 2016-06-17 15:15:09 397 Initial revision (published)