Substitute0329 @ 2019-03-20 13:16:06
为何Re,我也不知道,只能求助大佬
#include<cstdio>
int n,tot;
char c[40002];
int main(){
scanf("%d",&n);
bool f=false;
while(1){
f=!f;
int a;
char inp;
scanf("%d",&a);
inp=getchar();
for(register int i=1;i<=a;i++)c[++tot]=f?'0':'1';
if(inp=='\n')break;
}
for(register int i=0;i<n;i++){
for(register int j=1;j<=n;j++)
putchar(c[i*n+j]);
putchar('\n');
}
return 0;
}
by DARK_LIGHT @ 2019-08-11 11:16:42
好像有输入数据的结尾有空格QAQ