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.
Track every reachable total for each node and edge count, then keep the largest total that stays strictly below t.