杨靖浩 @ 2020-11-16 17:31:19
#include <iostream>
#include <cstdio>
using namespace std;
const int N = 205;
int n;
int t;
int map[N][N];
int x = 1, y = 1;
bool bj = 0;
int main()
{
scanf("%d", &n);
while ((scanf("%d", &t)!) = EOF)
{
for (int i = 1; i <= t; i++)
{
if (y == n + 1)
{
y = 1;
x++;
}
map[x][y] = bj;
y++;
}
bj = !bj;
}
for (int i = 1; i <= n; i++)
{
for (int j = 1; j <= n; j++)
{
printf("%d ", map[i][j]);
}
printf("\n");
}
return 0;
}
全WA
by __polar_ice @ 2020-11-16 17:39:40
while ((scanf("%d", &t)!) = EOF)
while ((scanf("%d", &t)) != EOF)
by __polar_ice @ 2020-11-16 17:41:22
printf("%d ", map[i][j]);
printf("%d", map[i][j]);