Optimal Game strategy 2

testcase no. 0 is showing run-error.

@hari_2425

Declare size of dp as dp[10005][10005] and your code should work just fine.

Hope it Helps.