QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#569882 | #4327. Šeširi | Williamxzh | 0 | 4ms | 4108kb | C++23 | 440b | 2024-09-17 11:47:23 | 2024-09-17 11:47:24 |
answer
#include <bits/stdc++.h>
#define il inline
using namespace std;
const int N=18;
int n,S,pc[1<<N];
int main(){
scanf("%d",&n);S=(1<<(n-1));
for(int i=1;i<S;++i) pc[i]=pc[i-(i&-i)]+1;
for(int i=1;i<=(n/2);++i){
for(int j=0;j<S;++j) putchar('B'+(pc[j]&1));
puts("");
}
for(int i=(n/2)+1;i<=n;++i){
for(int j=0;j<S;++j) putchar('C'-(pc[j]&1));
puts("");
}
return 0;
}
詳細信息
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3772kb
input:
4
output:
BCCBCBBC BCCBCBBC CBBCBCCB CBBCBCCB
result:
wrong answer your plan fails on CCBB
Subtask #2:
score: 0
Wrong Answer
Test #2:
score: 0
Wrong Answer
time: 0ms
memory: 3792kb
input:
5
output:
BCCBCBBCCBBCBCCB BCCBCBBCCBBCBCCB CBBCBCCBBCCBCBBC CBBCBCCBBCCBCBBC CBBCBCCBBCCBCBBC
result:
wrong answer your plan fails on CCBBB
Subtask #3:
score: 0
Wrong Answer
Test #3:
score: 0
Wrong Answer
time: 0ms
memory: 3780kb
input:
6
output:
BCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBC BCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBC BCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBC CBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCB CBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCB CBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCB
result:
wrong answer your plan fails on CCBBBB
Subtask #4:
score: 0
Wrong Answer
Test #4:
score: 0
Wrong Answer
time: 0ms
memory: 3712kb
input:
7
output:
BCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCB BCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCB BCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCB CBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBC CBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBC...
result:
wrong answer your plan fails on CCBBBBB
Subtask #5:
score: 0
Wrong Answer
Test #5:
score: 0
Wrong Answer
time: 0ms
memory: 3640kb
input:
8
output:
BCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBC BCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBC BCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBC...
result:
wrong answer your plan fails on CCBBBBBB
Subtask #6:
score: 0
Wrong Answer
Test #6:
score: 0
Wrong Answer
time: 0ms
memory: 3864kb
input:
9
output:
BCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCB BCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCC...
result:
wrong answer your plan fails on CCBBBBBBB
Subtask #7:
score: 0
Wrong Answer
Test #7:
score: 0
Wrong Answer
time: 0ms
memory: 3584kb
input:
10
output:
BCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBC...
result:
wrong answer your plan fails on CCBBBBBBBB
Subtask #8:
score: 0
Wrong Answer
Test #8:
score: 0
Wrong Answer
time: 0ms
memory: 3636kb
input:
11
output:
BCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBC...
result:
wrong answer your plan fails on CCBBBBBBBBB
Subtask #9:
score: 0
Wrong Answer
Test #9:
score: 0
Wrong Answer
time: 0ms
memory: 3856kb
input:
12
output:
BCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBC...
result:
wrong answer your plan fails on CCBBBBBBBBBB
Subtask #10:
score: 0
Wrong Answer
Test #10:
score: 0
Wrong Answer
time: 1ms
memory: 3856kb
input:
13
output:
BCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBC...
result:
wrong answer your plan fails on CCBBBBBBBBBBB
Subtask #11:
score: 0
Wrong Answer
Test #11:
score: 0
Wrong Answer
time: 1ms
memory: 3628kb
input:
14
output:
BCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBC...
result:
wrong answer your plan fails on CCBBBBBBBBBBBB
Subtask #12:
score: 0
Wrong Answer
Test #12:
score: 0
Wrong Answer
time: 1ms
memory: 3708kb
input:
15
output:
BCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBC...
result:
wrong answer your plan fails on CCBBBBBBBBBBBBB
Subtask #13:
score: 0
Wrong Answer
Test #13:
score: 0
Wrong Answer
time: 0ms
memory: 3860kb
input:
16
output:
BCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBC...
result:
wrong answer your plan fails on CCBBBBBBBBBBBBBB
Subtask #14:
score: 0
Wrong Answer
Test #14:
score: 0
Wrong Answer
time: 4ms
memory: 3984kb
input:
17
output:
BCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBC...
result:
wrong answer your plan fails on CCBBBBBBBBBBBBBBB
Subtask #15:
score: 0
Wrong Answer
Test #15:
score: 0
Wrong Answer
time: 2ms
memory: 4108kb
input:
18
output:
BCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBCBBCBCCBBCCBCBBCBCCBCBBCCBBCBCCBBCCBCBBCCBBC...
result:
wrong answer your plan fails on CCBBBBBBBBBBBBBBBB