QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#414582#2540. Build The Gridgrass8cow#WA 0ms3716kbC++17230b2024-05-19 10:31:242024-05-19 10:31:26

Judging History

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

  • [2024-05-19 10:31:26]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3716kb
  • [2024-05-19 10:31:24]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
int n;
int main(){
    scanf("%d",&n);
    for(int i=1;i<=n;i++)for(int j=1;j<=n;j++){
        printf("%c",(i+j<=n+1)?'W':'B');
        if(j==n)puts("");
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3716kb

input:

3

output:

WWW
WWB
WBB

result:

wrong answer there are no white cells around a black cell