QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#120959 | #4327. Šeširi | platelet# | 0 | 11ms | 5792kb | C++17 | 1.3kb | 2023-07-07 12:55:57 | 2024-07-04 00:29:15 |
Judging History
answer
#include <bits/stdc++.h>
#define rep(i, l, r) for(int i = (l); i <= (r); i++)
#define per(i, r, l) for(int i = (r); i >= (l); i--)
#define mem(a, b) memset(a, b, sizeof a)
#define For(i, l, r) for(int i = (l), i##e = (r); i < i##e; i++)
#define pb push_back
#define eb emplace_back
#define SZ(x) int(x.size())
#define all(x) x.begin(), x.end()
using namespace std;
using ll = long long;
template<class T> inline T& cmin(T& a, const T& b) { if(b < a) a = b; return a; }
template<class T> inline T& cmax(T& a, const T& b) { if(a < b) a = b; return a; }
template<class... Args> void print(Args&&... args) {
((cout << args << ' '), ...);
}
template<class... Args> void println(Args&&... args) {
print(args...), cout << endl;
}
bool a[18][1 << 17 | 8];
int main() {
cin.tie(0)->sync_with_stdio(0);
int n;
cin >> n;
For(S, 0, 1 << n - 1) {
auto g = [&](int i) {
return S >> i & 1;
};
a[0][S] = g(0);
a[1][S] = !g(0);
a[2][S] = g(2);
a[3][S] = !g(2);
if(g(0) == 0 && g(1) == 1)
a[2][S] = a[3][S] = 0;
if(g(0) == 1 && g(1) == 0)
a[2][S] = a[3][S] = 1;
}
For(i, 0, n) {
For(S, 0, 1 << n - 1)
cout << "BC"[a[i][S]];
cout << '\n';
}
}
詳細信息
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3520kb
input:
4
output:
BCBCBCBC CBCBCBCB BCBBCCBC CCBCBCBB
result:
wrong answer your plan fails on CCCB
Subtask #2:
score: 0
Wrong Answer
Test #2:
score: 0
Wrong Answer
time: 0ms
memory: 3720kb
input:
5
output:
BCBCBCBCBCBCBCBC CBCBCBCBCBCBCBCB BCBBCCBCBCBBCCBC CCBCBCBBCCBCBCBB BBBBBBBBBBBBBBBB
result:
wrong answer your plan fails on CCCBB
Subtask #3:
score: 0
Wrong Answer
Test #3:
score: 0
Wrong Answer
time: 0ms
memory: 3628kb
input:
6
output:
BCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBC CBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCB BCBBCCBCBCBBCCBCBCBBCCBCBCBBCCBC CCBCBCBBCCBCBCBBCCBCBCBBCCBCBCBB BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
result:
wrong answer your plan fails on CCCBBB
Subtask #4:
score: 0
Wrong Answer
Test #4:
score: 0
Wrong Answer
time: 1ms
memory: 5604kb
input:
7
output:
BCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBC CBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCB BCBBCCBCBCBBCCBCBCBBCCBCBCBBCCBCBCBBCCBCBCBBCCBCBCBBCCBCBCBBCCBC CCBCBCBBCCBCBCBBCCBCBCBBCCBCBCBBCCBCBCBBCCBCBCBBCCBCBCBBCCBCBCBB BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB...
result:
wrong answer your plan fails on CCCBBBB
Subtask #5:
score: 0
Wrong Answer
Test #5:
score: 0
Wrong Answer
time: 0ms
memory: 3528kb
input:
8
output:
BCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBC CBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCB BCBBCCBCBCBBCCBCBCBBCCBCBCBBCCBCBCBBCCBCBC...
result:
wrong answer your plan fails on CCCBBBBB
Subtask #6:
score: 0
Wrong Answer
Test #6:
score: 0
Wrong Answer
time: 0ms
memory: 3720kb
input:
9
output:
BCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBC CBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBC...
result:
wrong answer your plan fails on CCCBBBBBB
Subtask #7:
score: 0
Wrong Answer
Test #7:
score: 0
Wrong Answer
time: 1ms
memory: 5600kb
input:
10
output:
BCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBC...
result:
wrong answer your plan fails on CCCBBBBBBB
Subtask #8:
score: 0
Wrong Answer
Test #8:
score: 0
Wrong Answer
time: 0ms
memory: 3572kb
input:
11
output:
BCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBC...
result:
wrong answer your plan fails on CCCBBBBBBBB
Subtask #9:
score: 0
Wrong Answer
Test #9:
score: 0
Wrong Answer
time: 0ms
memory: 3716kb
input:
12
output:
BCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBC...
result:
wrong answer your plan fails on CCCBBBBBBBBB
Subtask #10:
score: 0
Wrong Answer
Test #10:
score: 0
Wrong Answer
time: 1ms
memory: 3632kb
input:
13
output:
BCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBC...
result:
wrong answer your plan fails on CCCBBBBBBBBBB
Subtask #11:
score: 0
Wrong Answer
Test #11:
score: 0
Wrong Answer
time: 1ms
memory: 3600kb
input:
14
output:
BCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBC...
result:
wrong answer your plan fails on CCCBBBBBBBBBBB
Subtask #12:
score: 0
Wrong Answer
Test #12:
score: 0
Wrong Answer
time: 2ms
memory: 5792kb
input:
15
output:
BCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBC...
result:
wrong answer your plan fails on CCCBBBBBBBBBBBB
Subtask #13:
score: 0
Wrong Answer
Test #13:
score: 0
Wrong Answer
time: 4ms
memory: 3772kb
input:
16
output:
BCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBC...
result:
wrong answer your plan fails on CCCBBBBBBBBBBBBB
Subtask #14:
score: 0
Wrong Answer
Test #14:
score: 0
Wrong Answer
time: 5ms
memory: 3960kb
input:
17
output:
BCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBC...
result:
wrong answer your plan fails on CCCBBBBBBBBBBBBBB
Subtask #15:
score: 0
Wrong Answer
Test #15:
score: 0
Wrong Answer
time: 11ms
memory: 4216kb
input:
18
output:
BCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBC...
result:
wrong answer your plan fails on CCCBBBBBBBBBBBBBBB