样例过了,居然全WA???
查看原帖
样例过了,居然全WA???
895633
封禁用户楼主2022/12/14 19:43
#include <bits/stdc++.h>
using namespace std;
int main()
{
    int i,j;
    bool a[105];
    int n;
    cin >> n;
    cout << n << endl;
    for (i = 1; i <= n; i++)
    {
        for (j = 1; j <= n; j++)
        {
            if (j != i)
            {
                if (a[j])
                {
                    a[j] = 0;
                }
                else
                {
                    a[j] = 1;
                }
            }
        }
        for (j = 1; j <= n; j++)
        {
            cout << a[j];
        }
        cout << endl;
    }
    return 0;
}
2022/12/14 19:43
加载中...