提交时间:2023-11-25 08:49:03

运行 ID: 111905

#include<bits/stdc++.h> using namespace std; int square[101][101],n,m; int main() { cin>>n>>m; for(int i=1;i<=n;i++){ for(int j=1;j<=m;j++){ cin>>square[i][j]; if(i==1&&j==1){square[i][j]=1;continue;} if(square[i][j]==1){square[i][j]=0;continue;} if(square[i][j]==0){square[i][j]=square[i-1][j]+square[i][j-1];} }} cout<<square[n][m]; }