QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#132556#2742. Combopandapythoner#100 ✓12ms4296kbC++202.7kb2023-07-30 15:05:202024-07-04 01:01:52

Judging History

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

  • [2024-07-04 01:01:52]
  • 评测
  • 测评结果:100
  • 用时:12ms
  • 内存:4296kb
  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-30 15:05:20]
  • 提交

answer

#include <bits/stdc++.h>

#include "combo.h"

using namespace std;

#define ll long long
#define flt double
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()

const ll inf = 1e18;
mt19937 rnd(2234);

string smbls = "ABXY";

string solve_slow(int n) {
    int frst = -1;
    int tl = 0;
    int tr = 4;
    while (tl + 1 < tr) {
        int tm = (tl + tr) / 2;
        if (press(string(smbls.begin() + tm, smbls.end())) > 0) {
            tl = tm;
        } else {
            tr = tm;
        }
    }
    frst = tl;
    string rs = string(1, smbls[frst]);
    for (int i = 1; i < n; i += 1) {
        int tl = 0;
        int tr = 4;
        while (tl + 1 < tr) {
            int tm = (tl + tr) / 2;
            string t = "";
            for (int j = tm; j < 4; j += 1) {
                if (j == frst) {
                    continue;
                }
                t += rs;
                t += smbls[j];
            }
            if (press(t) == i + 1) {
                tl = tm;
            } else {
                tr = tm;
            }
        }
        rs += smbls[tl];
    }
    return rs;
}

string solve(int n) {
    int frst = -1;
    int tl = 0;
    int tr = 4;
    while (tl + 1 < tr) {
        int tm = (tl + tr) / 2;
        if (press(string(smbls.begin() + tm, smbls.end())) > 0) {
            tl = tm;
        } else {
            tr = tm;
        }
    }
    frst = tl;
    if (n == 1) {
        return string(1, smbls[frst]);
    }
    vector<string> smbls2;
    for (int i = 0; i < 4; i += 1) {
        if (i == frst) {
            continue;
        }
        smbls2.push_back(string(1, smbls[i]));
    }
    string s0 = string(1, smbls[frst]);
    vector<string> s1 = smbls2;
    while ((int)s0.size() + (int)s1[0].size() < n) {
        string t = "";
        t += s0 + s1[0] + smbls2[0];
        t += s0 + s1[0] + smbls2[1];
        t += s0 + s1[1] + smbls2[0];
        int x = press(t);
        if (x == (int)s0.size() + (int)s1[0].size() + 1) {
            vector<string> ns1 = {s1[0] + smbls2[0], s1[0] + smbls2[1], s1[1] + smbls2[0]};
            s1 = ns1;
        } else if (x == (int)s0.size() + (int)s1[0].size()) {
            vector<string> ns1 = {s1[0] + smbls2[2], s1[1] + smbls2[1], s1[1] + smbls2[2]};
            s1 = ns1;
        } else {
            vector<string> ns1 = {s1[2] + smbls2[0], s1[2] + smbls2[1], s1[2] + smbls2[2]};
            s1 = ns1;
        }
    }
    for (int i = 0; i < 2; i += 1) {
        if (press(s0 + s1[i]) == n) {
            return s0 + s1[i];
        }
    }
    return s0 + s1[2];
}

