QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#76317#2540. Build The GridLinshey#WA 2ms3460kbC++14369b2023-02-09 08:36:472023-02-09 08:36:51

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-02-09 08:36:51]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:3460kb
  • [2023-02-09 08:36:47]
  • 提交

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