IOI 2011 Elephants
I have heard that the following problem that came on the 2011 IOI had a solution with O(log n) queries rather than O(sqrt(n)) queries by using link-cut trees. What is that solution?
Codeforces Round 953 Div 2 Solution Discussion (with Jan)