QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#279580#6341. The Last Battlejamjanek0 32ms4000kbC++172.1kb2023-12-08 21:34:062023-12-08 21:34:07

Judging History

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

  • [2023-12-08 21:34:07]
  • 评测
  • 测评结果:0
  • 用时:32ms
  • 内存:4000kb
  • [2023-12-08 21:34:06]
  • 提交

Anna

#include "Anna.h"
#include <string>
#include<bits/stdc++.h>
using namespace std;

const int magia[72] = {6, 168, 18, 50, 76, 214, 152, 72, 60, 181, 24, 177, 37, 133, 176, 101, 82, 193, 147, 226, 98, 91, 43, 11, 224, 196, 67, 80, 134, 132, 17, 100, 174, 205, 235, 33, 203, 0, 173, 38, 128, 220, 90, 148, 4, 12, 14, 2, 144, 184, 1, 146, 40, 10, 45, 21, 8, 64, 27, 113, 13, 84, 35, 3, 124, 68, 115, 97, 96, 211, 138, 117};

void Anna(int X, int Y, int N, std::string S) {
    int a;
    if(X==Y && S[0]=='B')
        a = 64+X;
    else
        a=8*X+Y;
    int pom=0;
    for(int i=0;i<8;i++){
        if(i!=X && i!=Y)
            Paint(i,i,(magia[a]>>(pom++))&1);
    }
    pom = 0;
    if(X==Y && S[0]=='B')
        pom=1;
    for(int i=0;i<8;i++){
        for(int j=0;j<8;j++){
            if(i!=X && j!=Y && i!=j){
                if(pom<(int)S.size())
                    Paint(i,j,S[pom++]-'A');
                else
                    Paint(i,j,0);
            }
        }
    }
}

Bruno

#include "Bruno.h"
#include <vector>
#include <string>
#include<bits/stdc++.h>
using namespace std;
int magia[72] = {6, 168, 18, 50, 76, 214, 152, 72, 60, 181, 24, 177, 37, 133, 176, 101, 82, 193, 147, 226, 98, 91, 43, 11, 224, 196, 67, 80, 134, 132, 17, 100, 174, 205, 235, 33, 203, 0, 173, 38, 128, 220, 90, 148, 4, 12, 14, 2, 144, 184, 1, 146, 40, 10, 45, 21, 8, 64, 27, 113, 13, 84, 35, 3, 124, 68, 115, 97, 96, 211, 138, 117};
std::string Bruno(int N, std::vector<std::vector<int>> T) {
    int a;
    for(a=0;a<72;a++){
        int ile = 0;
        for(int i=0;i<8;i++){
            if(((magia[a]>>i)&1)==T[i][i])
                ile++;
        }
        if(ile>=6)break;
    }
    int X,Y;
    string S;
    if(a>=64){
        S+='B';
        X=a-64;
        Y=a-64;
    }
    else{
        X=a/8;
        Y=a%8;
        if(X==Y)S+='A';
    }
    for(int i=0;i<8;i++){
        for(int j=0;j<8;j++){
            if(i!=j && i!=X && j!=Y)
                if(S.size()<N)
                    S+=char('A'+T[i][j]);
        }
    }
    return S;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 32ms
memory: 4000kb

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

1000000000000000010000000000000000000000010000000
0000000010000000000000000000000000000000000000001
0000000000000000000000000000000010000000000000001
1000000000000000100000000000000010000000100000000
1000000000000000100000001000000000000000000000000
0000000010000000000000000000000000000000000000001
...

Manager to Bruno

20000
1 1000000110010100000000000001000000000001000000000000001100000000
1 0001000001000000000011000001000000010000000100000000000000010001
1 1101011101000000000000000100000000000000010001000100000001000001
1 1100000000000001000000000001000000000000010001000000001000000000
1 100010000000100000100000...

Bruno to Manager

B
A
B
A
A
A
B
A
A
A
B
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
B
A
A
A
A
A
B
A
A
A
A
B
A
A
A
A
A
A
A
A
A
A
B
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
B
B
A
A
A
A
B
A
A
A
A
B
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
B
A
A
A
A
A
B
A
A
A
A
A
A
A
A
A
A
B
A
A
B
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
B
...

result:

points 0.0 Accepted: 0