提交时间:2023-11-25 08:35:26

运行 ID: 111875

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