natie @ 2024-02-23 20:13:17
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,cnt=0,a,pd=0,cnt2=0;
cin>>n;
while(cnt<=n*n)
{
cin>>a;
cnt+=a;
if(pd)
{
for(int i=1;i<=a;i++)
{
if(cnt2%7==0)
{
cout<<endl;
}
cout<<"1";
cnt2++;
}
pd=0;
}
else
{
for(int i=1;i<=a;i++)
{
if(cnt2%7==0)
{
cout<<endl;
}
cout<<"0";
cnt2++;
}
pd=1;
}
}
return 0;
}
求助!
by BGM114514 @ 2024-02-23 20:18:27
是膜n,不是膜7
by natie @ 2024-02-23 20:29:32
@BGM114514
非常感谢