Stratus8419 @ 2024-02-15 17:58:37
#include <bits/stdc++.h>
using namespace std;
int main()
{
int N = 0;
cin >> N;
bool image[N][N];
int n = 0;
bool is1 = true;
for(int i = 0; i < N; i++)
{
for(int j = 0; j < N; j++)
{
if(n == 0)
{
cin >> n;
is1 = !is1;
}
image[i][j] = is1;
n--;
}
}
for(int i = 0; i < N; i++)
{
for(int j = 0; j < N; j++)
{
cout << image[i][j];
}
cout << endl;
}
return 0;
}
没看出什么问题 提交只有两个AC其他全红
怎么会事呢
by EasonLiang @ 2024-02-15 18:22:28
if 改成 while @Stratus8419