jzcrq @ 2020-04-04 22:58:00
#include<bits/stdc++.h>
using namespace std;
int main(){
int x,y[40001],a,b=0,c,f;
bool e;
cin>>x;
for (a=1;a<=x^2;a++){
cin>>y[a];
if (y[a]=='\n') {
c=a;
goto d;
}
}
d:for (a=1;a<c;a++){
if (a%2==1) e=0;
else e=1;
if (a!=0)
for (f=1;f<=y[a];f++){
cout<<e;
b++;
if (b%x==0&&b!=x^2) cout<<endl;
if (b==x^2) return 0;
}
}
}
by 吴勉之 @ 2020-04-04 23:09:16
@lscrq 楼主平方不是这么玩的。。。
by Kevin施黄凯 @ 2020-04-04 23:40:00
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,i,j,k,x,f=0;
cin>>n;
i=1;j=0;
while(cin>>x){
for(k=1;k<=x;++k){
j++;
if(j>n){
cout<<endl;
i++,j=1;
}
cout<<f;
}
f^=1;
}
}
我的码风跟你差不多,看一看吧
by jzcrq @ 2020-04-05 10:40:18
蟹蟹!