QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#98965 | #6341. The Last Battle | Qingyu | 0 | 60ms | 3232kb | C++23 | 2.5kb | 2023-04-21 03:08:57 | 2023-04-21 03:25:04 |
Judging History
Anna
#include "Anna.h"
#include <utility>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
int Encode[72] = {
94, 231, 134, 9, 26, 169, 106, 174, 164, 22, 92, 89, 45, 243, 176, 62,
154, 253, 8, 145, 208, 91, 33, 52, 79, 244, 86, 121, 151, 201, 43, 188,
187, 161, 34, 77, 15, 195, 35, 85, 235, 224, 40, 51, 206, 119, 11, 149,
100, 181, 138, 17, 152, 241, 148, 122, 237, 126, 0, 68, 215, 189, 242, 239,
116, 254, 194, 66, 120, 216, 214, 238
};
void Anna(int X, int Y, int N, string S) {
for (int i = 0; i < 8; i++) {
for (int j = 0; j < 8; j++) {
if (i != X && j!= Y)
Paint(i, j, 1);
}
}
}
Bruno
#include "Bruno.h"
#include <utility>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
int Decode[256] = {
58, 3, 58, 46, 58, 47, 58, 28, 18, 3, 4, 46, 18, 12, 36, 36,
9, 51, 9, 51, 9, 47, 9, 28, 18, 51, 4, 51, 18, 12, 36, 36,
22, 22, 34, 38, 48, 48, 34, 38, 42, 30, 6, 30, 42, 12, 7, 63,
14, 27, 43, 43, 23, 49, 23, 49, 31, 27, 43, 43, 31, 12, 15, 15,
59, 11, 67, 46, 59, 35, 24, 24, 59, 11, 67, 46, 59, 35, 24, 24,
10, 11, 26, 45, 10, 39, 26, 45, 10, 11, 55, 21, 10, 39, 0, 0,
22, 22, 34, 38, 48, 48, 34, 38, 68, 30, 6, 30, 56, 56, 71, 63,
14, 27, 26, 45, 64, 64, 26, 45, 68, 27, 55, 21, 57, 57, 57, 57,
20, 33, 2, 33, 54, 47, 2, 28, 52, 5, 50, 50, 52, 61, 50, 50,
20, 19, 62, 13, 54, 47, 70, 28, 52, 19, 16, 16, 52, 61, 16, 16,
41, 33, 41, 33, 8, 8, 8, 8, 42, 5, 32, 32, 42, 61, 7, 63,
14, 19, 62, 13, 23, 49, 23, 49, 31, 19, 32, 32, 31, 61, 15, 15,
20, 37, 66, 37, 54, 35, 66, 60, 29, 29, 40, 40, 44, 35, 44, 60,
20, 53, 62, 13, 54, 39, 70, 60, 69, 53, 55, 21, 44, 39, 44, 60,
41, 37, 41, 37, 25, 1, 25, 1, 29, 29, 40, 40, 56, 56, 71, 63,
14, 53, 62, 13, 25, 17, 25, 17, 69, 53, 55, 21, 65, 17, 65, 17
};
string Bruno(int N, vector<vector<int>> T) {
// Find X, Y
int Mask = 0;
for (int i = 0; i < 8; i++) Mask += T[i][i] * (1 << i);
int Target = Decode[Mask];
int X = (Target % 8);
int Y = ((Target / 8) + X) % 8;
int LEN = N; if (X == Y) LEN = N - 1;
// Decode
string str = "";
for (int i = 0; i < 8; i++) {
for (int j = 0; j < 8; j++) {
if (i == X || j == Y || i == j) continue;
if (T[i][j] == 0 && (int)str.size() < LEN) str += "A";
if (T[i][j] == 1 && (int)str.size() < LEN) str += "B";
}
}
if (X == Y && Target < 64) str += "A";
if (X == Y && Target >= 64) str += "B";
return str;
}
详细
Test #1:
score: 0
Wrong Answer
time: 60ms
memory: 3232kb
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
1111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111 ...
Manager to Bruno
20000 1 1111111110010100111111101111111011111111111111101111111111111110 1 1111111111101111000011001111111111111111111111111110111111111111 1 1101011111111111101111111111111110111111111111111111111111111111 1 1111111100000001101111111011111110111111111111111011111110111111 1 111111111111111111110111...
Bruno to Manager
B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B A B B B B B B B B B B B A B B A B B A B B B B B B B B B B B B B A B B B B B B B B B B B B B B B B B B B B B B A B A B B B B B B B B B B B B B B B B B B B B B B A B B B B B B A B B B B B B B B B B B B B B B B B B B B B B B B A B B B B B ...
result:
points 0.0 Accepted: 0