QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#100277#6341. The Last Battlezhouhuanyi0 115ms3884kbC++232.6kb2023-04-25 14:11:142023-04-25 14:11:16

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-04-25 14:11:16]
  • 评测
  • 测评结果:0
  • 用时:115ms
  • 内存:3884kb
  • [2023-04-25 14:11:14]
  • 提交

Anna

#include "Anna.h"
#include<iostream>
#include<cstdio>
#include<string>
#define SN 8
#define M 14
#define K 64
using namespace std;
namespace
{
    struct reads
    {
	int x,y;
    };
    reads tong[M+1];
    int num[3],c[SN+1][SN+1],length,st[K+1]={0,0,31,230,249,1322,1333,1484,1491,2627,2652,2725,2746,5743,5744,5769,5782,9029,9050,9123,9148,11273,11286,11503,11504,14380,14387,14538,14549,16226,16253,16260,16283};
    bool used[SN+1][SN+1];
}
void Anna(int X,int Y,int N,std::string S)
{
    long long res=0;
    int ps;
    length=0;
    for (int i=0;i<=7;++i)
	for (int j=0;j<=7;++j)
	    c[i][j]=used[i][j]=0;
    for (int i=0;i<N;++i)
	if (S[i]=='B')
	    res|=(1ll<<i);
    for (int i=0;i<=2;++i)
	for (int j=0;j<=7;++j)
	    if (length+1<=M)
		tong[++length]=(reads){j,(i+j)%8},used[j][(i+j)%8]=1;
    ps=((X<<3)|Y)+1;
    for (int i=1;i<=length;++i) c[tong[i].x][tong[i].y]=(st[ps]>>(i-1))&1;
    for (int i=0;i<=7;++i)
	for (int j=0;j<=7;++j)
	    if (i!=X&&j!=Y&&!used[i][j])
		c[i][j]=res&1,res>>=1;
    for (int i=0;i<=7;++i)
	for (int j=0;j<=7;++j)
	    if (i!=X&&j!=Y)
		Paint(i,j,c[i][j]);
    return;
}

Bruno

#include "Bruno.h"
#include<iostream>
#include<cstdio>
#include<vector>
#include<string>
#define SN 8
#define M 14
#define K 64
using namespace std;
namespace
{
    struct reads
    {
	int x,y;
    };
    reads tong[M+1];
    int c[SN+1][SN+1],length,st[K+1]={0,0,31,230,249,1322,1333,1484,1491,2627,2652,2725,2746,5743,5744,5769,5782,9029,9050,9123,9148,11273,11286,11503,11504,14380,14387,14538,14549,16226,16253,16260,16283};
    bool used[SN+1][SN+1];
}
std::string Bruno(int N,std::vector<std::vector<int>>T)
{
    string s;
    long long res=0;
    int ps,X,Y,rst=0,dst;
    bool op;
    length=0;
    for (int i=0;i<=7;++i)
	for (int j=0;j<=7;++j)
	    used[i][j]=0;
    for (int i=0;i<=2;++i)
	for (int j=0;j<=7;++j)
	    if (length+1<=M)
		tong[++length]=(reads){j,(i+j)%8},used[j][(i+j)%8]=1;
    for (int i=1;i<=length;++i) rst|=(T[tong[i].x][tong[i].y]<<(i-1));
    for (int i=0;i<8;++i)
	for (int j=0;j<8;++j)
	{
	    dst=0;
	    for (int k=1;k<=length;++k)
		if (tong[k].x!=i&&tong[k].y!=j)
		    dst|=(1<<(k-1));
	    for (int k=1;k<=K;++k)
	    {
		op=1;
		for (int t=1;t<=length;++t)
		    if (tong[t].x!=i&&tong[t].y!=j)
			op&=(((rst>>(t-1))&1)==((st[k]>>(t-1))&1));
		if ((rst&dst)==(st[k]&dst)) ps=k;
	    }
	}
    X=(ps-1)>>3,Y=(ps-1)&7;
    for (int i=7;i>=0;--i)
	for (int j=7;j>=0;--j)
	    if (i!=X&&j!=Y&&!used[i][j])
		res=(res<<1)|T[i][j];
    for (int i=0;i<N;++i) s=s+((!(res&(1ll<<i)))?'A':'B');
    return s;
}

详细

Test #1:

score: 0
Wrong Answer
time: 115ms
memory: 3884kb

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

0000000001100000000000000110000000000000000000000
0100000001000000000000001000000011000000000000001
0000000010000000100000001000000000000000000000000
0000000010000000110000001000000000000000100000000
0000000000000000000000000000000000000000000000000
0100000001000000000000001000000011000000000000001
...

Manager to Bruno

20000
1 0000000110010100001100000000000000001101000000000000000100000000
1 0101000000100000000011000001000000011000000101100000000000010001
1 1101011101000000001000000101000000001000010000000100000001000000
1 0100000000000001001000000001100000001000010000000000001000000000
1 000010000000100000000000...

Bruno to Manager

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

result:

points 0.0 Accepted: 0