You have an input a n games. Each game has a fame (which can be negative) and prerequisite games (these games must be played before you play the current game).
You want to find the maximum amount of fame you can gain by playing a valid set of games.
One idea I had was to use a weighted directed graph however you still have to try every single pair of nodes in the graph to find the optimal solution.
Any ideas?
ncan be?