QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#525312 | #4327. Šeširi | lin1991122 | 100 ✓ | 57ms | 1612kb | C++14 | 209b | 2024-08-20 15:27:23 | 2024-08-20 15:27:24 |
Judging History
answer
#include<stdio.h>
int main(){
int n,i,j,s; scanf("%d",&n);
s=n&1?0x55555555:0xaaaaaaaa;
for(i=0;i<n;++i,puts("")) for(j=0;j<1<<n-1;++j)
printf("%c","BC"[__builtin_parity(j&s)^i&1]);
}
詳細信息
Subtask #1:
score: 7
Accepted
Test #1:
score: 7
Accepted
time: 0ms
memory: 1480kb
input:
4
output:
BBCCBBCC CCBBCCBB BBCCBBCC CCBBCCBB
result:
ok good plan!
Subtask #2:
score: 7
Accepted
Test #2:
score: 7
Accepted
time: 0ms
memory: 1556kb
input:
5
output:
BCBCCBCBBCBCCBCB CBCBBCBCCBCBBCBC BCBCCBCBBCBCCBCB CBCBBCBCCBCBBCBC BCBCCBCBBCBCCBCB
result:
ok good plan!
Subtask #3:
score: 7
Accepted
Test #3:
score: 7
Accepted
time: 0ms
memory: 1524kb
input:
6
output:
BBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBB CCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCC BBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBB CCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCC BBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBB CCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCC
result:
ok good plan!
Subtask #4:
score: 7
Accepted
Test #4:
score: 7
Accepted
time: 0ms
memory: 1476kb
input:
7
output:
BCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBC CBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCB BCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBC CBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCB BCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCB...
result:
ok good plan!
Subtask #5:
score: 7
Accepted
Test #5:
score: 7
Accepted
time: 0ms
memory: 1516kb
input:
8
output:
BBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCC CCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBB BBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBB...
result:
ok good plan!
Subtask #6:
score: 7
Accepted
Test #6:
score: 7
Accepted
time: 0ms
memory: 1472kb
input:
9
output:
BCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCB CBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBC...
result:
ok good plan!
Subtask #7:
score: 7
Accepted
Test #7:
score: 7
Accepted
time: 0ms
memory: 1464kb
input:
10
output:
BBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCC...
result:
ok good plan!
Subtask #8:
score: 7
Accepted
Test #8:
score: 7
Accepted
time: 0ms
memory: 1612kb
input:
11
output:
BCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCB...
result:
ok good plan!
Subtask #9:
score: 7
Accepted
Test #9:
score: 7
Accepted
time: 0ms
memory: 1536kb
input:
12
output:
BBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCC...
result:
ok good plan!
Subtask #10:
score: 7
Accepted
Test #10:
score: 7
Accepted
time: 1ms
memory: 1608kb
input:
13
output:
BCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCB...
result:
ok good plan!
Subtask #11:
score: 6
Accepted
Test #11:
score: 6
Accepted
time: 3ms
memory: 1472kb
input:
14
output:
BBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCC...
result:
ok good plan!
Subtask #12:
score: 6
Accepted
Test #12:
score: 6
Accepted
time: 6ms
memory: 1548kb
input:
15
output:
BCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCB...
result:
ok good plan!
Subtask #13:
score: 6
Accepted
Test #13:
score: 6
Accepted
time: 13ms
memory: 1584kb
input:
16
output:
BBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCC...
result:
ok good plan!
Subtask #14:
score: 6
Accepted
Test #14:
score: 6
Accepted
time: 27ms
memory: 1568kb
input:
17
output:
BCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCB...
result:
ok good plan!
Subtask #15:
score: 6
Accepted
Test #15:
score: 6
Accepted
time: 57ms
memory: 1604kb
input:
18
output:
BBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCC...
result:
ok good plan!
Extra Test:
score: 0
Extra Test Passed