菜狗求助

P1319 压缩技术

NorlandAlice @ 2024-04-28 07:57:38

#include<bits/stdc++.h>
using namespace std;
int main(){
int n,a=0,i=0,s=0,line;
cin>>n;
line=n;
while(a<n*n){
if(s==0){cin>>s;i++;}
if(i%2!=0)cout<<0;
else{cout<<1;}
s--;
a++;
line--;
if(line==0){cout<<endl;line=n;}}
return 0;}

|