A. Link/Cut Tree time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Programmer Rostislav got seriously interested in the Link/Cut Tree data structure, which is based on Splay trees. Specifica…