提交时间:2023-11-25 08:33:46

运行 ID: 111865

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