Problem 803 · Hard

Bricks Falling When Hit

Remove all hits first, then add bricks back in reverse with union-find to count what each hit dropped.

Open the interactive visualisation