RT,为此我还下载了一次案例:

(0分)Code:
#include <bits/stdc++.h>
using namespace std;
const int N=102;
int a[N+1];
int main()
{
int n;
cin >> n;
for(int i=1;i<=n;i++)
{
for (int j=1;j<=n;j++)
{
if (j != i)
{
if (a[j]) a[j] = 0;
else a[j] = 1;
}
}
for (int j=1;j<=n;j++)
{
cout << a[j];
}
cout << endl ;
}
return 0;
}