The problem Interactive Tree appeared in contest and I came up with a logic which I think is correct. But the code is not getting accepted. Can someone help me with the code?
Problem Link: https://www.codechef.com/problems/INTREECTIVE/ Solution Link: https://www.codechef.com/viewsolution/59535024
Also please tell me the points to keep in mind while submitting a solution for any interactive problem on codechef or codeforces.