QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#290249#6341. The Last BattleDaiRuiChen0070 33ms3904kbC++172.6kb2023-12-24 16:37:032023-12-24 16:37:04

Judging History

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

  • [2023-12-24 16:37:04]
  • 评测
  • 测评结果:0
  • 用时:33ms
  • 内存:3904kb
  • [2023-12-24 16:37:03]
  • 提交

Anna

#include<bits/stdc++.h>
#include "Anna.h"
using namespace std;
void Anna(int X,int Y,int N,string S) {
	int arr[]={
		47,37,13,37,46,27,67,11,23,54,23,21,46,27,67,11,
		47,33,62,33,51,35,51,11,41,54,41, 5,51,35,51,11,
		34,37,13,37,34,39,36,36,15,15,14,21,20,39,32,32,
		63,33,62,33,48,48,36,36,30,31,30, 5,20,31,32,32,
		28, 1,13, 1,46,27,19,53,55,54,71,68,46,27,19,53,
		28,49,62,49,24,24, 0, 0,41,54,41,68,24,24,29,29,
		34,42,13,60,34,42,19,53,55,18,14,60,20,18,19,53,
		63, 7,62,60,48,48,56,56,30,18,30,60,20,18,29,29,
		47,25,61,25, 8, 8, 8, 8,23, 4,23,21,57,57,57,57,
		47,25,61,25, 6,35,40,40,45, 4, 2,66,45,35, 2,66,
		38,44,61,44,38,39,43,43,15,15,14,21,70,39,43,43,
		63,44,61,44,22,22,40,40,45,31,50,50,45,31,50,50,
		28,10,52,59, 3,10,52,59,55,10,71,59, 3,10,12,59,
		28,49,52,49, 6,17,52,17,26,65,69,65,26,17,12,17,
		38,42,16,16,38,42,16,16,55, 9,14, 9,70, 9,12, 9,
		63, 7,64,64,22,22,56,56,26,58,69,58,26,58,12,58
	};
	int st=X+(Y+8-X)%8*8,v=0;
	if(X==Y) st+=(S.back()=='B'?64:0);--N;
	while(arr[v]!=st) ++v;
	array <array<int,8>,8> M;
	for(int i=0;i<8;++i) for(int j=0;j<8;++j) M[i][j]=0;
	for(int k=0;k<8;++k) M[k][k]=(v>>k)&1;
	if(!N) goto End;
	for(int i=0,k=0;i<8;++i) for(int j=0;j<8;++j) {
		if(i==j||i==X||j==Y) continue;
		M[i][j]=S[k++]-'A';
		if(k==N) goto End;
	}
	End:;
	for(int i=0;i<8;++i) for(int j=0;j<8;++j) if(i!=X&&j!=Y) Paint(i,j,M[i][j]);
}

Bruno

#include<bits/stdc++.h>
#include "Bruno.h"
using namespace std;
string Bruno(int N,vector<vector<int>> T) {
	int arr[]={
		47,37,13,37,46,27,67,11,23,54,23,21,46,27,67,11,
		47,33,62,33,51,35,51,11,41,54,41, 5,51,35,51,11,
		34,37,13,37,34,39,36,36,15,15,14,21,20,39,32,32,
		63,33,62,33,48,48,36,36,30,31,30, 5,20,31,32,32,
		28, 1,13, 1,46,27,19,53,55,54,71,68,46,27,19,53,
		28,49,62,49,24,24, 0, 0,41,54,41,68,24,24,29,29,
		34,42,13,60,34,42,19,53,55,18,14,60,20,18,19,53,
		63, 7,62,60,48,48,56,56,30,18,30,60,20,18,29,29,
		47,25,61,25, 8, 8, 8, 8,23, 4,23,21,57,57,57,57,
		47,25,61,25, 6,35,40,40,45, 4, 2,66,45,35, 2,66,
		38,44,61,44,38,39,43,43,15,15,14,21,70,39,43,43,
		63,44,61,44,22,22,40,40,45,31,50,50,45,31,50,50,
		28,10,52,59, 3,10,52,59,55,10,71,59, 3,10,12,59,
		28,49,52,49, 6,17,52,17,26,65,69,65,26,17,12,17,
		38,42,16,16,38,42,16,16,55, 9,14, 9,70, 9,12, 9,
		63, 7,64,64,22,22,56,56,26,58,69,58,26,58,12,58
	};
	int v=0; string S;
	for(int k=0;k<8;++k) v|=T[k][k]<<k;
	int st=arr[v],X=st%8,Y=(st/8+X)%8;
	if(X==Y) --N;
	if(!N) goto End;
	for(int i=0;i<8;++i) for(int j=0;j<8;++j) {
		if(i==j||i==X||j==Y) continue;
		S+=T[i][j]+'A';
		if((int)S.size()==N) goto End;
	}
	End:;
	if(X==Y) S+=st<64?'A':'B';
	return S;
}

详细

Test #1:

score: 0
Wrong Answer
time: 33ms
memory: 3904kb

Manager to Anna

20000
1 7 1 A
2 3 1 A
0 1 1 A
1 1 1 A
7 4 1 A
2 3 1 A
0 3 1 B
0 7 1 A
4 2 1 B
5 4 1 A
6 0 1 B
7 3 1 A
0 7 1 A
2 3 1 A
1 6 1 A
5 2 1 B
2 7 1 B
6 3 1 A
3 3 1 A
1 7 1 A
2 3 1 A
1 2 1 A
5 3 1 A
3 5 1 A
4 3 1 A
2 3 1 A
4 6 1 B
7 3 1 B
2 3 1 A
4 4 1 A
7 3 1 A
4 5 1 B
0 7 1 A
0 3 1 B
2 0 1 B
4 1 1 A
6 0 1 ...

Anna to Manager

1000000000000000000000000100000000000000010000000
1000000000000000000000000000000000000000100000001
0000000010000000000000000000000000000000000000001
1000000000000000000000000000000000000000100000000
0000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000100000001
...

Manager to Bruno

20000
1 1000000110010100000000000000000000001001000000000000001100000000
1 1001000000000000000011000001000000010000000100000000001000010001
1 1101011101000000001000000100000000000000010000000100000001000001
1 1100000000000001000000000000000000000000010000000000001000000000
1 000010000000100000000000...

Bruno to Manager

A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
B
A
A
A
B
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
B
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
B
A
A
A
A
A
A
A
A
A
...

result:

points 0.0 Accepted: 0