QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#76319 | #2540. Build The Grid | Linshey# | WA | 2ms | 3604kb | C++14 | 426b | 2023-02-09 08:44:27 | 2023-02-09 08:44:29 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std; const int maxn = 5e2 + 5;
int n;
char s[maxn][maxn];
int main()
{
scanf("%d", &n);
for (int i = 1; i < n; i++)
{
for (int j = i; j < n; j++) s[i][j] = s[j][i] = (i & 1 ? 'B' : 'W');
}
for (int i = 1; i <= n; i++) s[n][i] = s[i][n] = 'W';
for (int i = 1; i <= n; i++, puts("")) for (int j = 1; j <= n; j++) putchar(s[i][j]);
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 2ms
memory: 3604kb
input:
3
output:
BBW BWW WWW
result:
wrong answer there are no white cells around a black cell