QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#279646#6341. The Last Battlejamjanek0 39ms3900kbC++173.0kb2023-12-08 22:44:062023-12-08 22:44:06

Judging History

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

  • [2023-12-08 22:44:06]
  • 评测
  • 测评结果:0
  • 用时:39ms
  • 内存:3900kb
  • [2023-12-08 22:44: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;
    /*
    printf("ANNA X = %d Y = %d %d\n", X, Y, a);
    for(int i=0;i<8;i++)
        printf("%d", (magia[a]>>i)&1);
    printf("\n");*/
    int pom=0;
    for(int i=0;i<8;i++){
            /*
        if(i==X || i==Y)printf("?");
        else
            printf("%d", (magia[a]>>i)&1);*/
        if(i!=X && i!=Y)
            Paint(i,i,(magia[a]>>(i))&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) {
    /*
    printf("%d ", N);
    for(int i=0;i<8;i++)
        for(int j=0;j<8;j++)
            printf("%d", T[i][j]);printf("\n");*/
//    printf("Przekatna: ");for(int i = 0;i<8;i++)printf("%d", T[i][i]);printf("\n");
//    N = 1;
//    string helper="1000000110010100000000000001000000000001000000000000001100000000";
//    for(int i=0;i<8;i++)
//        for(int j=0;j<8;j++)
//            T[i][j]=helper[i*8+j]-'0';
    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++;
        }
//        printf("%d %d\n", magia[a], ile);
        if(ile>=6)break;
    }
//    printf("a = %d\n", a);
//    for(int i=0;i<8;i++)printf("%d", (magia[a]>>i)&1);
    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';
    }
//    printf("X = %d Y = %d\n", X, Y);
    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]);
        }
    }
//    cout<<S;exit(0);
    return S;
}
/*
10000001
10010100
00000000
00010000
00000001
00000000
00000011
00000000
*/

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 39ms
memory: 3900kb

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

1000000001000000000000000000000001000000010000000
0000000010000000000000000000000010000000100000001
0000000000000000100000000000000010000000000000001
1000000010000000000000001000000010000000000000001
1000000000000000100000001000000000000000000000000
0000000010000000000000000000000010000000100000001
...

Manager to Bruno

20000
1 1000000110010100001000000000000000000001000001000000001100000000
1 0001000001000000000011000001000000010000000101000000001000010001
1 1101011101000000000000000101000000000000010001000100000001000001
1 1100000000000001001000000000000000001000010001000000000000000001
1 100010000000100000100000...

Bruno to Manager

A
A
A
A
A
A
B
A
B
A
A
A
A
A
A
B
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
B
A
A
A
A
B
A
A
A
B
A
A
A
A
A
A
B
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
B
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
A
A
B
A
A
B
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
...

result:

points 0.0 Accepted: 0