QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#137960 | #6341. The Last Battle | WonderfulWhale# | 0 | 32ms | 4380kb | C++17 | 2.5kb | 2023-08-10 19:47:15 | 2024-07-04 01:32:55 |
Judging History
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) {
memset(vis, 0, sizeof(vis));
//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) {
memset(Vis, 0, sizeof(Vis));
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
time: 32ms
memory: 4380kb
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 0100000010100000010000000000000000000000000000000 1000000000000000100000000000000000000000000000000 1100000011000000000000001000000000000000100000000 1010101000000000100010000000000000000000000000010 0100000010100000010000000000000000000000000000000 ...
Manager to Bruno
20000 1 1110000110010100001110100000000000001001000000000000001100000000 1 0101000001001000000011000001100000010000000100000000000000010000 1 1101011111000000000000000101000000000000010000000100000001000000 1 1110000000000001001100000000000000001000010000000000001000000000 1 101011010000100000100001...
Bruno to Manager
B B B B B B A B A B A B B B B A A B B B B B B B B B A A B B B A B A A B A B A A B B A B B B B A B A B B A A B B B B B B B A B A B A A B B B A A A A A B A B A B B A B B B A A A B B A B A B B A A B B A B B A B B B B B B B A A A B A B B B B B B B B A B B A B B A B B A B B B B A B B A B B B B A B B B B ...
result:
points 0.0 Accepted: 0