QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#120926#4327. Šeširixtqqwq#7 0ms3812kbC++171.3kb2023-07-07 12:43:092024-07-04 00:28:52

Judging History

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

  • [2024-07-04 00:28:52]
  • 评测
  • 测评结果:7
  • 用时:0ms
  • 内存:3812kb
  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-07 12:43:09]
  • 提交

answer

#include<bits/stdc++.h>

#define pb push_back
#define fi first
#define se second
#define mp make_pair

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef long double ld;

template <typename T> bool chkmin(T &x,T y){return x>y?x=y,1:0;}
template <typename T> bool chkmax(T &x,T y){return x<y?x=y,1:0;}

int readint(){
	int x=0,f=1; char ch=getchar();
	while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
	while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
	return x*f;
}

int n;
int a[105][105];

int main(){
	n=readint();
	string t[4];
	t[0]="11010100";
	t[1]="10001110";
	t[2]="00101011";
	t[3]="01110001";
	for(int i=0;i<4;i++) for(int j=0;j<8;j++) a[i][j]=t[i][j]-'0';
	if(n==4){
		for(int i=0;i<4;i++){
			for(int j=0;j<8;j++) putchar(a[i][j]?'C':'B');
			putchar('\n');
		}
	}
	else if(n==5){
		for(int i=0;i<5;i++){
			for(int j=0;j<16;j++){
				if(i<4) putchar(a[i][j>>1]?'C':'B');
				else{
					int num[2]={0},cor[2]={0};
					for(int k=0;k<4;k++){
						num[(j>>k)&1]++;
						int mask=0;
						for(int l=0;l<4;l++) if(k!=l) mask=mask<<1|((j>>l)&1);
						cor[(j>>k)&1]+=a[k][mask]==((j>>k)&1);
					}
					if(cor[0]<(num[0]+1)/2) putchar('B');
					else putchar('C');
				}
			}
			putchar('\n');
		}
	}
	return 0;
}

详细

Subtask #1:

score: 7
Accepted

Test #1:

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

input:

4

output:

CCBCBCBB
CBBBCCCB
BBCBCBCC
BCCCBBBC

result:

ok good plan!

Subtask #2:

score: 0
Wrong Answer

Test #2:

score: 0
Wrong Answer
time: 0ms
memory: 3512kb

input:

5

output:

CCCCBBCCBBCCBBBB
CCBBBBBBCCCCCCBB
BBBBCCBBCCBBCCCC
BBCCCCCCBBBBBBCC
CBBCCCCBCCCBCCCC

result:

wrong answer your plan fails on CBBBB

Subtask #3:

score: 0
Wrong Answer

Test #3:

score: 0
Wrong Answer
time: 0ms
memory: 3464kb

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

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: 0ms
memory: 3600kb

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: 0ms
memory: 3508kb

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: 0ms
memory: 3572kb

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: 0ms
memory: 3580kb

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

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: 0ms
memory: 3540kb

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: 0ms
memory: 3812kb

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: 0ms
memory: 3528kb

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: 0ms
memory: 3512kb

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: 0ms
memory: 3592kb

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: 0ms
memory: 3764kb

input:

18

output:


result:

wrong output format Unexpected end of file - token expected