Problem CF-F · Hard

Game on Growing Tree

Watch the growing-tree game one query at a time: each vertex keeps its three longest branches, pruning the rest, and the score follows.

Open the interactive visualisation