QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#150681#6341. The Last BattleJCY_0 0ms0kbC++172.2kb2023-08-26 00:27:392023-08-26 00:27:41

Judging History

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

  • [2023-08-26 00:27:41]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:0kb
  • [2023-08-26 00:27:39]
  • 提交

Anna

#include <bits/stdc++.h>
#include "Anna.h"
#define FOR(i,p,k) for(int i=(p);i<=(k);++i)
#define REP(i,n) FOR(i,0,(n)-1)
#define vi vector<int>
#define vvi vector<vi>
#define pii pair<int, int>
#define fi first
#define se second
#define ull unsigned long long
using namespace std;

ull maska = 3350698468766188304ull;
bool czy_info(int i, int j){
	return maska>>(i*8+j)&1;
	//return i==0 || j==0 || i==j || i+j==7;
}
vvi gen(int x, int y){
	// 0,1 - info
	// 2 - blokada
	// 3 - info slowa
	vvi t(8, vi(8, 0));
	t[x][y] = 2;
	REP(i, 8) if(i != x){
		if(y) t[i][y-1] = 1;
		t[i][y] = 2;
		if(y<7) t[i][y+1] = 1;
	}
	REP(j, 8) if(j != y){
		if(x) t[x-1][j] = 1;
		t[x][j] = 2;
		if(x<7) t[x+1][j] = 1;
	}
	REP(i, 8) REP(j, 8) if(t[i][j]!=2 && !czy_info(i, j)) t[i][j] = 3;
	return t;
}

void Anna(int x, int y, int n, string s){
	vvi t = gen(x, y);
	int it = 0;
	REP(i, 8) REP(j, 8) if(t[i][j] == 3){
		if(it < n) t[i][j] = s[it++]=='B';
		else t[i][j] = 0;
	}
	REP(i, 8) REP(j, 8) if(t[i][j] < 2) Paint(i, j, t[i][j]);
}


Bruno

#include <bits/stdc++.h>
#include "Bruno.h"
#define FOR(i,p,k) for(int i=(p);i<=(k);++i)
#define REP(i,n) FOR(i,0,(n)-1)
#define vi vector<int>
#define vvi vector<vi>
#define pii pair<int, int>
#define fi first
#define se second
#define ull unsigned long long
using namespace std;

ull maska = 3350698468766188304ull;
bool czy_info(int i, int j){
	return maska>>(i*8+j)&1;
	//return i==0 || j==0 || i==j || i+j==7;
}
vvi gen(int x, int y){
	// 0,1 - info
	// 2 - blokada
	// 3 - info slowa
	vvi t(8, vi(8, 0));
	t[x][y] = 2;
	REP(i, 8) if(i != x){
		if(y) t[i][y-1] = 1;
		t[i][y] = 2;
		if(y<7) t[i][y+1] = 1;
	}
	REP(j, 8) if(j != y){
		if(x) t[x-1][j] = 1;
		t[x][j] = 2;
		if(x<7) t[x+1][j] = 1;
	}
	REP(i, 8) REP(j, 8) if(t[i][j]!=2 && !czy_info(i, j)) t[i][j] = 3;
	return t;
}

string Bruno(int n, vvi t){
	int x, y;
	REP(xx, 8) REP(yy, 8){
		vvi t2 = gen(xx, yy);
		bool git = 1;
		REP(i, 8) REP(j, 8) if(t[i][j]<2 && t2[i][j]<2 && t2[i][j]!=t[i][j]) git = 0;
		if(git){x=xx, y=yy; break;}
	}
	
	string s;
	REP(i, 8) REP(j, 8) if(i!=x && j!=y && !czy_info(i, j)){
		if((int)s.size() < n) s += 'A'+t[i][j];
	}
	return s;
}

詳細信息

Test #1:

score: 0
Checker Judgement Failed

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

0000100100000100000000000000000000000000000000000
0001000110000000101000000000000100000000000010000
1000000100000001000001000000000000000000000100000
0001000100001001000001000000000000000000000100000
0000000000000000000000001100000000000000000000001
0001000110000000101000000000000100000000000010000
...

Manager to Bruno


Bruno to Manager


result: