Game Startegy 2 Dp

as we can not create of arr of dimension more than 10^7
so i did the above approach similar to game 1.
But my last 3 test case giving TLE

hello @Ram_Vilash_Kumar
declare ur dp array of size 5001 X 5001.

check ur updated code here-> https://ide.codingblocks.com/s/241523

https://ide.codingblocks.com/s/241309 Why i am getting wrong answer in test case

@Ram_Vilash_Kumar
bro pls create a separate thread for doubt related to other problems

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.