题目传送门
求大佬帮忙!谢谢!
代码
#include <bits/stdc++.h>
using namespace std;
int main()
{
int a,f=0;
cin>>a;
int b[a],d[1000];
for(int c=0;c<a;c++){
cin>>b[c];
f+=b[c];
for(int e=1;e<=b[c];e++){
if(c%2==0){
d[e]=0;
}
else{
d[e]=1;
}
}
}
for(int c=1;c<=f;c++){
cout<<d[c];
if(c%7==0){
cout<<endl;
}
}
return 0;
}
用Dev-C++的话是一堆数字;
用洛谷的在线IDE的话连输出都没了