前言
思路
很模板
Mycode
const int N = 110,mod =1e9+7;
int f[N][N];
int a[N][N];
int n;
void solve()
{
f[1][1] = 1;
cin>>n;
for(int i=1;i<=n;i++)
for(int j=1;j<=n;j++)
cin>>a[i][j];
for(int i=1;i<=n;i++){
for(int j=1;j<=n;j++){
if(a[i][j]){
f[i][j] = (f[i][j]%mod + f[i-1][j]%mod)%mod;
f[i][j] = (f[i][j]%mod + f[i][j-1]%mod)%mod;
}
}
}
cout<<f[n][n]<<endl;
}