回青绝影 @ 2018-02-17 15:11:57
#include<bits/stdc++.h>
using namespace std;
int main(){
int n,m,k,a=0,b;
scanf("%d",&n);
k=n*n;
while(k>0){
scanf("%d",&m);
for (int i=1;i<=m;i++){
b++;
printf("%d",a);
if (b%n==0) printf("\n");
k--;
}
a++;
a%=2;
}
return 0;
}
by Chino @ 2018-02-17 16:28:31
没看到b初始化了,b++是用来干什么的..