QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#76317 | #2540. Build The Grid | Linshey# | WA | 2ms | 3460kb | C++14 | 369b | 2023-02-09 08:36:47 | 2023-02-09 08:36:51 |
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 ? 'W' : 'B');
}
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: 3460kb
input:
3
output:
WWW WBB WBW
result:
wrong answer white cells are not connected