WA求助
查看原帖
WA求助
451850
李逸然123楼主2022/10/3 20:10

代码如下:

#include<bits/stdc++.h>
using namespace std;
bool a[105];
int main()
{
	int i,j,n;
	cin>>n;
	cout<<n<<endl;
	for(i=1;i<=n;i++)
	{
		for(j=1;j<=n;j++)
			if(j!=i) a[j]=!a[j];
		for(j=1;j<=n;j++)
		{
			if(a[i]==true) cout<<1;
			else cout<<0;
		}
		cout<<endl;	
	}
	return 0;
}

看了好久也没看出来,求助

2022/10/3 20:10
加载中...