Problem 803 · Hard
Remove all hits first, then add bricks back in reverse with union-find to count what each hit dropped.
Open the interactive visualisation