QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#525272#4327. Šeširilin1991122100 ✓57ms3776kbC++141.1kb2024-08-20 15:11:232024-08-20 15:11:24

Judging History

你现在查看的是最新测评结果

  • [2024-08-20 15:11:24]
  • 评测
  • 测评结果:100
  • 用时:57ms
  • 内存:3776kb
  • [2024-08-20 15:11:23]
  • 提交

answer

#include<bits/stdc++.h>
#define ls (p<<1)
#define rs (p<<1|1)
#define se second
#define fi first
using namespace std;
using ll=long long;
using pii=pair<int,int>;
using pil=pair<int,ll>;
using pli=pair<ll,int>;
using pll=pair<ll,ll>;
using i128=__int128_t;
const int N=2e5+3,P=998244353;
// const ll INF=0x3f3f3f3f3f3f3f3f;
const int INF=0x3f3f3f3f;
template<class T1,class T2>void ckmn(T1 &x,T2 y){if(x>y)x=y;}
template<class T1,class T2>void ckmx(T1 &x,T2 y){if(x<y)x=y;}
template<class T1,class T2>void add(T1 &x,T2 y){if((x+=y)>=P)x-=P;}
template<class T1,class T2>void dlt(T1 &x,T2 y){if((x-=y)<0)x+=P;}
ll fp(ll a,ll b=P-2){ll ans=1;for(;b;b>>=1,a=a*a%P)if(b&1)ans=ans*a%P;return ans;}
int n;

int main(){
    // freopen(".in","r",stdin);
    // freopen(".out","w",stdout);
    int u,v,w,x,y,z;
    ios::sync_with_stdio(0);
    cin.tie(0);cout.tie(0);
    cin>>n;
    int s=n&1?0x5555555:0xaaaaaaaa;
    for(int i=0;i<n;++i,puts(""))
        for(int j=0;j<1<<n-1;++j)
            printf("%c","BC"[__builtin_parity(j&s)^(i&1)]);           
    return 0;
}

詳細信息

Subtask #1:

score: 7
Accepted

Test #1:

score: 7
Accepted
time: 0ms
memory: 3776kb

input:

4

output:

BBCCBBCC
CCBBCCBB
BBCCBBCC
CCBBCCBB

result:

ok good plan!

Subtask #2:

score: 7
Accepted

Test #2:

score: 7
Accepted
time: 0ms
memory: 3616kb

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: 3700kb

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: 3704kb

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: 3704kb

input:

8

output:

BBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCC
CCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBB
BBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBB...

result:

ok good plan!

Subtask #6:

score: 7
Accepted

Test #6:

score: 7
Accepted
time: 0ms
memory: 3624kb

input:

9

output:

BCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCB
CBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBC...

result:

ok good plan!

Subtask #7:

score: 7
Accepted

Test #7:

score: 7
Accepted
time: 1ms
memory: 3620kb

input:

10

output:

BBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCC...

result:

ok good plan!

Subtask #8:

score: 7
Accepted

Test #8:

score: 7
Accepted
time: 1ms
memory: 3696kb

input:

11

output:

BCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCB...

result:

ok good plan!

Subtask #9:

score: 7
Accepted

Test #9:

score: 7
Accepted
time: 1ms
memory: 3688kb

input:

12

output:

BBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCC...

result:

ok good plan!

Subtask #10:

score: 7
Accepted

Test #10:

score: 7
Accepted
time: 2ms
memory: 3752kb

input:

13

output:

BCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCB...

result:

ok good plan!

Subtask #11:

score: 6
Accepted

Test #11:

score: 6
Accepted
time: 3ms
memory: 3648kb

input:

14

output:

BBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCC...

result:

ok good plan!

Subtask #12:

score: 6
Accepted

Test #12:

score: 6
Accepted
time: 6ms
memory: 3756kb

input:

15

output:

BCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCB...

result:

ok good plan!

Subtask #13:

score: 6
Accepted

Test #13:

score: 6
Accepted
time: 6ms
memory: 3748kb

input:

16

output:

BBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCC...

result:

ok good plan!

Subtask #14:

score: 6
Accepted

Test #14:

score: 6
Accepted
time: 28ms
memory: 3684kb

input:

17

output:

BCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCBBCBCBCBCCBCBBCBCCBCBCBCBBCBCCBCB...

result:

ok good plan!

Subtask #15:

score: 6
Accepted

Test #15:

score: 6
Accepted
time: 57ms
memory: 3708kb

input:

18

output:

BBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBBBCCBBCCCCBBCCBBCCBBCCBBBBCC...

result:

ok good plan!

Extra Test:

score: 0
Extra Test Passed