QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#137988#6341. The Last Battlewaldi#0 0ms0kbC++171.7kb2023-08-10 20:18:032024-07-04 01:33:36

Judging History

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

  • [2024-07-04 01:33:36]
  • 评测
  • 测评结果: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 20:18:03]
  • 提交

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
using namespace std;

vvi gen(int x, int y){
	// 0,1 - info
	// 2 - blokada
	// 3 - info slowa
	vvi t(8, vi(8, 0));
	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(!(i==0 || j==0 || i==j || i+j==7)) 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){
		t[i][j] = s[it++]=='B';
		if(it == n) break;
	}
	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
using namespace std;

vvi gen(int x, int y){
	// 0,1 - info
	// 2 - blokada
	// 3 - info slowa
	vvi t(8, vi(8, 0));
	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(!(i==0 || j==0 || i==j || i+j==7)) 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){
		s += 'A'+t[i][j];
		if((int)s.size() == n) break;
	}
	return s;
}

详细

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

Wrong Answer [1]

Manager to Bruno


Bruno to Manager


result:

wrong answer Token "Wrong" doesn't correspond to pattern "[01]*" (test case 1)