Problem 3562 · Hard

Maximum Profit from Trading Stocks with Discounts

A tree knapsack: each employee is decided after their reports, with two budget tables that depend on whether the direct boss bought the stock.

Open the interactive visualisation