QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#623138 | #5731. Checkerboard | chalupa | WA | 0ms | 3848kb | C++17 | 850b | 2024-10-09 10:20:52 | 2024-10-09 10:20:52 |
Judging History
answer
#include <iostream>
#include <vector>
#include <string>
int main() {
int R, C, A, B;
std::cin >> R >> C >> A >> B;
std::vector<int> row_heights;
for (int i = 0; i < A; i++) {
int row_height;
std::cin >> row_height;
row_heights.push_back(row_height);
}
std::vector<int> col_widths;
for (int i = 0; i < B; i++) {
int col_width;
std::cin >> col_width;
col_widths.push_back(col_width);
}
bool white = false;
for (int row_height : row_heights) {
for (int zed = 0; zed < row_height; zed++) {
for (int col_width : col_widths) {
for (int a = 0; a < col_width; a++) {
std::cout << (white ? 'W' : 'B');
}
if (C != 1) {
white = !white;
}
}
std::cout << "\n";
}
white = !white;
}
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3544kb
input:
6 5 3 2 1 2 3 3 2
output:
BBBWW WWWBB WWWBB BBBWW BBBWW BBBWW
result:
ok 6 lines
Test #2:
score: 0
Accepted
time: 0ms
memory: 3548kb
input:
4 4 2 2 1 3 3 1
output:
BBBW WWWB WWWB WWWB
result:
ok 4 lines
Test #3:
score: 0
Accepted
time: 0ms
memory: 3568kb
input:
20 20 4 14 5 2 9 4 1 2 1 1 1 1 1 1 1 1 1 1 4 3
output:
BWWBWBWBWBWBWBBBBWWW BWWBWBWBWBWBWBBBBWWW BWWBWBWBWBWBWBBBBWWW BWWBWBWBWBWBWBBBBWWW BWWBWBWBWBWBWBBBBWWW WBBWBWBWBWBWBWWWWBBB WBBWBWBWBWBWBWWWWBBB BWWBWBWBWBWBWBBBBWWW BWWBWBWBWBWBWBBBBWWW BWWBWBWBWBWBWBBBBWWW BWWBWBWBWBWBWBBBBWWW BWWBWBWBWBWBWBBBBWWW BWWBWBWBWBWBWBBBBWWW BWWBWBWBWBWBWBBBBWWW BWWBWB...
result:
ok 20 lines
Test #4:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
50 2 43 2 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 3 1 2 1 1 1 1 3 1 1 1 1 1 1 1
output:
BW WB BW BW WB BW WB BW WB BW WB BW WB BW WB BW WB BW WB BW WB BW WB BW WB BW BW WB BW WB BW WB BW BW BW WB BW BW WB BW WB BW WB WB WB BW WB BW WB BW
result:
ok 50 lines
Test #5:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
1 50 1 5 1 1 10 11 22 6
output:
BWWWWWWWWWWBBBBBBBBBBBWWWWWWWWWWWWWWWWWWWWWWBBBBBB
result:
ok single line: 'BWWWWWWWWWWBBBBBBBBBBBWWWWWWWWWWWWWWWWWWWWWWBBBBBB'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
50 1 17 1 4 1 1 1 6 2 3 1 3 5 1 4 5 1 6 2 4 1
output:
B B B B W B W B B B B B B W W B B B W B B B W W W W W B W W W W B B B B B W B B B B B B W W B B B B
result:
ok 50 lines
Test #7:
score: -100
Wrong Answer
time: 0ms
memory: 3848kb
input:
2 50 2 3 1 1 14 18 18
output:
BBBBBBBBBBBBBBWWWWWWWWWWWWWWWWWWBBBBBBBBBBBBBBBBBB BBBBBBBBBBBBBBWWWWWWWWWWWWWWWWWWBBBBBBBBBBBBBBBBBB
result:
wrong answer 2nd lines differ - expected: 'WWWWWWWWWWWWWWBBBBBBBBBBBBBBBBBBWWWWWWWWWWWWWWWWWW', found: 'BBBBBBBBBBBBBBWWWWWWWWWWWWWWWWWWBBBBBBBBBBBBBBBBBB'