QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#121637 | #4327. Šeširi | jinhaoxian | 14 | 1ms | 3544kb | C++17 | 1.0kb | 2023-07-08 16:11:41 | 2023-07-08 16:11:43 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int n;
int res4[4][8],res5[5][16];
string st4="BCCBBBCC",st5="BCCCBCBCBCBCBBBC";
int main() {
cin>>n;
if (n==4) {
for (int j=0;j<(1<<(n-1));j++) res4[0][j]=st4[j]-'B';
for (int i=1;i<n;i++) {
for (int j=0;j<(1<<(n-1));j++) {
res4[i][(j>>1)|((j&1)<<(n-2))]=res4[i-1][j];
}
}
for (int i=0;i<n;i++) {
for (int j=0;j<(1<<(n-1));j++) if (res4[i][j]==0) cout<<'B';else cout<<'C';
cout<<endl;
}
return 0;
}
if (n==5) {
for (int j=0;j<(1<<(n-1));j++) res5[0][j]=st5[j]-'B';
for (int i=1;i<n;i++) {
for (int j=0;j<(1<<(n-1));j++) {
res5[i][(j>>1)|((j&1)<<(n-2))]=res5[i-1][j];
}
}
for (int i=0;i<n;i++) {
for (int j=0;j<(1<<(n-1));j++) if (res5[i][j]==0) cout<<'B';else cout<<'C';
cout<<endl;
}
return 0;
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 7
Accepted
Test #1:
score: 7
Accepted
time: 1ms
memory: 3388kb
input:
4
output:
BCCBBBCC BCBCCBBC BBCBCCBC BCCBBBCC
result:
ok good plan!
Subtask #2:
score: 7
Accepted
Test #2:
score: 7
Accepted
time: 1ms
memory: 3508kb
input:
5
output:
BCCCBCBCBCBCBBBC BCBBBBBBCCCCCCBC BBBBCCCBCBBBCCCC BBCCCBCCBBCBBBCC BCCCBCBCBCBCBBBC
result:
ok good plan!
Subtask #3:
score: 0
Wrong Answer
Test #3:
score: 0
Wrong Answer
time: 1ms
memory: 3356kb
input:
6
output:
result:
wrong output format Unexpected end of file - token expected
Subtask #4:
score: 0
Wrong Answer
Test #4:
score: 0
Wrong Answer
time: 0ms
memory: 3372kb
input:
7
output:
result:
wrong output format Unexpected end of file - token expected
Subtask #5:
score: 0
Wrong Answer
Test #5:
score: 0
Wrong Answer
time: 1ms
memory: 3360kb
input:
8
output:
result:
wrong output format Unexpected end of file - token expected
Subtask #6:
score: 0
Wrong Answer
Test #6:
score: 0
Wrong Answer
time: 1ms
memory: 3380kb
input:
9
output:
result:
wrong output format Unexpected end of file - token expected
Subtask #7:
score: 0
Wrong Answer
Test #7:
score: 0
Wrong Answer
time: 1ms
memory: 3500kb
input:
10
output:
result:
wrong output format Unexpected end of file - token expected
Subtask #8:
score: 0
Wrong Answer
Test #8:
score: 0
Wrong Answer
time: 1ms
memory: 3404kb
input:
11
output:
result:
wrong output format Unexpected end of file - token expected
Subtask #9:
score: 0
Wrong Answer
Test #9:
score: 0
Wrong Answer
time: 0ms
memory: 3376kb
input:
12
output:
result:
wrong output format Unexpected end of file - token expected
Subtask #10:
score: 0
Wrong Answer
Test #10:
score: 0
Wrong Answer
time: 1ms
memory: 3380kb
input:
13
output:
result:
wrong output format Unexpected end of file - token expected
Subtask #11:
score: 0
Wrong Answer
Test #11:
score: 0
Wrong Answer
time: 1ms
memory: 3488kb
input:
14
output:
result:
wrong output format Unexpected end of file - token expected
Subtask #12:
score: 0
Wrong Answer
Test #12:
score: 0
Wrong Answer
time: 1ms
memory: 3376kb
input:
15
output:
result:
wrong output format Unexpected end of file - token expected
Subtask #13:
score: 0
Wrong Answer
Test #13:
score: 0
Wrong Answer
time: 1ms
memory: 3504kb
input:
16
output:
result:
wrong output format Unexpected end of file - token expected
Subtask #14:
score: 0
Wrong Answer
Test #14:
score: 0
Wrong Answer
time: 1ms
memory: 3376kb
input:
17
output:
result:
wrong output format Unexpected end of file - token expected
Subtask #15:
score: 0
Wrong Answer
Test #15:
score: 0
Wrong Answer
time: 1ms
memory: 3544kb
input:
18
output:
result:
wrong output format Unexpected end of file - token expected