QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#415779 | #4327. Šeširi | Huasushis | 14 | 0ms | 3692kb | C++17 | 385b | 2024-05-21 10:10:59 | 2024-05-21 10:11:00 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int n;
char s[20];
int main() {
cin >> n;
for (int id = 1; id <= n; ++id) {
for (int i = 0; i < (1 << (n - 1)); ++i) {
int tot = 0, ys = 0;
for (int j = 0; j < n - 1; ++j) {
if ((i >> j) & 1) ++ys;
else tot += ys;
}
s[i] = "BC"[(tot + id) & 1];
}
cout << s << '\n';
}
return 0;
}
詳細信息
Subtask #1:
score: 7
Accepted
Test #1:
score: 7
Accepted
time: 0ms
memory: 3608kb
input:
4
output:
CCBCCBCC BBCBBCBB CCBCCBCC BBCBBCBB
result:
ok good plan!
Subtask #2:
score: 7
Accepted
Test #2:
score: 7
Accepted
time: 0ms
memory: 3692kb
input:
5
output:
CBCCBBCBCCBCCBCC BCBBCCBCBBCBBCBB CBCCBBCBCCBCCBCC BCBBCCBCBBCBBCBB CBCCBBCBCCBCCBCC
result:
ok good plan!
Subtask #3:
score: 0
Time Limit Exceeded
Test #3:
score: 0
Time Limit Exceeded
input:
6
output:
result:
Subtask #4:
score: 0
Time Limit Exceeded
Test #4:
score: 0
Time Limit Exceeded
input:
7
output:
result:
Subtask #5:
score: 0
Time Limit Exceeded
Test #5:
score: 0
Time Limit Exceeded
input:
8
output:
result:
Subtask #6:
score: 0
Time Limit Exceeded
Test #6:
score: 0
Time Limit Exceeded
input:
9
output:
result:
Subtask #7:
score: 0
Time Limit Exceeded
Test #7:
score: 0
Time Limit Exceeded
input:
10
output:
result:
Subtask #8:
score: 0
Time Limit Exceeded
Test #8:
score: 0
Time Limit Exceeded
input:
11
output:
result:
Subtask #9:
score: 0
Time Limit Exceeded
Test #9:
score: 0
Time Limit Exceeded
input:
12
output:
CCBCCBCCBCBBCCBCCBCCBBCBCCBCCBCCBCBBCCBCBBCBBCBBCCBCCBCCBCBBCCBCCBCCBBCBCCBCCBCCBBCBBCBBCBCCBBCBCCBCCBCCBCBBCCBCCBCCBBCBCCBCCBCCBCBBCCBCBBCBBCBBCCBCCBCCBCBBCCBCBBCBBCBBCBCCBBCBBCBBCCBCBBCBBCBBCCBCCBCCBCBBCCBCCBCCBBCBCCBCCBCCBCBBCCBCBBCBBCBBCCBCCBCCBCBBCCBCCBCCBBCBCCBCCBCCBBCBBCBBCBCCBBCBCCBCCBCCBCBB...
result:
Subtask #10:
score: 0
Runtime Error
Test #10:
score: 0
Runtime Error
input:
13
output:
result:
Subtask #11:
score: 0
Runtime Error
Test #11:
score: 0
Runtime Error
input:
14
output:
result:
Subtask #12:
score: 0
Runtime Error
Test #12:
score: 0
Runtime Error
input:
15
output:
result:
Subtask #13:
score: 0
Runtime Error
Test #13:
score: 0
Runtime Error
input:
16
output:
result:
Subtask #14:
score: 0
Runtime Error
Test #14:
score: 0
Runtime Error
input:
17
output:
result:
Subtask #15:
score: 0
Runtime Error
Test #15:
score: 0
Runtime Error
input:
18