QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#76319#2540. Build The GridLinshey#WA 2ms3604kbC++14426b2023-02-09 08:44:272023-02-09 08:44:29

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:44:29]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:3604kb
  • [2023-02-09 08:44:27]
  • 提交

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