Problem 3568 · Medium

Minimum Moves to Clean the Classroom

A student walks a grid with walls, litter and reset cells; every step costs one energy and a reset cell refills it. Find the fewest steps that pick up all the litter, or -1 if that cannot be done.

Open the interactive visualisation