Grid-H at AtCoder


can any one tell me what is the problem with this code?
50% test cases accepted successfully but other 50% are not.

@hrit04,
Replace dp[i][j]=dp[i-1][j]+dp[i][j-1];
By dp[i][j]=(dp[i-1][j]%MOD+dp[i][j-1]%MOD)%MOD; , where MOD is the number you want to take modulo with.

https://atcoder.jp/contests/dp/submissions/13161666
still few test cases giving wrong ans.

@hrit04,
Bug on Line 28.