Graph Theory Problem

https://www.codechef.com/problems/DEVBDAY

Hi krishna,

to solve this you have to create a graph, with edges representing the relationship, and then apply dfs to find the max profit you can get at each node.