QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#124101 | #6341. The Last Battle | Adam_GS# | 0 | 35ms | 4108kb | C++17 | 2.0kb | 2023-07-14 07:47:02 | 2024-07-04 00:39:04 |
Judging History
Anna
#include "Anna.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
#define rep(a, b) for(int a = 0; a < (b); ++a)
namespace {
}
void Anna(int X, int Y, int N, string S) {
while(S.size()<27) S+="A";
int p=-1;
rep(i, 8) if(i!=X && i/2==X/2) {
p=i/2;
rep(j, 8) if(j!=Y) Paint(i, j, 1);
}
int q=0;
if(!p) q=2;
vector<int>xd(8);
if(Y==0) xd={0, 0, 0, 0, 0, 0, 0, 1};
else if(Y==1) xd={0, 0, 0, 1, 0, 0, 1, 0};
else if(Y==6) xd={0, 0, 1, 0, 0, 0, 0, 1};
else if(Y==7) xd={0, 0, 1, 1, 0, 0, 1, 0};
else if(Y==2) xd={0, 0, 0, 0, 0, 0, 0, 0};
else if(Y==3) xd={0, 1, 0, 0, 0, 0, 0, 1};
else if(Y==4) xd={1, 0, 0, 0, 0, 0, 1, 0};
else if(Y==5) xd={1, 1, 0, 0, 0, 0, 1, 1};
xd[4]=S[0]=='A';
xd[5]=S[1]=='A';
rep(i, 8) if(i!=Y) Paint(q, i, xd[i]);
int akt=2;
rep(i, 8) if(i/2!=p && i!=q) {
int ile=0;
rep(j, 8) if(j!=Y) {
if(ile<5) {
Paint(i, j, S[akt]=='A');
++akt;
++ile;
} else Paint(i, j, 0);
}
}
}
Bruno
#include "Bruno.h"
#include<bits/stdc++.h>
using namespace std;
#define rep(a, b) for(int a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
namespace {
}
string Bruno(int N, vector<vector<int>>T) {
int p=-1;
rep(i, 8) {
int sum=0;
rep(j, 8) sum+=T[i][j];
if(sum>=7) p=i/2;
}
int q=0;
if(!p) q=2;
int Y=0;
if(T[q][0]==T[q][6] && T[q][1]==T[q][7]) {
Y=2;
if(T[q][1]) ++Y;
if(T[q][0]) Y+=2;
} else {
if(T[q][2] && T[q][3]) Y=7;
else if(T[q][2] && !T[q][3]) Y=6;
else if(!T[q][2] && T[q][3]) Y=1;
else Y=0;
}
string ans="";
ans+=(T[q][4]?"A":"B");
ans+=(T[q][5]?"A":"B");
while(ans.size()>N) ans.pop_back();
rep(i, 8) if(i/2!=p && i!=q) {
int ile=0;
rep(j, 8) if(j!=Y) {
if(ile<5 && ans.size()<N) {
ans+=(T[i][j]?"A":"B");
++ile;
}
}
}
return ans;
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 35ms
memory: 4108kb
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
1111111001111111111001111100111110011111001111100 0101101111110011111111111100111110011111001111100 1111111001111011111001111100111110011111001111100 1111111001111011111001111100111110011111001111100 1000110111110011111001111100111110011111001111111 0101101111110011111111111100111110011111001111100 ...
Manager to Bruno
20000 1 1111111110010100001111101111100011111001111110001111100111111000 1 0101110111101100000011001111111111111100111111001110110011111100 1 1101011111111111000111101111110010111100111111001111110011111100 1 1111111100000001000111101011110010111100111111001011110010111100 1 100011101111110011110100...
Bruno to Manager
A A A A A A B A B A B A A A A B B A A A A A A A A A B B A A A B A B B A B A B B A A B A A A A B A B A A B B A A A A A A A B A B A B B A A A B B B B B A B A B A A B A A A B B B A A B A B A A B B A A B A A B A A A A A A A B B B A B A A A A A A A A B A A B A A B A B B A A A A B A A B A A A A B B B A A ...
result:
points 0.0 Accepted: 0