Problem 3530 · Hard

Maximum Profit from Valid Topological Order in DAG

Bitmask DP over the set of nodes already placed: each new node takes the next position and adds score times that position.

Open the interactive visualisation