QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#137956#6341. The Last BattleWonderfulWhale#0 0ms0kbC++172.4kb2023-08-10 19:45:142024-07-04 01:32:53

Judging History

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

  • [2024-07-04 01:32:53]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:0kb
  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-08-10 19:45:14]
  • 提交

Anna

#include"Anna.h"
#include<bits/stdc++.h>
using namespace std;

#define int64_t int
#define pb push_back
#define pii pair<int, int>
#define st first
#define nd second
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()

int X, Y;
bool vis[8][8];

void paint(int x, int y, int c) {
	//cerr << "painting: "<< x << " " << y << " "<< c << "\n";
	if(x==X||y==Y) return;
	vis[x][y] = true;
	Paint(x, y, c);
}

void Anna(int x, int y, int n, string s) {

	//cerr << "anna started\n";

	X = x;
	Y = y;
	bool x1 = x&1;
	bool x2 = x&2;
	bool x3 = x&4;
	bool y1 = y&1;
	bool y2 = y&2;
	bool y3 = y&4;

	paint(0, 0, x1);
	paint(2, 2, x1);
	paint(4, 4, x1);
	paint(6, 6, x1);

	if(x1) {
		paint(0, 1, y1);
		paint(2, 3, y1);
	} else {
		paint(1, 1, y1);
		paint(3, 3, y1);
	}

	paint(1-x1, 4+(1-y1), x2);
	paint(1-x1, 6+(1-y1), x3);
	paint(2+(1-x1), 4+(1-y1), y2);
	paint(2+(1-x1), 6+(1-y1), y3);

	while(sz(s)<100) s+='0';

	//cerr << "finishing the grid\n";

	//cerr << "size is: " << sz(s) << "\n";

	int cur = 0;
	for(int i=0;i<8;i++) {
		for(int j=0;j<8;j++) {
			if(vis[i][j]||i==x||j==y) continue;
			paint(i, j, s[cur++]=='A');
		}
	}

	//cerr << "anna finished\n";
}

Bruno

#include"Bruno.h"
#include<bits/stdc++.h>
using namespace std;

#define int64_t int
#define pb push_back
#define pii pair<int, int>
#define st first
#define nd second
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()

bool Vis[8][8];
vector<vector<int>> V;

bool read(int x, int y) {
	Vis[x][y] = true;
	return V[x][y];
}

string Bruno(int n, vector<vector<int>> v) {
	V = v;
	bool x1, x2, x3, y1, y2, y3;

	int cnt0=0, cnt1=0;
	if(read(0, 0)) cnt1++;
	else cnt0++;
	if(read(2, 2)) cnt1++;
	else cnt0++;
	if(read(4, 4)) cnt1++;
	else cnt0++;
	if(read(6, 6)) cnt1++;
	else cnt0++;

	if(cnt1>cnt0) x1 = 1;
	else x1 = 0;

	cnt0=0, cnt1=0;
	if(x1) {
		if(read(0, 1)) cnt1++;
		else cnt0++;
		if(read(2, 3)) cnt1++;
		else cnt0++;

	} else {
		if(read(1, 1)) cnt1++;
		else cnt0++;
		if(read(3, 3)) cnt1++;
		else cnt0++;
	}
	if(cnt0>cnt1) y1 = 0;
	else y1 = 1;

	x2 = read(1-x1, 4+(1-y1));
	x3 = read(1-x1, 6+(1-y1));
	y2 = read(2+1-x1, 4+(1-y1));
	y3 = read(2+1-x1, 6+(1-y1));

	int x = x1+2*x2+4*x3;
	int y = y1+2*y2+4*y3;

	//cerr << "finished reading and found x: " << x << " y: " << y << "\n";

	string ans;
	int cnt = 0;
	for(int i=0;i<8;i++) {
		for(int j=0;j<8;j++) {
			if(cnt>=n||i==x||j==y||Vis[i][j]) continue;
			cnt++;
			if(read(i, j)) ans+='B';
			else ans+='A';
		}
	}
	return ans;
}

详细

Test #1:

score: 0
Wrong Answer on the first run

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

1110000001110100000000000100000000000000010000000
0/////10101000///1/00///0//0//////0/////00//////0
//10/0//0////0//10/0////0///////////////0////////
1//0/0//110/0///////////1///////////////1////////
10//1/1/////////100/1//////////////////////////1/
0///////1/1/0////1/0////0///////////////0////////
...

Manager to Bruno


Bruno to Manager


result:

wrong answer Token "0/////10101000///1/00///0//0//////0/////00//////0" doesn't correspond to pattern "[01]*" (test case 2)