The problem [Interactive Tree](https://www.codechef.com/problems/INTREECTIVE/) 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/](https://www.codechef.com/problems/INTREECTIVE/)↵
Solution Link: [https://www.codechef.com/viewsolution/59535024](https://www.codechef.com/viewsolution/59535024)↵
↵
Also please tell me the points to keep in mind while submitting a solution for any interactive platforroblem on codechef or codeforces.↵
↵
Problem Link: [https://www.codechef.com/problems/INTREECTIVE/](https://www.codechef.com/problems/INTREECTIVE/)↵
Solution Link: [https://www.codechef.com/viewsolution/59535024](https://www.codechef.com/viewsolution/59535024)↵
↵
Also please tell me the points to keep in mind while submitting a solution for any interactive p