Problem 3543 · Medium

Maximum Weighted K-Edge Path

Track every reachable total for each node and edge count, then keep the largest total that stays strictly below t.

Open the interactive visualisation