All link-cut tree operations are described assuming that we already have a node we want to perform the operation on, but how do I have to store the tree to be able to get to that node in the first place?
I can't just store the root of the abstract tree, because link-cut trees don't support descendant search so most of the nodes in the tree will be lost.
I had an idea to store roots of every solid tree (splay tree) in a vector, but there's another problem: solid trees are constantly changing their structure, which means I will have to recalculate roots of each tree after performing any operation, which is complicated, slow, and definitely is not correct.
So what is the correct way to store it?