40分求助

P1162 填涂颜色

```cpp #include<bits/stdc++.h> using namespace std; int chess[35][35],n; int main() { int sign=1; scanf("%d",&n); for(int i=1; i<=n; i++) for(int j=1; j<=n; j++) { scanf("%d",&chess[i][j]); if(!chess[i][j]){ if(chess[i-1][j]) chess[i][j]=2; } } printf("\n"); for(int i=1;i<=n;i++) {for(int j=1;j<=n;j++) printf("%d ",chess[i][j]); printf("\n");} return 0; } ```
by waterlike @ 2017-12-28 19:10:44


我这都40。。。
by waterlike @ 2017-12-28 19:11:08


|