yzxbt @ 2018-03-02 20:37:47
#include <iostream>
#include <algorithm>
using namespace std;
int a[40005];
int main()
{
int n,i,j,t,w;
cin>>n;
w=1;
i=0;
while(cin>>t)
{
i++;
if(i%2==1)
{
for(j=w;j<=w+t-1;j++)
a[j]=0;
}
if(i%2==0)
{
for(j=w;j<=w+t-1;j++)
a[j]=1;
}
w+=t-1;
}
for(i=1;i<=n*n;i++)
{
cout<<a[i];
if(i%n==0)
cout<<endl;
}
system("PAUSE");
return 0;
}
不输出????????
by Siyuan @ 2018-03-02 20:44:48
你没有写输出……
by Siyuan @ 2018-03-02 20:45:12
不停地cout<<endl有趣吗233333
by 桜Sakura @ 2018-03-02 20:53:56
是啊,没有输出
:)