string guess_sequence(int n) {
    return solve(n);
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 5
Accepted

Test #1:

score: 5
Accepted
time: 0ms
memory: 3884kb

input:

ABB

output:

Accepted: 4

result:

points 1.0 Correct

Test #2:

score: 0
Accepted
time: 0ms
memory: 4028kb

input:

ABX

output:

Accepted: 5

result:

points 1.0 Correct

Test #3:

score: 0
Accepted
time: 0ms
memory: 4032kb

input:

ABY

output:

Accepted: 4

result:

points 1.0 Correct

Test #4:

score: 0
Accepted
time: 0ms
memory: 3804kb

input:

AXB

output:

Accepted: 5

result:

points 1.0 Correct

Test #5:

score: 0
Accepted
time: 0ms
memory: 3772kb

input:

AXX

output:

Accepted: 5

result:

points 1.0 Correct

Test #6:

score: 0
Accepted
time: 0ms
memory: 4028kb

input:

AXY

output:

Accepted: 5

result:

points 1.0 Correct

Test #7:

score: 0
Accepted
time: 0ms
memory: 3864kb

input:

AYB

output:

Accepted: 4

result:

points 1.0 Correct

Test #8:

score: 0
Accepted
time: 0ms
memory: 3828kb

input:

AYX

output:

Accepted: 5

result:

points 1.0 Correct

Test #9:

score: 0
Accepted
time: 0ms
memory: 3864kb

input:

AYY

output:

Accepted: 5

result:

points 1.0 Correct

Test #10:

score: 0
Accepted
time: 0ms
memory: 4024kb

input:

BAA

output:

Accepted: 4

result:

points 1.0 Correct

Test #11:

score: 0
Accepted
time: 0ms
memory: 3804kb

input:

BAX

output:

Accepted: 5

result:

points 1.0 Correct

Test #12:

score: 0
Accepted
time: 0ms
memory: 3800kb

input:

BAY

output:

Accepted: 4

result:

points 1.0 Correct

Test #13:

score: 0
Accepted
time: 0ms
memory: 3812kb

input:

BXA

output:

Accepted: 5

result:

points 1.0 Correct

Test #14:

score: 0
Accepted
time: 0ms
memory: 3744kb

input:

BXX

output:

Accepted: 5

result:

points 1.0 Correct

Test #15:

score: 0
Accepted
time: 0ms
memory: 3800kb

input:

BXY

output:

Accepted: 5

result:

points 1.0 Correct

Test #16:

score: 0
Accepted
time: 0ms
memory: 3816kb

input:

BYA

output:

Accepted: 4

result:

points 1.0 Correct

Test #17:

score: 0
Accepted
time: 0ms
memory: 3792kb

input:

BYX

output:

Accepted: 5

result:

points 1.0 Correct

Test #18:

score: 0
Accepted
time: 0ms
memory: 4032kb

input:

BYY

output:

Accepted: 5

result:

points 1.0 Correct

Test #19:

score: 0
Accepted
time: 0ms
memory: 3752kb

input:

XAA

output:

Accepted: 4

result:

points 1.0 Correct

Test #20:

score: 0
Accepted
time: 0ms
memory: 3860kb

input:

XAB

output:

Accepted: 5

result:

points 1.0 Correct

Test #21:

score: 0
Accepted
time: 0ms
memory: 4028kb

input:

XAY

output:

Accepted: 4

result:

points 1.0 Correct

Test #22:

score: 0
Accepted
time: 0ms
memory: 3804kb

input:

XBA

output:

Accepted: 5

result:

points 1.0 Correct

Test #23:

score: 0
Accepted
time: 0ms
memory: 3864kb

input:

XBB

output:

Accepted: 5

result:

points 1.0 Correct

Test #24:

score: 0
Accepted
time: 0ms
memory: 3864kb

input:

XBY

output:

Accepted: 5

result:

points 1.0 Correct

Test #25:

score: 0
Accepted
time: 0ms
memory: 3796kb

input:

XYA

output:

Accepted: 4

result:

points 1.0 Correct

Test #26:

score: 0
Accepted
time: 0ms
memory: 3800kb

input:

XYB

output:

Accepted: 5

result:

points 1.0 Correct

Test #27:

score: 0
Accepted
time: 0ms
memory: 4032kb

input:

XYY

output:

Accepted: 5

result:

points 1.0 Correct

Test #28:

score: 0
Accepted
time: 0ms
memory: 3748kb

input:

YAA

output:

Accepted: 4

result:

points 1.0 Correct

Test #29:

score: 0
Accepted
time: 0ms
memory: 3868kb

input:

YAB

output:

Accepted: 5

result:

points 1.0 Correct

Test #30:

score: 0
Accepted
time: 0ms
memory: 3744kb

input:

YAX

output:

Accepted: 4

result:

points 1.0 Correct

Test #31:

score: 0
Accepted
time: 0ms
memory: 4032kb

input:

YBA

output:

Accepted: 5

result:

points 1.0 Correct

Test #32:

score: 0
Accepted
time: 0ms
memory: 3804kb

input:

YBB

output:

Accepted: 5

result:

points 1.0 Correct

Test #33:

score: 0
Accepted
time: 0ms
memory: 4036kb

input:

YBX

output:

Accepted: 5

result:

points 1.0 Correct

Test #34:

score: 0
Accepted
time: 0ms
memory: 3744kb

input:

YXA

output:

Accepted: 4

result:

points 1.0 Correct

Test #35:

score: 0
Accepted
time: 0ms
memory: 3820kb

input:

YXB

output:

Accepted: 5

result:

points 1.0 Correct

Test #36:

score: 0
Accepted
time: 0ms
memory: 3800kb

input:

YXX

output:

Accepted: 5

result:

points 1.0 Correct

Subtask #2:

score: 95
Accepted

Test #37:

score: 95
Accepted
time: 0ms
memory: 3996kb

input:

A

output:

Accepted: 2

result:

points 1.0 Correct. Query Count: 2 (no more than n+2).

Test #38:

score: 95
Accepted
time: 0ms
memory: 4028kb

input:

B

output:

Accepted: 2

result:

points 1.0 Correct. Query Count: 2 (no more than n+2).

Test #39:

score: 95
Accepted
time: 0ms
memory: 4032kb

input:

X

output:

Accepted: 2

result:

points 1.0 Correct. Query Count: 2 (no more than n+2).

Test #40:

score: 95
Accepted
time: 0ms
memory: 3748kb

input:

Y

output:

Accepted: 2

result:

points 1.0 Correct. Query Count: 2 (no more than n+2).

Test #41:

score: 95
Accepted
time: 0ms
memory: 3796kb

input:

AB

output:

Accepted: 3

result:

points 1.0 Correct. Query Count: 3 (no more than n+2).

Test #42:

score: 95
Accepted
time: 0ms
memory: 4036kb

input:

AX

output:

Accepted: 4

result:

points 1.0 Correct. Query Count: 4 (no more than n+2).

Test #43:

score: 95
Accepted
time: 0ms
memory: 3880kb

input:

AY

output:

Accepted: 4

result:

points 1.0 Correct. Query Count: 4 (no more than n+2).

Test #44:

score: 95
Accepted
time: 0ms
memory: 3804kb

input:

BA

output:

Accepted: 3

result:

points 1.0 Correct. Query Count: 3 (no more than n+2).

Test #45:

score: 95
Accepted
time: 0ms
memory: 3792kb

input:

BX

output:

Accepted: 4

result:

points 1.0 Correct. Query Count: 4 (no more than n+2).

Test #46:

score: 95
Accepted
time: 0ms
memory: 4024kb

input:

BY

output:

Accepted: 4

result:

points 1.0 Correct. Query Count: 4 (no more than n+2).

Test #47:

score: 95
Accepted
time: 0ms
memory: 3800kb

input:

XA

output:

Accepted: 3

result:

points 1.0 Correct. Query Count: 3 (no more than n+2).

Test #48:

score: 95
Accepted
time: 0ms
memory: 4000kb

input:

XB

output:

Accepted: 4

result:

points 1.0 Correct. Query Count: 4 (no more than n+2).

Test #49:

score: 95
Accepted
time: 0ms
memory: 3804kb

input:

XY

output:

Accepted: 4

result:

points 1.0 Correct. Query Count: 4 (no more than n+2).

Test #50:

score: 95
Accepted
time: 0ms
memory: 3772kb

input:

YA

output:

Accepted: 3

result:

points 1.0 Correct. Query Count: 3 (no more than n+2).

Test #51:

score: 95
Accepted
time: 0ms
memory: 4036kb

input:

YB

output:

Accepted: 4

result:

points 1.0 Correct. Query Count: 4 (no more than n+2).

Test #52:

score: 95
Accepted
time: 0ms
memory: 3864kb

input:

YX

output:

Accepted: 4

result:

points 1.0 Correct. Query Count: 4 (no more than n+2).

Test #53:

score: 95
Accepted
time: 12ms
memory: 4024kb

input:

YXBBXXAXXBAXXXAABBBAABBBBBAABAAXAAXBBBXABBXBABABXBXBXAXAXBAAXAXXXAABXBXXXAXAXABXBBBBAXBBABBXXXAXBXABXAXAAXAXBABXAABXBAAAAAXXXABXXBAXBABAXXABAXAXAABBXBXBBBAXXXXXAABXAXAABBAABBAXXXBXXABAXXABAABXAAXABBXXBXBABXBABAABXXBABXXBBBXAXABBBXXAAABBAXABBABBXBAAAXBBXBBBBBXBXAXBXXAABBXABABAXBAAABBBAAAXXAAAXXABBXXA...

output:

Accepted: 2001

result:

points 1.0 Correct. Query Count: 2001 (no more than n+2).

Test #54:

score: 95
Accepted
time: 12ms
memory: 4120kb

input:

XBBABYBABAYYBBAYBYYYYYBBAAAABYAYBYABYYBAAAYYBYAAYABYYYBAYAAABAAYBBYYABYYYBBAAABBAAAAAYYAYAYBAYABYBBYYYYYBYAYYBAYABYYYABYYBBYBBAYBYAAABYAYAABAYYAYAYYBYYBYBBYBYYAYBYBYAABAYABBYBBAYBAYBBABYABYYBYAYBYAAYABABAYYBYAAAYABBAYYYAYAAYBAYYAYYABBABAYYBAYBBABBAYABBBABYYYBBYYBAYBBAYAABAAABAYAYAYBBAABBBBAAAYYAABAB...

output:

Accepted: 2001

result:

points 1.0 Correct. Query Count: 2001 (no more than n+2).

Test #55:

score: 95
Accepted
time: 12ms
memory: 4284kb

input:

BXAYAYXAXYYAXXAYAAAAAXYYAYAAXAYYAXYXYYXAXAAYXXAAYYYYYXYYXYAYAAXYYXYAYYYAXYXXXYYXAXAXXYXAAAAXYXXAAAAYYYXAAXXYYYXXAYYXAXAXXAXAYXXXYXYXAAXYXXXXAYXAAAYXYYAXXAAXAXAXXXXAAXAXYXYAAAXAAYXXYXYXAXAAYXAXYYYYYYAAXXAYAYAYAAXYXYAYYYYAXYXYAAXYXXAXAYYYYYXYAAXXXXYAXYAXAXYXYAAAYYXAYYXAXYYYYYXXAYYAAYAAXYXXAYAXXXAXYYYX...

output:

Accepted: 2002

result:

points 1.0 Correct. Query Count: 2002 (no more than n+2).

Test #56:

score: 95
Accepted
time: 11ms
memory: 4052kb

input:

YABAAXXBBAXXBXAAXBAAXAABBXAXXXABBAABBAXXABXXBABBBBXBBBXXXAAXBBAXBBBXXBXXXBXBABBAXBXABXBXXAAXXXBABBBAAXBXAXBBABBABBAABAAAAXBXXXXXBAAAXABBAAAXXABAABABXAAABXXXABBABABAXAABBABAAXABBAXAAXAXABAXAXAXXBABXXAAXBBXAXAABAAAXBABBABAAAXXABAAXXABBXABAXBXAXBBAABBAXBAXAABBXBBAXBXABXBBABBXXBBBBXBBXBABABBAXXBXAXBAABX...

output:

Accepted: 2002

result:

points 1.0 Correct. Query Count: 2002 (no more than n+2).

Test #57:

score: 95
Accepted
time: 11ms
memory: 4064kb

input:

XYYBYABYAAAYAAAABYYABAYBYABABBYABABBBBYABBAYBBBABBBYABBAAYYYBAAABBAABBBBYYYABABYBBBBYBAYYYBBYABAYYYYABBBAAYYBABBBAYABABAABBABBBYYBAYBYAAYYBYYAYBBABAYYYYABYYABBAYAYBAYBYAYYAABABAABAABAAYYABYBAAYABBYBYAYBYBBAAAYBABABAAYBBAYYBAABAABBYBBAYYAYYYBBBBABYBBYBYAAYYABBAABABYAABBABAYAABYYAYBAAYBBYYYABYBYYBBYBY...

output:

Accepted: 2002

result:

points 1.0 Correct. Query Count: 2002 (no more than n+2).

Test #58:

score: 95
Accepted
time: 0ms
memory: 3860kb

input:

AYYYXYBBBBYXBBYXBBB

output:

Accepted: 20

result:

points 1.0 Correct. Query Count: 20 (no more than n+2).

Test #59:

score: 95
Accepted
time: 0ms
memory: 4044kb

input:

YXXXABXAXXAABAXXXXBAAAXBXBBXXBAABABBAX

output:

Accepted: 40

result:

points 1.0 Correct. Query Count: 40 (no more than n+2).

Test #60:

score: 95
Accepted
time: 0ms
memory: 3844kb

input:

BYYYYAYYAYYAAXAYYXAXAYXXYYYXYYYAYXXAAYXYXXYXAYYAYAYYXXXAX

output:

Accepted: 59

result:

points 1.0 Correct. Query Count: 59 (no more than n+2).

Test #61:

score: 95
Accepted
time: 0ms
memory: 3752kb

input:

BXAXYAYXYYYXYAXYAAXXAXAAXXYAAXAYXXAXXYYXXAXAAXYYAAAYXYXAAAXXAXYAAXAXYAAAXYAX

output:

Accepted: 78

result:

points 1.0 Correct. Query Count: 78 (no more than n+2).

Test #62:

score: 95
Accepted
time: 0ms
memory: 3752kb

input:

XBAABABYABBBAYBABABABBAYBYAABYYBAABYYBABBAYAAAYABBYBBAABBBAAYAAABBBYAAYAYYAABYBBBBYBBBYYBBYBYYA

output:

Accepted: 96

result:

points 1.0 Correct. Query Count: 96 (no more than n+2).

Test #63:

score: 95
Accepted
time: 0ms
memory: 3828kb

input:

BYYXYXXAYAYXAXXAXAAAYXYYXXAYXXXAYYXXYYYXAYYYXXYXAXAYXYXXXYYXYYXYXAAXYYYXYXAXAAXAYXAXAXXAXYAXAYAAXYXXYYXAAYYAXAXAAA

output:

Accepted: 115

result:

points 1.0 Correct. Query Count: 115 (no more than n+2).

Test #64:

score: 95
Accepted
time: 0ms
memory: 3876kb

input:

ABXYBBXXXYXYXBBBXXBXBYXYYXBBBYBYYBXXXXBBYXYYYYBXYYXBBXXYBXYBXBYBBBYYYXYYXXBBXBBYBYBYXBBXBXBBXXXBBBBBBXYBXYXYXYBBYXBXXBBXXYYBBYXXBYYXX

output:

Accepted: 135

result:

points 1.0 Correct. Query Count: 135 (no more than n+2).

Test #65:

score: 95
Accepted
time: 0ms
memory: 4052kb

input:

XYYBABYBYYBBBBABYBAAYAYABABBAYYAYABAABBAAYBBABBBYBBYBBBABABAAAABBYYABBYYAAYBBYBBAYBABAAABYAYBBYBYAABABABBAYYBAYYAYYBAYBYAYBAYBAYABBYYAAABAYYBAABAABBAAAY

output:

Accepted: 153

result:

points 1.0 Correct. Query Count: 153 (no more than n+2).

Test #66:

score: 95
Accepted
time: 1ms
memory: 4060kb

input:

BXAYXAAXAXAYXYAYYAXXYYAAXYAAYXYXYAAAAYAXAYXYXXAXAXAAXAXAYAYXYAXAYXXXXYYAYAXAAYAXYYXXXYAYYAYYXYYAYYAXAAAYAXYYYXAYYXXYAAXXXAYXXYAYXYXAYXYAAXAXAXAYYYYAYAYAXAXXXYAAXAAAAXAAAYY

output:

Accepted: 172

result:

points 1.0 Correct. Query Count: 172 (no more than n+2).

Test #67:

score: 95
Accepted
time: 1ms
memory: 3848kb

input:

YXBBBAABBAXBBXABXAXBBAABBXXXBBAAABABAXBAAXBXABXXBXABABXBAXXAABBXAABAXAABAAXABBXXABBBXABABAXBXAAAXXBBBBXBAABBAAABXXXXAXBBXABAXBAXABBBBXABXXBBBBBAAAAXAAABAXBBXAXAAXAXBBAABXAABBABBAXAAAXABABXXB

output:

Accepted: 192

result:

points 1.0 Correct. Query Count: 192 (no more than n+2).

Test #68:

score: 95
Accepted
time: 11ms
memory: 4064kb

input:

XAYAAABYYBAYYYABAAABBABYBBAAABYABBAYABAAABBBYBYAAAAAYBBAAYAABAYYYAYYAYABYBYBABAYYBYYYBYYYYAYAAYBABAAAAYYYYAYYBYBYBBBAYBAABAYYABBAABAAYBABAABYYYAABYYBYBABYYBAYABAABBBBBBAABYYBABAABAAYYBBYBAABBBBYAYYYYYBYYYAYAYBBAYBBABABBYABBABAYYBYAYABAYBBYAABYBYBBBYBYBBYBYAYABAAYBYYYBYBAYBYYYAAYAAYAYABYYABBBAYBBYYAY...

output:

Accepted: 1992

result:

points 1.0 Correct. Query Count: 1992 (no more than n+2).

Test #69:

score: 95
Accepted
time: 11ms
memory: 4032kb

input:

AXBYBBXBXXBBBXBYYBBXYXXXXBBBXBYBBBXYBBXBXXBBYYYYBXBYXYYXXYBBBXXYYYXBXXYBXBXXXXBXBBYYXBBXYBYBYYBBXXXYYXYYXBXXXYYYYBBXXXBXBXBBYXBXXXBYBBYYXXYBYXBXYXBYYXXXXBBYXBBXYXYXYYXYBXYYYYYYXYBBXXXBBYXYXXYXXYBYYXBBXBXXXXBYBXYXYBYBBYBBBXXYBXYBYBXYYYBXYBBBXBBYYBYYBXBXYXBXXBYYBXYYYYBBXXBYYYYBYBXXBXBBBBBXXYYYBXYBBBXB...

output:

Accepted: 1992

result:

points 1.0 Correct. Query Count: 1992 (no more than n+2).

Test #70:

score: 95
Accepted
time: 11ms
memory: 4092kb

input:

YBXXBBBXBBABBABAXBBXBBABAXBABAAXAXAXBABABAAXXXXBXBAXAXBBXBXABAAAAABXBBXBBAAABXABXXABABBBAXXXXBXXXXBABXABBBXAXAABABAAAAABAXBBABBBXBAAXBAAAAXXBABAAXABXXAXAXAXXBBXBXBBXABXXABBBAABXABBXXAXBXAXAXXAXBBABXXAABBBXXBAXXBABBXXAXXABAAXXBBBXBBXAXXXXXBAXBABAABAXBAXXAXAXABXXXBAAXBBAXXBXAXXAXBBABBBABAAABXABABAAABX...

output:

Accepted: 1994

result:

points 1.0 Correct. Query Count: 1994 (no more than n+2).

Test #71:

score: 95
Accepted
time: 11ms
memory: 4008kb

input:

XYAYABBBYBYBYBAYAAYBYBBAAYYBBYAYAYABBAAYBYYBBBBBAAYAAYAAAAABBAAAAYYYBBYAAYABBBYABAABABYABYAAYYABYAAAYBABAABYYABAAAYYYYYBABYBYYAAAYBABABYBAAAYBBABBYYBAYYYYYABBYYBYABBAYABBABBAAYYBYBBYBYAYYBYYYBAYAABABBYBYBABAYBYYYBAABABYAAAYYBAAABYAYYYBBAYYYABBYAYYYYYBBYAAYBBYBYBYAYBBBBABAABBYYAAABAAAYAYBYYBYBBYABAAB...

output:

Accepted: 1995

result:

points 1.0 Correct. Query Count: 1995 (no more than n+2).

Test #72:

score: 95
Accepted
time: 11ms
memory: 4008kb

input:

YAAAXBABBXAXXXXBBAAAXBBXXXBXXABXBAXXAXABBBAAAXAAAAAXXBBABXABBBBXBBXXBXAABXXBXABAXABABBAAAABXBXBXAXXAXXBAXAAXBABABBAAAXXAAAAXAXAAXBXXXBBAABXXXABXBXBBBBABBBAXXBXABXBAAXBAXBXAABAXAXXXBXAXAXBAXXBBBBXBABABXAABABXBXBBBABBAAABABAXBXXBBXAAAABBXBAAXABABAXXXXAABABXAXBXAXXXAAXBXBAABBABBXAXABXABXAXAXAAXAXBXXAXB...

output:

Accepted: 1996

result:

points 1.0 Correct. Query Count: 1996 (no more than n+2).

Test #73:

score: 95
Accepted
time: 6ms
memory: 4072kb

input:

AXYXBYBBBBBBXXXXBBBXBBXYXYBBBXXYYXXXBYXXXYBXXYBBYYXYBBBYBBXYXXXYBBBXYYBXBBYBXXXBXYYYYYBXXXYBXYYYBYXYBBXXXXBXBYXYBXBBYXBBBXYXBYYXYXYYBBYYBBXYYXXBYXYXYXBBYXBYYYBXBYBXXBXBBBXYBXXBYYXBXBXYYYXBXBBXXXYYYBBBYXXYBYXBBXYXXBXYYYXYYYBYBYBXXXXYXXYBYBXXYYYYBYYYYYYXXYYYYBBBBBYBXXBYBXYBBBYXBBXBYXBYYXBXXYXXBYBBBXBX...

output:

Accepted: 1996

result:

points 1.0 Correct. Query Count: 1996 (no more than n+2).

Test #74:

score: 95
Accepted
time: 12ms
memory: 4252kb

input:

XYYBAYBAAYYABYAABAAAAABYBBABBAABAYYBYYYYAYABBYAYBYYBAAABYYYBAAAYYBYABBYAYYBBBYYAYBBAYYYBYYYBBAYYYABBYAYYYYAAYABYYBABAAAABYYBYYABBYYAAABYYBYAABYBABYYBABABYBBAYBABBBBBBBYYYAAAYAABBYBYYBYYYBBBABAYBBBBBYABYBYYAYAYYBBBYAABAABYBAYABBABYYYYBAYAYABAYYYYYYAAYYYBABBYBBBBYABBBBBABYBYBYYAAAYYBYYBYYBABYBYYAAAABA...

output:

Accepted: 1998

result:

points 1.0 Correct. Query Count: 1998 (no more than n+2).

Test #75:

score: 95
Accepted
time: 11ms
memory: 4132kb

input:

YBAXAAABAABAAAXABXXXXBBAXBAXAAAXXXAXABAABXXAABXXAXXXAXBAXAXXAXBABXBAXBXXXBXBBABBBXABAXBBXBBXABXABBABXXXBBXBXABBBAABAXAAABAABXBXAXXAXXXBAAXBXXXXBAABXAXABAAXXBBBAAXAXXBXBABAXXABBABXXXBAABAAAABAXAXBXAABBBBBXAAXBXBXAXXXXXAABAAXBAAXABAAAAAABABAAXAABXAXBABXBBABBBBAAXABXBBXXXAXXBXBBXABBAXXXXBAXXBAABAXBBABA...

output:

Accepted: 1998

result:

points 1.0 Correct. Query Count: 1998 (no more than n+2).

Test #76:

score: 95
Accepted
time: 11ms
memory: 4284kb

input:

BAYYYYXXAXAXAAXAYAYAAXAXXYYYAYXYXYXAXXYYAAAAYXXXYAAYAXAYXYYYAYAYXAAXAYXYAYYAYXYYAAYYYYXAYXAXYXYXXXXAYYYAAXYXYXXXAXAYAXYAYYYYYYYXXYXXAAYXXAYAAXAXXAAYAXYYYXXAAYXYAYYXYXXYYXAAYXXXXYYAAXAXYYAYAXAAYXYAXYYXYYXAXYYXXXXYXYAXAXAYXAAYAYXAXXYXXXXYXXXAXAYYXYAAAXXXXXXXXYXAAXYXYXYYXYYAAXXXXXXXXXAXXYXYYXYAYXYAXYYX...

output:

Accepted: 1999

result:

points 1.0 Correct. Query Count: 1999 (no more than n+2).

Test #77:

score: 95
Accepted
time: 8ms
memory: 4056kb

input:

XAAAYAYYABAYYYBAYBAYYYBAYAAYAAYAYAABAAAYBABYBYBAYYABYABABBYBBBBBBBBAAYBBAYBYAYAAYABBYYYABABABAYBYYBAYBAYYAYABYBAABABYYAYAYBBYYAYYYBAAYYYBYBAYBBBBBYBAAABBBYBAAABYABBBABYAAAAYYYYYAYBBAYAAYYYYAAYAAABABYABBAAAYAABBBYABYYAYYYBYBYABYYAYYYBYBYAYBYYYYBYYYBBAYBAYABYBAYAAYBBYAYYBYBYAYYYABAAAYAYYBBAYBBBAAABYYB...

output:

Accepted: 2000

result:

points 1.0 Correct. Query Count: 2000 (no more than n+2).

Test #78:

score: 95
Accepted
time: 7ms
memory: 4288kb

input:

ABBBBBBXBBBBBBBBXYBBBBBBBBBBXXYBYBBBYBBBBBBBBBBXBBBBBYBBBBBBXXYBYXYYBBYBBBBBBBBBBBBBBBBYBBBBBYBBBBXBBYXBBXBYBBYBXBBBBBBBBBYYBXBBBYBBBBBBBXBBBBBBBBBBBXXBBBBYXYBBBBBBBBBBBBYBBBBXBBBBBBBBBBBBBBBBBBBBBBBBBBBBYBBBBXBBBBBBBBBBBYBBBBBBBBBBYBBBBYBBBBBYXBBBBBBBBBBBBYBBBBBBBBBBBBBYYXBXBBBXBBBYBBBBBBBBBBBBBBBY...

output:

Accepted: 2001

result:

points 1.0 Correct. Query Count: 2001 (no more than n+2).

Test #79:

score: 95
Accepted
time: 7ms
memory: 4252kb

input:

BAAXAAAAAAAAAAXAAXAAAXAAAAAXAAAAAAAAAAAYAAAXAAYAAAAAAAXAAYAAAAAAAAAAAAAAAAXAXAAAYYAYAAAAXAAAAAAAYAAAYYAAAAAAAAXAAAAAAXYAAAAAAAYAAAXAXAAAAXAAAAXYAAAAAXAAAAAAAAAAAAAAAAAAAXAAAAYAAAYAAAAYYAAAAYAAYAAAAAAAAAXAYAAXXXAYAAAAAAAAAAAXXAXAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAXXAAYAAAYYAAAAAAAAAAAAAXAAAAAAAAAAYYAXAY...

output:

Accepted: 2001

result:

points 1.0 Correct. Query Count: 2001 (no more than n+2).

Test #80:

score: 95
Accepted
time: 10ms
memory: 4288kb

input:

XAABBAYAAAAYAAAAAAAAYABABYAAABAAAAAAAYAABAABYAAAAABAAYBAYAAAABAAAAABABABAAAAAABAYABAAAAAAYAAAAABBABAAAAABAAAAABAYAAAAABAABAAAAAAAAYBAAAAABAAAAAAAAAAAAAAAYABAAAAAAABAAAAAABAAAAAABAAAAAAAABAAAAABAAAAAAAAAAAAAAAYAAAAAAYABAAAABAAAAAAAAAAAAAAAAAAABAAAYAAYAAAYABAABAAAYAABAAAAAAABBAAABAAAAAAAAAABAAAAAAABAA...

output:

Accepted: 2001

result:

points 1.0 Correct. Query Count: 2001 (no more than n+2).

Test #81:

score: 95
Accepted
time: 7ms
memory: 4288kb

input:

YAAAAAABAAAAXAAAAAAAAAAXABABAAAAAAAAAAAAXAXAAAXAAABXAAABAABBAABAAAAABAAXAAAAABAAAABAAAAAABXAAABXAAAAAAXAAAAAAAAAAAXXAAAAAXAXAAXAXAXAAAABABAAAAAXAAAAAXBBAAAAAAAAAAAAAAAAAAAAAAAAAAXAAAAAAAAABAAABAAAAAXAAAAAAAAXAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAXAAAABBXAAAABAAAXBAAAAABAAAXAAAAAAAAAABAAABABAAAAAAAXAAXX...

output:

Accepted: 2001

result:

points 1.0 Correct. Query Count: 2001 (no more than n+2).

Test #82:

score: 95
Accepted
time: 10ms
memory: 4292kb

input:

AXXXXXXXXXXXXXXXBYXXXXYXXXXBXXBXYYXXYYXXXXXXXXYXXXXXXXXXXXXXXXXXXXYYBXXBXXXXXXXXXXBXXBXXXXXBXBXXXXXXXXXXBYYXXXXXXXXXXYYXXXXXXXXXXXXXXXXXXBXXXXXXXXXXXXXBXXXXXXXXXXXXYXXXXXXXXXXXXXXXXXXXXXBXXXXXXYXXXXXBXXXXXXXXXXYYXXXXXBBXXXXXBYXXXXXXXXXXXXXYXXXXXXXXXBXBXXXXXBXXXXYXXXXXXXXXXYXBXXXXXXXXBXYXXXXBXXBBXXBX...

output:

Accepted: 2002

result:

points 1.0 Correct. Query Count: 2002 (no more than n+2).

Test #83:

score: 95
Accepted
time: 10ms
memory: 4068kb

input:

BXYXYXXXXYAYXXXAXXXXYXXAAXXXXXXXAYXXXXYYXXAXXXXXXYXXAXXXXXXXXXAXAXXXXXXYXAXXYXXAXXYXXXXXXXXXXXXXXXAXXXXXXXXXYXXXXXAXXYXXXYXXXXAYXXXXXAXXXXXAXXXXXXXXAXAXXXXXXXXAXXYXXYYXXXXXXXXAXXAXXXXYXXAXAXYXYXXXXXYXXXXXYXAXAXYXXXXXXXYXXXXAXYXXXXXXXYXXXXXXXAXYXXXXXYXXXYXAXXXYAXXYYXXXYXXXXYXXXXXYXXXXXXXXXXXAXAXXXXXX...

output:

Accepted: 2002

result:

points 1.0 Correct. Query Count: 2002 (no more than n+2).

Test #84:

score: 95
Accepted
time: 10ms
memory: 4252kb

input:

XABBBBBBBBBBBBBBBYBBBBBBBBBBBABBBBBBBBBBBBBBYBBBBBBBBBBBBABBBBBAAABBBBBBYYBBBBABBBBBBBABAABABAYBBABBBBABBYBBABBBBBABBBABAYBBABBBBBABYBBBBYBBBBBBBBBBBBBBBBABBBBYBBBBYBBBBBBBBBBBBBBBBBBBBBBBBBBBABBBBBBBBBYBBBYBABBBBBBBYBBBABBBBBBBBBBBBBYYBBBBAABBBYBBBBBAABABBBBBBAYBBBBBBBBBBBBBBBBBBBBABBYBBABBABBABBAB...

output:

Accepted: 2002

result:

points 1.0 Correct. Query Count: 2002 (no more than n+2).

Test #85:

score: 95
Accepted
time: 10ms
memory: 4296kb

input:

YBBAXBBBXBBBBBBABABBXBBBBBBBBBBBBXBBXBBBAABXBBBABXBBBBBBBXBBBBBBBXXBXBBBBBBXBBXBBXBBABBXXBBBBBBABABBBBBBBBBBBBBBBBABBBBBBBBBBBBBBBBABXXBBBXABBBABBBBBBBBAXBBBBBBBBBBBXBBBBBBBBXBXXBXBBBBXBBBBBBBBBBXBABBBBBBBXABBXBBBABBBBBBBBBABBBBBBBXBBBBBBBBABBBBXBBBBAABABBBBBXBABXBBBBBBBABXBBBBXBBBAXBBXBBBBBBABBABAB...

output:

Accepted: 2002

result:

points 1.0 Correct. Query Count: 2002 (no more than n+2).

Test #86:

score: 95
Accepted
time: 10ms
memory: 4256kb

input:

AYYYXYYYYYYYYYYXYYBBYYYYBYYYXYYYYXYXYBYXBYBYYYYYYYXBYYYYYYYYYBYYBXYYYYYYYYYYYXYYXYYYYYYYYYYYYBYYXYYYYYYBYYYYYYYYYYYBYYYYYYBYYYYYYYYYYXYBYYYYYBYYXYYYYXYYXYYXYYYBYYYBYYYYYYYYYYYYYYYYYYYBYYYYYBYYBBYXBYYXYYYXYYYYYYYYYYBYYYYYYYYYBBYYXYYYYYYYXYYYYYYYYYYYXYYYYYYYXXBYXYYBXYYYXYYYYYYYYYYYBYBYBBYYYYYYYYYYYYXB...

output:

Accepted: 2002

result:

points 1.0 Correct. Query Count: 2002 (no more than n+2).

Test #87:

score: 95
Accepted
time: 12ms
memory: 4260kb

input:

BYYYYYYYXAYYYYYYAYXAYYYXYYYYYYYXYYXYAYYYYYYAYYYYYYAAYAXYYXYYYXYYYAYYYYAYXYYYYAAYYYXYAXYAXXYAYYYYYYAYYYAAYAYAYYYXYYYYYYXYYAYYYYYYAYYYYYYYYYYYYXXXYAYYYXYYYAAYYYYYYAYYYYYYYXYYXYYYYYYXYYYYYXYYYAYXYYYYXYAYYYYYYYYYYYYAAYAYYYYYYYYYYYYYYXAYYYYYYYYYYYAAYYAYXYYXAYYYYYAYXXYXXYYXYYYXYYYYYYYYXYYYYYYYYYYYYYAXAYXA...

output:

Accepted: 2001

result:

points 1.0 Correct. Query Count: 2001 (no more than n+2).

Test #88:

score: 95
Accepted
time: 11ms
memory: 4052kb

input:

XABBYYYBBYYYYBYYYYAYYYYYYYYYAYYBYYYYYYBAYBYYYYBYYYAYYBYYYYYYYYYABYYYYYYYYBYAYYYYYYYYYYYYYYAYYYYYAYBYYAYYAYYYYYYYYYBYYYYYBYAYYYYYYYBYYYYYYYBYYAYYYYYYYBBYYYYYYBYYYYYBYAYYYYYAYYYYYYYYYBBYYAYYYYYYYYYYBYBYYYYBYYYYBYYYBYYYYYYYYYYYYYYYBYYYYAYYYAYBYYYYBAYYYYAYBYYYYYYYYYYYYYYYYYYYYBYYYYYYYYYYAYYYYYYYYAYYYYYY...

output:

Accepted: 2001

result:

points 1.0 Correct. Query Count: 2001 (no more than n+2).

Test #89:

score: 95
Accepted
time: 11ms
memory: 4052kb

input:

YBXXXAXXXXXXBXXXXXBXXXXXXXXXXBXXBXXBXAXXXXXXXXXXXXXXXXXXABXAXXAXXXXXXXAXAXXBXXXXXXXXBXXXXXXXXXXXXBXXXXXXXXAXXXXXAXBXXXXXXXXXABAAXXXXXXAXXAXAXXXXXXXBXXXXXXXAXXXXXXXXAXXXXBXXXBAXAXXXAXXXXXXXAAXXXXXXXXXXAXXXXXXBXXAXXBXXAXXXXXXBXBXXAXXXXBXXXXXAXXXXXXXXXBXXXXXXXXXXXXXXBXXXXXXBABXXXXXXBXXXXXXXXBXXXXAXXXXX...

output:

Accepted: 2002

result:

points 1.0 Correct. Query Count: 2002 (no more than n+2).

Test #90:

score: 95
Accepted
time: 10ms
memory: 4292kb

input:

ABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB...

output:

Accepted: 2001

result:

points 1.0 Correct. Query Count: 2001 (no more than n+2).

Test #91:

score: 95
Accepted
time: 10ms
memory: 4060kb

input:

BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

output:

Accepted: 2001

result:

points 1.0 Correct. Query Count: 2001 (no more than n+2).

Test #92:

score: 95
Accepted
time: 10ms
memory: 4292kb

input:

XAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

output:

Accepted: 2001

result:

points 1.0 Correct. Query Count: 2001 (no more than n+2).

Test #93:

score: 95
Accepted
time: 10ms
memory: 4284kb

input:

YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

output:

Accepted: 2001

result:

points 1.0 Correct. Query Count: 2001 (no more than n+2).

Test #94:

score: 95
Accepted
time: 11ms
memory: 4004kb

input:

AXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...

output:

Accepted: 2002

result:

points 1.0 Correct. Query Count: 2002 (no more than n+2).

Test #95:

score: 95
Accepted
time: 11ms
memory: 4104kb

input:

BXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...

output:

Accepted: 2002

result:

points 1.0 Correct. Query Count: 2002 (no more than n+2).

Test #96:

score: 95
Accepted
time: 11ms
memory: 4288kb

input:

XBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB...

output:

Accepted: 2002

result:

points 1.0 Correct. Query Count: 2002 (no more than n+2).

Test #97:

score: 95
Accepted
time: 11ms
memory: 4032kb

input:

YBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB...

output:

Accepted: 2002

result:

points 1.0 Correct. Query Count: 2002 (no more than n+2).

Test #98:

score: 95
Accepted
time: 6ms
memory: 4028kb

input:

AYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY...

output:

Accepted: 2002

result:

points 1.0 Correct. Query Count: 2002 (no more than n+2).

Test #99:

score: 95
Accepted
time: 10ms
memory: 4124kb

input:

BYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY...

output:

Accepted: 2002

result:

points 1.0 Correct. Query Count: 2002 (no more than n+2).

Test #100:

score: 95
Accepted
time: 10ms
memory: 4132kb

input:

XYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY...

output:

Accepted: 2002

result:

points 1.0 Correct. Query Count: 2002 (no more than n+2).

Test #101:

score: 95
Accepted
time: 10ms
memory: 4000kb

input:

YXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...

output:

Accepted: 2002

result:

points 1.0 Correct. Query Count: 2002 (no more than n+2).

Test #102:

score: 95
Accepted
time: 10ms
memory: 4056kb

input:

AYYXYBXXBXXXYXYYXXBXXXXYXYBYXYXXYBXYXYYYYXYYXXXXYXYXXYYYYXXYYXXYYXXYBBYYYYYYYYYXBBXXXYYXXBYXXYYYXYYXYYXYXXXYXXBYBBYXXYXXXXXBXBXBYYXXYXXYXYXXYYYYYYXYXBXYYXYBYYXBXXYXYXXXYYXXXYBYXXYBYYXXXBYYXXXXXXXXYYYYXYXYYXBBXXYXYXBXXYBYYXXBYYYYYXYXYXXYYYXYXYXBXXXYXXYXYYBXXYXYXXYYYYYYXYXBXYYYXYXXXXXXXYXYYXYXXYYYBYXX...

output:

Accepted: 2002

result:

points 1.0 Correct. Query Count: 2002 (no more than n+2).

Test #103:

score: 95
Accepted
time: 10ms
memory: 4004kb

input:

BXXXXXXYXYYXYYXXXYYAYXYXXAYXYXYAXYYXYYXYXAXXXYYXXYXYAYAXXYYAXYXXYXXYYYYYXXYXAYXXXXYXXYYYYYYYXXXXYAAYXXXXYYYYYXYXXYYYXXYYXYXXXXAYXAAYXAAXYXYXAXYYYAXXYYYAXYYYXXXXXXYXAXYYYXYAYXXXXYYXYXXYYXXXYXXYYYXYYXYXYXYYXXXXYYYXXYYAXXYYYXYXYXYYYXXXYYXYXYYXYXYAXXAYXYXYYYYYXYXXXXXYAAYXXAXYXYYXXXYXXXXYXYYXYXYXYXAAXXXX...

output:

Accepted: 2002

result:

points 1.0 Correct. Query Count: 2002 (no more than n+2).

Test #104:

score: 95
Accepted
time: 12ms
memory: 4284kb

input:

XBYBBYYBYBBYBYBBBBYYYYBBYBYBBBAYYYBAYABBBBYYBYYYYBBAYYBBYYBYYABBYYBYBBAAYBBYBABBBBYYYYYBBBYBYBBAYBAYYYYYBYBYBYBBYYAYBBYYYYBBYBBYBAAYBBYYYBYBYYBYYBYYYBYBYBBBBYYYYYYYABBABBYAYYYBBBBYBABAYYYBBYBABABYBBBAYBBBBBYBAYBBBYBBBBBBYYBYYYYYBYYBBBAAYYYYYYBYABBBBBBYYYYYYYAYYBYYBYYBYYABYBYBBAYYYYBYYYYBYBBBYBBYYAYB...

output:

Accepted: 2002

result:

points 1.0 Correct. Query Count: 2002 (no more than n+2).

Test #105:

score: 95
Accepted
time: 12ms
memory: 4288kb

input:

YXBBXXXBBBBBBABBXXBXXBBXXBBBXXXXXBXBXBBABXBBXBBXXXBXBXBXBBXBXBXXABXBXXBBXBXBXBBXBXXXBXXBBABBBBAXXXXXBBBBXBAXXBXXXAXBBBXXXBXXXXBBXBBABXBXXBBXXABBBXBXABBBBBBXXXXBBBBBAXBXBBBXXBBABXXXXXXBBXXBBXXXXXXBXABXBBXBXBXXXAXXAXXXXXXABBXBBABBXBAXBXXAXBAXXAXBXXXXBBXBXXXABBXBXABABXXXXXXABBBABBBBXXXBXBBBXBABBXXAXXAB...

output:

Accepted: 2002

result:

points 1.0 Correct. Query Count: 2002 (no more than n+2).

Test #106:

score: 95
Accepted
time: 12ms
memory: 4260kb

input:

ABBBBBBBYBYBBBYYYBBBYBBYYYXBYYYBYBYYBBBYBYBBBBXBYBBBYBYYBYBBBYYYBYXBXYBYBBYBYBYBBBYBYYYBBBYBBYYYYBBYYYBBBBYBBBYBBXBYYYBYBBBYBBBBYBYYBBYBXYBYYYYBYBBBBYBYBBYYBBXBYBYXYBYBYYBYYBXYBYYXYYBBYBBBYYBBBYBBBBBYYBYYYBBBBYYBBBYBYBXYYYXXYBXXYYBYBBYYYBBYYBXBYYBBYYBYBBYBYBYYBBBBBBYYYYBBYXXBBYBYBXBYYYYYYBYBYYYBBYYX...

output:

Accepted: 2001

result:

points 1.0 Correct. Query Count: 2001 (no more than n+2).

Test #107:

score: 95
Accepted
time: 9ms
memory: 4292kb

input:

BYYXAAYXYAYXYAAYYYYYAAYAAAAAYYXYAYAYXXAAYAAYAAAAXYYAAYAAAYYYYYAYYAYXYXXYAYYAYAXXAAXAYYYAAYYYXAYAYXYYYYXAAAYYAAAAYAAAAAYYYAYAYAYAYXAYYYAXAYAYXAAAXAAYAAAXXAAAYYYYYAAAYAYAYXYAAAXXYAYYAXXAYXAAXXAAAYAAAAAAAYAYXAYYAAYXAAYYYYAXYAYAYAAAAXAAYAYAAYXYYXYYAYXAAAYAYAAYAAYAYXYYAYAYAYXYXAXAYYYAAYYAYYAYXAYYAAXXYAYY...

output:

Accepted: 2001

result:

points 1.0 Correct. Query Count: 2001 (no more than n+2).

Test #108:

score: 95
Accepted
time: 12ms
memory: 4052kb

input:

XBYBAAAYAAAYBAAYAAYAYAAYYAAAYYAYAYBYYAAYAYAAYAYYYAABAAYYBYAAAAYBAABAAABAYAAYABAYYYYAAYAYYAAAYYAYYAYYAAAAAAYYAAAYABAYYAABYBYYAAYAYYAAYBAYYAYAYYYAAYAYAAYYYAYAAYAABYYYBBAYAYYYYAAAYAYABAYYAAYYYBYYAYAAYAYBYBYYYBAAAAAYYYYYYAYYYYBYYAAYYYAAYYAYYYAYAYAAABAYABAAYYAYAYYAYABBABYABYYYAYAAYYAAYBAAAYYABAAYYABYBBAA...

output:

Accepted: 2001

result:

points 1.0 Correct. Query Count: 2001 (no more than n+2).

Test #109:

score: 95
Accepted
time: 12ms
memory: 4048kb

input:

YAXAXXXBXAXBAAAABXXXBBXBAAAXAXAXAAXABAXXAAAXAAXXAAXXXAXBAXXXXAXXAABXXAAAAXAAXAAXXAXAXXXXAXXAXAXXXXXXAXAXXAXBAXAAXAXBBAXAXXAXBXABAAXAXAXAXXXXXAXBXAXXXABBXBAXXXAABBXXXAXAAXXAXAAAXAXBAXXAXXAAAABXXAXXAAAAAAAAXAAAXXXAAXABAXAAAAXXAABAXXXXXAXAAAXXXXXAAAXAXXAXAAXBAXXAXBABXXXAXBAXXXAAAAAAXAXAXXAAAAAABXXAXAXA...

output:

Accepted: 2001

result:

points 1.0 Correct. Query Count: 2001 (no more than n+2).

Test #110:

score: 95
Accepted
time: 12ms
memory: 4056kb

input:

AXXBBBBBBBXYBXBBBXXBXXYYXXXYBYBXXYXBBXBYBXXBXXXBYXXBYXBXXXBBBXBBBXYXBBXYYBXXXXBBXXYBXXBXBBBXBXXBXBXXXBXXXBXBBBXYBBXXXXXXBBXXBYBXBBXBXXXBXXBXBYXBXXBXXXBBXXXBBXBXXBYXYBBXYBBBBXXBBXXYXBXXBXBXXXXXXXXBYXXBBXXBXYBXBXBBYBBXBXXBXBXBBBXXXBXXXBXXXBBXXBBXXBYXXXBBBYXXBXBBXBBBBXBBYXBXBBXBBXXXXXXYXXYBBXXYBXXBBYXB...

output:

Accepted: 2002

result:

points 1.0 Correct. Query Count: 2002 (no more than n+2).

Test #111:

score: 95
Accepted
time: 12ms
memory: 4256kb

input:

BXAAYXAAAXAAXXAXAAYAXAXAAAAAXAXXAXXXAYXAXXAAXXXYAXYAAAXXAAAAAXXAAAAXYYXAAAAAAXYXXAAXXXAYAXAYXXXXXXXXXAAYAXAAAXXXAXXXXXAAAXXAYXXYAAAAAAXXXXXAAXAXAXAXYXAAAXAYAXAXXXAAXXYAXAXXAXAAAXXAAAAYXXAYXAXYAAAXAAXAAXAYAAXXXXYAXAXXAAYAAAXXXXXAXXAXAAAYAAXXXXAAXXAXAXXAXAXXAYYXAAAAAYAXYAAXAAYXAXXXXXAXXXXAYAXAAAXAAAXA...

output:

Accepted: 2001

result:

points 1.0 Correct. Query Count: 2001 (no more than n+2).

Test #112:

score: 95
Accepted
time: 10ms
memory: 4004kb

input:

XBBBAABBAAAABABBBBAAABAAABABAAAABAAABBABYYBAABBBAAYABAYABABABAABABBAAYBYAYAABBBAYAABBAABBBBBABBYBBBABAAAAABAABBABYYBBYBAAABAAYABABABABAAABAAYABBYBBBBABAAABYBABBBAAABABBBABAABAABYBYABBAAAABABYABAAABABAYABYABBBYYAABBBABAYAAYBABYYBABABBAAAABAYBABBBAABAAAABAABAYABYBAABAABBAABBYYAYBABAAAABBBABAABBYBAAAAB...

output:

Accepted: 2001

result:

points 1.0 Correct. Query Count: 2001 (no more than n+2).

Test #113:

score: 95
Accepted
time: 10ms
memory: 4256kb

input:

YABBABABAABXABBXAAABABBBBBBABAAXABAAAAXBBABBABBXAABABBBAXAABAABAABABAAXAABBABBAABBBABABABABBBAAXAAABABXBBABAAABAAAABBABAAAAAXXBBBBAAAAAAAAAABABBBBBXAAABAAXAAAAABAABBBBBBBBBBAABAABABBBBBBBBBXBBBBAAXABBXBXABBAAAAABXXABXAXBAAABBXBBBBXBXAAABAAABABABBAABBAAABBAAAAAABBABBAAABAAABABBAAAXABBAAXBBBAABAABAABA...

output:

Accepted: 2001

result:

points 1.0 Correct. Query Count: 2001 (no more than n+2).

Test #114:

score: 95
Accepted
time: 0ms
memory: 3820kb

input:

BAXAA

output:

Accepted: 6

result:

points 1.0 Correct. Query Count: 6 (no more than n+2).

Test #115:

score: 95
Accepted
time: 0ms
memory: 3816kb

input:

YABABXBAXB

output:

Accepted: 12

result:

points 1.0 Correct. Query Count: 12 (no more than n+2).

Test #116:

score: 95
Accepted
time: 0ms
memory: 4032kb

input:

AYXXYBYYYYXYYBY

output:

Accepted: 16

result:

points 1.0 Correct. Query Count: 16 (no more than n+2).

Test #117:

score: 95
Accepted
time: 0ms
memory: 3708kb

input:

XBAABAAAYYYYBYAAYYAY

output:

Accepted: 21

result:

points 1.0 Correct. Query Count: 21 (no more than n+2).

Test #118:

score: 95
Accepted
time: 0ms
memory: 3884kb

input:

YXABXXAAAABABABAXBBABXBXX

output:

Accepted: 27

result:

points 1.0 Correct. Query Count: 27 (no more than n+2).

Test #119:

score: 95
Accepted
time: 0ms
memory: 3776kb

input:

AXBYYXYXBXXBYBBXBXXYXYBBYXBXXX

output:

Accepted: 32

result:

points 1.0 Correct. Query Count: 32 (no more than n+2).

Test #120:

score: 95
Accepted
time: 0ms
memory: 4028kb

input:

YXAXBAXABXXXBABXXBAAAXAXBAAAXBXABAA

output:

Accepted: 36

result:

points 1.0 Correct. Query Count: 36 (no more than n+2).

Test #121:

score: 95
Accepted
time: 0ms
memory: 3820kb

input:

XAAABYAABYYAYYBBBBBABBAYBYAAAYBYBAYYBAYB

output:

Accepted: 42

result:

points 1.0 Correct. Query Count: 42 (no more than n+2).

Test #122:

score: 95
Accepted
time: 0ms
memory: 3800kb

input:

AYXBYXBYXXYXXYBYBYXBYBYXXXBYYXYYXBXBBXYXBXBBY

output:

Accepted: 46

result:

points 1.0 Correct. Query Count: 46 (no more than n+2).

Test #123:

score: 95
Accepted
time: 0ms
memory: 3840kb

input:

YAABXBBABBBBABXAXABBABABABBAABXXABAABBXAABBBABAXBX

output:

Accepted: 52

result:

points 1.0 Correct. Query Count: 52 (no more than n+2).

Test #124:

score: 95
Accepted
time: 0ms
memory: 3860kb

input:

ABBBB

output:

Accepted: 6

result:

points 1.0 Correct. Query Count: 6 (no more than n+2).

Test #125:

score: 95
Accepted
time: 0ms
memory: 3756kb

input:

BXAAAAXXYA

output:

Accepted: 11

result:

points 1.0 Correct. Query Count: 11 (no more than n+2).

Test #126:

score: 95
Accepted
time: 0ms
memory: 3800kb

input:

XBAAAABAYYAAAAA

output:

Accepted: 16

result:

points 1.0 Correct. Query Count: 16 (no more than n+2).

Test #127:

score: 95
Accepted
time: 0ms
memory: 4004kb

input:

YABAAAAAAAAAAAAAAAAA

output:

Accepted: 21

result:

points 1.0 Correct. Query Count: 21 (no more than n+2).

Test #128:

score: 95
Accepted
time: 0ms
memory: 4032kb

input:

AXXYXBYXXBXXXYXXXXXYXXYXX

output:

Accepted: 27

result:

points 1.0 Correct. Query Count: 27 (no more than n+2).

Test #129:

score: 95
Accepted
time: 0ms
memory: 3744kb

input:

BXXXXXXXXXXAYXXXXXXXXXXXXAXXXX

output:

Accepted: 32

result:

points 1.0 Correct. Query Count: 32 (no more than n+2).

Test #130:

score: 95
Accepted
time: 0ms
memory: 4000kb

input:

XBBYBBBYBBBBABBBBBBBBAYBABYBYBBBAAB

output:

Accepted: 37

result:

points 1.0 Correct. Query Count: 37 (no more than n+2).

Test #131:

score: 95
Accepted
time: 0ms
memory: 3800kb

input:

YBBBBBBXBBBBABXBBXBBBXXBBABBXBBBBBAXBBXB

output:

Accepted: 42

result:

points 1.0 Correct. Query Count: 42 (no more than n+2).

Test #132:

score: 95
Accepted
time: 0ms
memory: 3836kb

input:

AXYYYYYYBYYYBYYYYYYYYYYYXYYYYYYYXBYXYYYYYYBXX

output:

Accepted: 47

result:

points 1.0 Correct. Query Count: 47 (no more than n+2).

Test #133:

score: 95
Accepted
time: 0ms
memory: 3836kb

input:

BYYAYAYYXYYAYYYYYYAYYYYYYYYXAYYYXYYYYYYYYYYAYYYYYY

output:

Accepted: 51

result:

points 1.0 Correct. Query Count: 51 (no more than n+2).

Test #134:

score: 95
Accepted
time: 0ms
memory: 4036kb

input:

XYYYYYYYYYYYABBYYYYYYYYYBYYYYYYYYYYYYBAYYYYYYYYYYYYYBYY

output:

Accepted: 57

result:

points 1.0 Correct. Query Count: 57 (no more than n+2).

Test #135:

score: 95
Accepted
time: 0ms
memory: 4032kb

input:

YXAXXXXXBXXBXXXXXXXXXXXXAXXXXXXAXAAXXBXXXXXBXBXXXXXXAXXXXXXX

output:

Accepted: 61

result:

points 1.0 Correct. Query Count: 61 (no more than n+2).

Test #136:

score: 95
Accepted
time: 0ms
memory: 3840kb

input:

ABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB

output:

Accepted: 61

result:

points 1.0 Correct. Query Count: 61 (no more than n+2).

Test #137:

score: 95
Accepted
time: 0ms
memory: 3752kb

input:

BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

output:

Accepted: 56

result:

points 1.0 Correct. Query Count: 56 (no more than n+2).

Test #138:

score: 95
Accepted
time: 0ms
memory: 3800kb

input:

XAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

output:

Accepted: 51

result:

points 1.0 Correct. Query Count: 51 (no more than n+2).

Test #139:

score: 95
Accepted
time: 0ms
memory: 4036kb

input:

YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

output:

Accepted: 46

result:

points 1.0 Correct. Query Count: 46 (no more than n+2).

Test #140:

score: 95
Accepted
time: 0ms
memory: 3840kb

input:

AXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

output:

Accepted: 42

result:

points 1.0 Correct. Query Count: 42 (no more than n+2).

Test #141:

score: 95
Accepted
time: 0ms
memory: 4024kb

input:

BXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

output:

Accepted: 37

result:

points 1.0 Correct. Query Count: 37 (no more than n+2).

Test #142:

score: 95
Accepted
time: 0ms
memory: 3860kb

input:

XBBBBBBBBBBBBBBBBBBBBBBBBBBBBB

output:

Accepted: 32

result:

points 1.0 Correct. Query Count: 32 (no more than n+2).

Test #143:

score: 95
Accepted
time: 0ms
memory: 4032kb

input:

YBBBBBBBBBBBBBBBBBBBBBBBB

output:

Accepted: 27

result:

points 1.0 Correct. Query Count: 27 (no more than n+2).

Test #144:

score: 95
Accepted
time: 0ms
memory: 4040kb

input:

AYYYYYYYYYYYYYYYYYYY

output:

Accepted: 22

result:

points 1.0 Correct. Query Count: 22 (no more than n+2).

Test #145:

score: 95
Accepted
time: 0ms
memory: 3804kb

input:

BYYYYYYYYYYYYYY

output:

Accepted: 17

result:

points 1.0 Correct. Query Count: 17 (no more than n+2).

Test #146:

score: 95
Accepted
time: 0ms
memory: 4032kb

input:

XYYYYYYYYY

output:

Accepted: 12

result:

points 1.0 Correct. Query Count: 12 (no more than n+2).

Test #147:

score: 95
Accepted
time: 0ms
memory: 3884kb

input:

YXXXX

output:

Accepted: 7

result:

points 1.0 Correct. Query Count: 7 (no more than n+2).

Test #148:

score: 95
Accepted
time: 0ms
memory: 4040kb

input:

AXYYY

output:

Accepted: 7

result:

points 1.0 Correct. Query Count: 7 (no more than n+2).

Test #149:

score: 95
Accepted
time: 0ms
memory: 4000kb

input:

BXXXXYYXAX

output:

Accepted: 12

result:

points 1.0 Correct. Query Count: 12 (no more than n+2).

Test #150:

score: 95
Accepted
time: 0ms
memory: 3796kb

input:

XBBYYBAYBYYYBBB

output:

Accepted: 17

result:

points 1.0 Correct. Query Count: 17 (no more than n+2).

Test #151:

score: 95
Accepted
time: 0ms
memory: 4000kb

input:

YXXXBXBBXBBBBXABXXXX

output:

Accepted: 22

result:

points 1.0 Correct. Query Count: 22 (no more than n+2).

Test #152:

score: 95
Accepted
time: 0ms
memory: 3784kb

input:

ABBBBBYYBYYBBBXYYBXXYYBYB

output:

Accepted: 26

result:

points 1.0 Correct. Query Count: 26 (no more than n+2).

Test #153:

score: 95
Accepted
time: 0ms
memory: 3832kb

input:

BYAYXYYAAAAYXXAYYYYYAXYYAAYAYY

output:

Accepted: 31

result:

points 1.0 Correct. Query Count: 31 (no more than n+2).

Test #154:

score: 95
Accepted
time: 0ms
memory: 3756kb

input:

XYYYYYAAAYYYAAAAAYYBAYAYYYYAYYAAYYA

output:

Accepted: 36

result:

points 1.0 Correct. Query Count: 36 (no more than n+2).

Test #155:

score: 95
Accepted
time: 0ms
memory: 3996kb

input:

YXXXBXXAXAAAXXXAAXBXAXXXXXAXXAAXAXXXAAXX

output:

Accepted: 41

result:

points 1.0 Correct. Query Count: 41 (no more than n+2).

Test #156:

score: 95
Accepted
time: 0ms
memory: 3800kb

input:

ABXBBBXBXYBXBXXXXYYXBBXXBBXXBXBBBXYBBYXXXBXXX

output:

Accepted: 47

result:

points 1.0 Correct. Query Count: 47 (no more than n+2).

Test #157:

score: 95
Accepted
time: 0ms
memory: 3840kb

input:

BYXXXXYAXAAAXAAYXXXAYXAXXAXXAAXXAXXAAXXXYXXAAXAAXX

output:

Accepted: 52

result:

points 1.0 Correct. Query Count: 52 (no more than n+2).

Test #158:

score: 95
Accepted
time: 0ms
memory: 3804kb

input:

XAABBBAABYBYAABYBABABBAAYABBABAYYBBAABBYABABBBBBBYBBBAB

output:

Accepted: 57

result:

points 1.0 Correct. Query Count: 57 (no more than n+2).

Test #159:

score: 95
Accepted
time: 0ms
memory: 3804kb

input:

YAXBBBABABXBABBXBXBXAAABBAABAAXBBBABBABBXBBABAXBAABAAABAXAXB

output:

Accepted: 62

result:

points 1.0 Correct. Query Count: 62 (no more than n+2).

Extra Test:

score: 0
Extra Test Passed