Hi, I was trying to solve the question 161D - Расстояние в дереве but I'm getting WA on test 11 and can't figure out what's wrong. And the editorial is a bit confusing to me.
Here is my submission : 85076026 Can anyone suggest what might've gone wrong. Thanks in advance !
Changing
dp[50000][505]
todp[50001][505]
gives AC...Thanks Shashwat, that was a very silly error of mine.