https://www.spoj.com/problems/SHUB1307/ Can anyone tell me this problem which i found on spoj I think it uses the concept of 2D grid maximum sum path but I am not able to Come up with a solution for this one.
Please can anyone help
It can be solved by BFS or DP. I tried both, and my DP was faster than my BFS.
It’s not quite the simple max sum path, as at each step, you need to ensure the total number of shots consumed doesn’t exceed the allowed number of shots.