QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#399323#2540. Build The GridWindingWA 0ms3844kbC++17745b2024-04-26 10:19:152024-04-26 10:19:16

Judging History

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

  • [2024-04-26 10:19:16]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3844kb
  • [2024-04-26 10:19:15]
  • 提交

answer

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

using i64 = long long;

/*#ifndef ONLINE_JUDGE
#include "test.h"
#else
#define debug(...) 42
#define debug_assert(...) 42
#endif*/

void solve() {
    int n;
    cin >> n;

    vector<vector<char>> a(n, vector<char>(n, 'W'));

    for (int i = 0; i < n - 1; i++) {
        for (int j = n - 1; j >= n - 1 - i; j--) {
            a[i][j] = 'B';
        }
    }

    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            cout << a[i][j];
        }
        cout << '\n';
    }
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int t = 1;
    //cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3836kb

input:

3

output:

WWB
WBB
WWW

result:

ok accepted

Test #2:

score: 0
Accepted
time: 0ms
memory: 3844kb

input:

2

output:

WB
WW

result:

ok accepted

Test #3:

score: -100
Wrong Answer
time: 0ms
memory: 3644kb

input:

4

output:

WWWB
WWBB
WBBB
WWWW

result:

wrong answer there are no white cells around a black cell