#include
using namespace std;
int dp[1001][1001];
#define mod 1000000007
int noOfPaths(int R,int C)
{
int i,j;
if(dp[0][0]==-1)
return 0;
for(int i=0;i<C;i++){
if(dp[0][i]==-1)
break;
dp[0][j]==1;
}
for(int i=0;i<R;i++){
if(dp[i][0]==-1)
break;
dp[i][0]==1;
}
for(int i=1;i<R;i++)
{
for(int j=1;j<C;i++)
{
if(dp[i][j]==-1)
continue;
dp[i][j]=0;
if(dp[i][j-1]!=-1)
{
dp[i][j] = dp[i][j-1]%mod;
}
if(dp[i-1][j]!=-1)
{
dp[i][j] =(dp[i-1][j] + dp[i][j])%mod;
}
}
}
return (dp[R-1][C-1]>0)?dp[R-1][C-1]:0;
}
int main()
{
memset(dp,0,sizeof dp);
int m,n;
cin>>m>>n;
int p;
cin>>p;
while(p--)
{
int x,y;
cin>>x>>y;
dp[x-1][y-1]=-1;
}
cout<<noOfPaths(m,n)<<endl;
}
i am getting core dumped error