Robo paths Codechef

#include <bits/stdc++.h>
using namespace std;

long long int robo_paths(int arr[][100],int m,int n)
{
long long int dp[m][n];
memset(dp,0,sizeof(dp));

for(int i=0;i<m;i++)
{
	for(int j=0;j<n;j++)
	{
		if(i==0 && j==0)
			dp[i][j]=1;
		else
		{
			if(arr[i][j]==-1)
				dp[i][j]=0;
			else
			{
				if(i==0)
					dp[i][j]=dp[i][j-1];
				else if(j==0)
					dp[i][j]=dp[i-1][j];
				else
					dp[i][j]=(dp[i-1][j]+dp[i][j-1])%1000000007;
			}
		}
	}
}

return dp[m-1][n-1];

}

main()
{
int m,n,p;
cin>>m>>n>>p;
int arr[100][100];
memset(arr,0,sizeof(arr));
for(int i=0;i<p;i++)
{
int a,b;
cin>>a>>b;
arr[a-1][b-1]=-1;
}
cout<<robo_paths(arr,m,n);
}

What is the problem in this code ??

@Mehul7349
Please send your code on CB IDE
Also you need to use long long instead of int and the size of grid was 1000*1000
While you have used 100*100

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.