code
#include<bits/stdc++.h>
using namespace std;
string mp[105][105];
int main() {
srand(time(0));
int n,m;
cin>>n>>m;
for(int i=1;i<=n;i++) {
for(int j=1;j<=m;j++) {
if(rand()%2==1) {
mp[i][j]="□";
} else {
mp[i][j]="▇ ";
}
}
}
for(int i=1;i<=n;i++) {
for(int j=1;j<=m;j++) {
cout<<mp[i][j];
}
cout<<endl;
}
return 0;
}
标签:黑白相间,int,地图,开源,随机,105
From: https://www.cnblogs.com/daiyulong/p/kaiyuan-suijishengchengyifuheibaixiangjiandeditu.html