QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#594968#2540. Build The Gridgambit#WA 0ms3688kbC++14455b2024-09-28 11:38:452024-09-28 11:38:48

Judging History

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

  • [2024-09-28 11:38:48]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3688kb
  • [2024-09-28 11:38:45]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;

int main() {
    int N; cin >> N;
    for(int i=1;i<=N/2;i++) {
        for(int j=1;j<=N;j++) {
            if(j<=i) cout << 'B';
            else cout << 'W';
        }
        cout << '\n';
        if(N==i*2) break;
        for(int j=1;j<=N;j++) {
            if(j>i) cout << 'B';
            else cout << 'W';
        }
        cout << '\n';
    }
    for(int i=0;i<N;i++) cout << 'W';
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3

output:

BWW
WBB
WWW

result:

wrong answer white cells are not connected