getting wa for RTREE September Cook 2013

http://www.codechef.com/viewsolution/2704177
please provide me a test case where i am getting wrong… thanks in advance…


1
4
1
1
2
right answer: <b> 1 2 3 </b>
your answer:  <b> 1 2 2 </b>

2 Likes

http://www.codechef.com/viewsolution/2710497 another test case please!!!

thanx @butatov now its a tle seems to optimize it :)…

For input

1
6
1
2
3
2
5

that represents

    1
    |
    2
   / \
  3   5
 /     \
4       6

return should be 4, but your code returns 3 - http://ideone.com/GTQnTa