It is a test
扫雷
https://ac.nowcoder.com/acm/problem/22232?&headNav=acm
just for test.我相信只有像我这样的傻子才会发这种题
#include<bits/stdc++.h>
using namespace std;
bool a[101][101];
int m,n;
int main(){
cin>>m>>n;
for(int i=1;i<=m;++i){
for(int j=1;j<=n;++j){
char x;
cin>>x;
if(x=='*')a[i][j]=true;
}
getchar();
}
for(int i=1;i<=m;++i){
for(int j=1;j<=n;++j){
int sum=0;
if(a[i][j]) cout<<'*';
else{
for(int dx=-1;dx<=1;dx++){
for(int dy=-1;dy<=1;dy++){
if(a[i+dx][j+dy])sum++;
}
}
cout<<sum;
}
}
cout<<'\n';
}
}