Can someone help me with this code please… this code was written by me for solving QTREE SPOJ problem using Heavy Light Decomposition and it is getting Runtime error SIGSEGV.
Here is the link to the code and self-made test case: https://ideone.com/k3JAze