QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#480008#8644. Tricolor LightsQwerty1232#0 18ms4552kbC++232.4kb2024-07-16 01:04:272024-07-16 01:04:27

Judging History

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

  • [2024-07-16 01:04:27]
  • 评测
  • 测评结果:0
  • 用时:18ms
  • 内存:4552kb
  • [2024-07-16 01:04:27]
  • 提交

Anna

#include "Anna.h"

#include <bits/stdc++.h>

namespace A {
    std::vector<int> gen_string(int n) {
        std::vector<int> s(n);
        std::mt19937 rnd(2086);
        for (int i = 0; i < n; i++) {
            s[i] = rnd() % 3;
        }
        return s;
    }

    int fuck(char ch) {
        std::string s = "RGB";
        return std::find(s.begin(), s.end(), ch) - s.begin();
    }
}  // namespace A

std::pair<std::string, int> anna(int n, std::string S) {
    auto data = A::gen_string(n + 1 >> 1);
    if (S.size() % 2) {
        S.push_back('R');
    }
    std::string t(S.size(), '-');
    for (int i = 0; i < S.size(); i += 2) {
        std::string a = "RGB", b = "RGB";
        std::erase(a, S[i]);
        std::erase(b, S[i + 1]);
        for (int ch1 : a) {
            for (int ch2 : b) {
                if ((A::fuck(ch1) + A::fuck(ch2)) % 3 == data[i / 2]) {
                    t[i] = ch1;
                    t[i + 1] = ch2;
                    // break;
                }
            }
        }
    }
    if (n % 2) {
        t.pop_back();
    }
    return {t, std::min(n, 100)};
}

Bruno

#include "Bruno.h"

#include <bits/stdc++.h>

namespace B {

    std::vector<int> gen_string(int n) {
        std::vector<int> s(n);
        std::mt19937 rnd(2086);
        for (int i = 0; i < n; i++) {
            s[i] = rnd() % 3;
        }
        return s;
    }

    int fuck(char ch) {
        std::string s = "RGB";
        return std::find(s.begin(), s.end(), ch) - s.begin();
    }

}  // namespace B

int n, l;
std::vector<int> str;
std::map<int, std::map<std::vector<int>, int>> map;

void init(int N, int L) {
    n = N, l = L;
    str = B::gen_string(N + 1 >> 1);
}

int find_str(std::string s) {
    if (s.size() % 2) {
        s.pop_back();
    }
    std::vector<int> vec;
    for (int i = 0; i < s.size(); i += 2) {
        vec.push_back((B::fuck(s[i]) + B::fuck(s[i + 1])) % 3);
    }
    auto& mp = map[vec.size()];
    if (mp.empty()) {
        for (int i = 0; i + vec.size() <= str.size(); i++) {
            mp[std::vector<int>(str.begin() + i, str.begin() + i + vec.size())] = i;
        }
    }
    int res = mp.contains(vec) ? mp[vec] : -1;
    return res;
}

int bruno(std::string u) {
    int a = find_str(u);
    if (a != -1) {
        return a * 2 + 1;
    } else {
        int b = find_str(u.substr(1));
        assert(b != -1);
        return b * 2;
    }
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 5
Accepted
time: 18ms
memory: 4552kb

Manager to Aoi

Start
Success
8
RGGBRBBG

Aoi to Manager

Start
0
0
BRBRBGGR
8

Manager to Bitaro

Start
Success
10000
8
8
BRBRBGGR
Success
BRBRBGGR
Success
BRBRBGGR
Success
BRBRBGGR
Success
BRBRBGGR
Success
BRBRBGGR
Success
BRBRBGGR
Success
BRBRBGGR
Success
BRBRBGGR
Success
BRBRBGGR
Success
BRBRBGGR
Success
BRBRBGGR
Success
BRBRBGGR
Success
BRBRBGGR
Success
BRBRBGGR
Success
BRBRBGGR
Success
BRBR...

Bitaro to Manager

Start
0
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
...

Manager to Checker

1.000000000000000

result:

points 1.0

Test #2:

score: 0
Wrong Answer
time: 1ms
memory: 4252kb

Manager to Aoi

Start
Success
1
G

Aoi to Manager

Start
0
0
R
1

Manager to Bitaro

Start
Success
10000
1
1
R
WA

Bitaro to Manager

Start
0
0
3

Manager to Checker

0.00

result:

points 0.0

Subtask #2:

score: 0
Skipped

Subtask #3:

score: 0
Skipped

Subtask #4:

score: 0
Skipped

Subtask #5:

score: 0
Wrong Answer

Test #80:

score: 70
Accepted
time: 15ms
memory: 4352kb

Manager to Aoi

Start
Success
8
RGGBRBBG

Aoi to Manager

Start
0
0
BRBRBGGR
8

Manager to Bitaro

Start
Success
10000
8
8
BRBRBGGR
Success
BRBRBGGR
Success
BRBRBGGR
Success
BRBRBGGR
Success
BRBRBGGR
Success
BRBRBGGR
Success
BRBRBGGR
Success
BRBRBGGR
Success
BRBRBGGR
Success
BRBRBGGR
Success
BRBRBGGR
Success
BRBRBGGR
Success
BRBRBGGR
Success
BRBRBGGR
Success
BRBRBGGR
Success
BRBRBGGR
Success
BRBR...

Bitaro to Manager

Start
0
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
...

Manager to Checker

1.000000000000000

result:

points 1.0

Test #81:

score: 0
Wrong Answer
time: 1ms
memory: 4220kb

Manager to Aoi

Start
Success
1
G
WA

Aoi to Manager

Start
0
0
R
1

Manager to Bitaro

Start
Success
10000
1
1
R
WA

Bitaro to Manager

Start
0
0
3

Manager to Checker

0.00

result:

points 0.0