QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#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]);
}
Details
Tip: Click on the bar to expand more detailed information
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