|  | 
|  | 
| back to board | dfs+rmq=wa3? answer = D[ a ] + D[ b ] - 2 * D[ c ]?or smth special???
 
 thx
Re: dfs+rmq=wa3?  
 Edited by author 24.04.2011 03:04
Re: dfs+rmq=wa3? Got AC with dfs + rmq. Check your solution accurately.Maybe this test case will help you:
 7
 0 2 1
 1 2 2
 2 3 4
 3 4 8
 4 5 16
 4 6 32
 5
 0 1
 0 3
 2 5
 1 6
 1 5
 Answer:
 3
 5
 28
 46
 30
Re: dfs+rmq=wa3? Posted by Abzal  22 Aug 2011 23:43My programm passes this test, but i have crash(access violation)... | 
 | 
|