Mirrol @ 2023-08-25 23:10:50
代码:
#include<iostream>
using namespace std;
int main(){
int num;cin>>num;
int porm[num*num]={0};
int i=0,ls=0,wep=0;
int sh=0;
while(num*num!=wep){
cin>>ls;
wep+=ls;
for(;i<ls;i++){
porm[i]=sh;
}
sh=!sh;
}
int ix=0;
for(int i=0;i<num;i++){
for(int j=0;j<num;j++){
cout<<porm[ix];
ix++;
}
cout<<endl;
}
return 0;
}
by Mirrol @ 2023-08-25 23:11:57
试了一下,奇怪的6,7AC