I am trying this problem 1245D - Shichikuji and Power Grid
My submission results are here: 79439427
Please help me understand what's wrong
I also wanted to ask if a dfs approach could work here like dynamically generating nodes until all the conditions are satisfied and then trace back the path with the minimum cost