10 条评论
-
CXZ @ 2024-9-2 19:08:11
wa
-
2024-5-9 18:11:18@
考古
-
2023-7-19 15:43:38@
#include<bits/stdc++.h> using namespace std; int dx={0,1,0,-1}; int dy={1,0,-1,0}; int ans,n,m; int x[100][100]; bool d[100][100]; void gdh(int c,int d) {for(int i=1;i<=n;i++) { for(int j=1;j<=m;j++) { if(x[i][j]>0)d[i][j]=1; else d[i][j]=0;}} for(int i=1;i<=n;i++) for(int j=1;j<=m;j++) {
if(d[i][j]==1) { if(i==1||i==n||j==1||j==m) { if(d[i][j])ans++; } else { if(d[n][m-1]&&d[n][m]&&d[n][m+1]&&d[n-1][m]&&d[n+1][m])ans++; if(c!=n) gdh(c+1,d); else gdh(c,d+1); } }
} int main() { cin>>n; for(int i=1;i<=n;i++) for(int j=1;j<=m;j++) cin>>x[i][j]; gdh(m,n); return 0; }
-
2023-6-14 14:08:33@
考古
-
2021-5-7 10:22:59@
testdiscuss
-
2021-5-6 21:39:36@
OHHHHHHH
-
2021-4-16 16:49:57@
。。。
-
2021-4-11 11:41:35@
50 路过 qwq
-
2021-3-28 22:49:17@
qwq
-
2021-3-28 21:47:24@
awa
- 1