QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#129698#2742. Combosomethingnew#100 ✓20ms4072kbC++203.2kb2023-07-22 22:15:022024-07-04 00:53:53

Judging History

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

  • [2024-07-04 00:53:53]
  • 评测
  • 测评结果:100
  • 用时:20ms
  • 内存:4072kb
  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-22 22:15:02]
  • 提交

answer

//  ↘ ⬇ ⬇ ⬇ ⬇ ⬇ ↙
//  ➡ @roadfromroi ⬅
//  ↗ ⬆ ⬆ ⬆ ⬆ ⬆ ↖
#include <iostream>
#include "vector"
#include "algorithm"
#include "numeric"
#include "climits"
#include "iomanip"
#include "bitset"
#include "cmath"
#include "map"
#include "deque"
#include "array"
#include "set"
#include "combo.h"
#define all(x) x.begin(), x.end()
using namespace std;
char getc(char c, char crb) {
    if (c >= crb)
        return c + 1;
    return c;
}
string tepa = "ABXY";
int prs(string s) {
    for (auto &i : s)
        i = tepa[i-'A'];
    //cout << s << endl;
    return press(s);
}
string mv(string s) {
    for (auto &i : s)
        i = tepa[i-'A'];
    return s;
}
string guess_sequence(int n) {
    string ba = "BA";
    int coins = prs(ba);
    char cba;
    if (coins > 0) {
        string reba = "A";
        coins = prs(reba);
        if (coins) {
            cba = 'A';
        } else {
            cba = 'B';
        }
    } else {
        string reba = "C";
        coins = prs(reba);
        if (coins) {
            cba = 'C';
        } else {
            cba = 'D';
        }
    }
    if (n == 1) {
        string s(1, cba);
        return mv(s);
    }
    string corba(1, cba);
    for (int i = 1; i < n - 1; ++i) {
        string res;
        res += corba + getc('A', cba);
        for (int j = 0; j < 3; ++j) {
            res += corba + getc('B', cba) + getc('A' + j, cba);
        }
        coins = prs(res);
        if (coins == corba.size())
            corba += getc('C', cba);
        else if (coins == corba.size() + 1)
            corba += getc('A', cba);
        else if (coins == corba.size() + 2)
            corba += getc('B', cba);
        else
            while (1);
    }
    string res = corba + getc('A', cba);
    if (prs(res) == n)
        return mv(res);
    res = corba + getc('B', cba);
    if (prs(res) == n) {
        return mv(res);
    }
    res = corba + getc('C', cba);
    //cerr << res << endl;
    return mv(res);
}
/*
namespace {

    constexpr int MAX_N = 2000;
    constexpr int MAX_NUM_MOVES = 8000;

    int N;
    std::string S;

    int num_moves;

    void wrong_answer(const char *MSG) {
        printf("Wrong Answer: %s\n", MSG);
        exit(0);
    }

}  // namespace

int press(std::string p) {
    if (++num_moves > MAX_NUM_MOVES) {
        wrong_answer("too many moves");
    }
    int len = p.length();
    if (len > 4 * N) {
        wrong_answer("invalid press");
    }
    for (int i = 0; i < len; ++i) {
        if (p[i] != 'A' && p[i] != 'B' && p[i] != 'X' && p[i] != 'Y') {
            wrong_answer("invalid press");
        }
    }
    int coins = 0;
    for (int i = 0, j = 0; i < len; ++i) {
        if (j < N && S[j] == p[i]) {
            ++j;
        } else if (S[0] == p[i]) {
            j = 1;
        } else {
            j = 0;
        }
        coins = std::max(coins, j);
    }
    return coins;
}

int main() {
    S = string(2000, 'Y');
    S[0] = 'X';
    N = S.length();
    num_moves = 0;
    std::string answer = guess_sequence(N);
    if (answer != S) {
        wrong_answer("wrong guess");
        exit(0);
    }
    printf("Accepted: %d\n", num_moves);
    return 0;
}
*/

详细

Subtask #1:

score: 5
Accepted

Test #1:

score: 5
Accepted
time: 1ms
memory: 3740kb

input:

ABB

output:

Accepted: 4

result:

points 1.0 Correct

Test #2:

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

input:

ABX

output:

Accepted: 5

result:

points 1.0 Correct

Test #3:

score: 5
Accepted
time: 1ms
memory: 3740kb

input:

ABY

output:

Accepted: 5

result:

points 1.0 Correct

Test #4:

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

input:

AXB

output:

Accepted: 4

result:

points 1.0 Correct

Test #5:

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

input:

AXX

output:

Accepted: 5

result:

points 1.0 Correct

Test #6:

score: 5
Accepted
time: 1ms
memory: 3956kb

input:

AXY

output:

Accepted: 5

result:

points 1.0 Correct

Test #7:

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

input:

AYB

output:

Accepted: 4

result:

points 1.0 Correct

Test #8:

score: 5
Accepted
time: 1ms
memory: 3780kb

input:

AYX

output:

Accepted: 5

result:

points 1.0 Correct

Test #9:

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

input:

AYY

output:

Accepted: 5

result:

points 1.0 Correct

Test #10:

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

input:

BAA

output:

Accepted: 4

result:

points 1.0 Correct

Test #11:

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

input:

BAX

output:

Accepted: 5

result:

points 1.0 Correct

Test #12:

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

input:

BAY

output:

Accepted: 5

result:

points 1.0 Correct

Test #13:

score: 5
Accepted
time: 1ms
memory: 3912kb

input:

BXA

output:

Accepted: 4

result:

points 1.0 Correct

Test #14:

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

input:

BXX

output:

Accepted: 5

result:

points 1.0 Correct

Test #15:

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

input:

BXY

output:

Accepted: 5

result:

points 1.0 Correct

Test #16:

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

input:

BYA

output:

Accepted: 4

result:

points 1.0 Correct

Test #17:

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

input:

BYX

output:

Accepted: 5

result:

points 1.0 Correct

Test #18:

score: 5
Accepted
time: 1ms
memory: 3836kb

input:

BYY

output:

Accepted: 5

result:

points 1.0 Correct

Test #19:

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

input:

XAA

output:

Accepted: 4

result:

points 1.0 Correct

Test #20:

score: 5
Accepted
time: 1ms
memory: 3780kb

input:

XAB

output:

Accepted: 5

result:

points 1.0 Correct

Test #21:

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

input:

XAY

output:

Accepted: 5

result:

points 1.0 Correct

Test #22:

score: 5
Accepted
time: 1ms
memory: 3844kb

input:

XBA

output:

Accepted: 4

result:

points 1.0 Correct

Test #23:

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

input:

XBB

output:

Accepted: 5

result:

points 1.0 Correct

Test #24:

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

input:

XBY

output:

Accepted: 5

result:

points 1.0 Correct

Test #25:

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

input:

XYA

output:

Accepted: 4

result:

points 1.0 Correct

Test #26:

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

input:

XYB

output:

Accepted: 5

result:

points 1.0 Correct

Test #27:

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

input:

XYY

output:

Accepted: 5

result:

points 1.0 Correct

Test #28:

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

input:

YAA

output:

Accepted: 4

result:

points 1.0 Correct

Test #29:

score: 5
Accepted
time: 1ms
memory: 3736kb

input:

YAB

output:

Accepted: 5

result:

points 1.0 Correct

Test #30:

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

input:

YAX

output:

Accepted: 5

result:

points 1.0 Correct

Test #31:

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

input:

YBA

output:

Accepted: 4

result:

points 1.0 Correct

Test #32:

score: 5
Accepted
time: 1ms
memory: 3716kb

input:

YBB

output:

Accepted: 5

result:

points 1.0 Correct

Test #33:

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

input:

YBX

output:

Accepted: 5

result:

points 1.0 Correct

Test #34:

score: 5
Accepted
time: 1ms
memory: 3736kb

input:

YXA

output:

Accepted: 4

result:

points 1.0 Correct

Test #35:

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

input:

YXB

output:

Accepted: 5

result:

points 1.0 Correct

Test #36:

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

input:

YXX

output:

Accepted: 5

result:

points 1.0 Correct

Subtask #2:

score: 95
Accepted

Test #37:

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

input:

A

output:

Accepted: 2

result:

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

Test #38:

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

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: 3720kb

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: 3720kb

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: 3956kb

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: 3792kb

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: 3856kb

input:

AY

output:

Accepted: 4

result:

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

Test #44:

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

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: 3656kb

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: 3796kb

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: 3660kb

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: 3652kb

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: 3784kb

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: 3780kb

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: 3732kb

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: 3732kb

input:

YX

output:

Accepted: 4

result:

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

Test #53:

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

input:

YXBBXXAXXBAXXXAABBBAABBBBBAABAAXAAXBBBXABBXBABABXBXBXAXAXBAAXAXXXAABXBXXXAXAXABXBBBBAXBBABBXXXAXBXABXAXAAXAXBABXAABXBAAAAAXXXABXXBAXBABAXXABAXAXAABBXBXBBBAXXXXXAABXAXAABBAABBAXXXBXXABAXXABAABXAAXABBXXBXBABXBABAABXXBABXXBBBXAXABBBXXAAABBAXABBABBXBAAAXBBXBBBBBXBXAXBXXAABBXABABAXBAAABBBAAAXXAAAXXABBXXA...

output:

Accepted: 2001

result:

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

Test #54:

score: 95
Accepted
time: 18ms
memory: 3852kb

input:

XBBABYBABAYYBBAYBYYYYYBBAAAABYAYBYABYYBAAAYYBYAAYABYYYBAYAAABAAYBBYYABYYYBBAAABBAAAAAYYAYAYBAYABYBBYYYYYBYAYYBAYABYYYABYYBBYBBAYBYAAABYAYAABAYYAYAYYBYYBYBBYBYYAYBYBYAABAYABBYBBAYBAYBBABYABYYBYAYBYAAYABABAYYBYAAAYABBAYYYAYAAYBAYYAYYABBABAYYBAYBBABBAYABBBABYYYBBYYBAYBBAYAABAAABAYAYAYBBAABBBBAAAYYAABAB...

output:

Accepted: 2001

result:

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

Test #55:

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

input:

BXAYAYXAXYYAXXAYAAAAAXYYAYAAXAYYAXYXYYXAXAAYXXAAYYYYYXYYXYAYAAXYYXYAYYYAXYXXXYYXAXAXXYXAAAAXYXXAAAAYYYXAAXXYYYXXAYYXAXAXXAXAYXXXYXYXAAXYXXXXAYXAAAYXYYAXXAAXAXAXXXXAAXAXYXYAAAXAAYXXYXYXAXAAYXAXYYYYYYAAXXAYAYAYAAXYXYAYYYYAXYXYAAXYXXAXAYYYYYXYAAXXXXYAXYAXAXYXYAAAYYXAYYXAXYYYYYXXAYYAAYAAXYXXAYAXXXAXYYYX...

output:

Accepted: 2002

result:

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

Test #56:

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

input:

YABAAXXBBAXXBXAAXBAAXAABBXAXXXABBAABBAXXABXXBABBBBXBBBXXXAAXBBAXBBBXXBXXXBXBABBAXBXABXBXXAAXXXBABBBAAXBXAXBBABBABBAABAAAAXBXXXXXBAAAXABBAAAXXABAABABXAAABXXXABBABABAXAABBABAAXABBAXAAXAXABAXAXAXXBABXXAAXBBXAXAABAAAXBABBABAAAXXABAAXXABBXABAXBXAXBBAABBAXBAXAABBXBBAXBXABXBBABBXXBBBBXBBXBABABBAXXBXAXBAABX...

output:

Accepted: 2002

result:

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

Test #57:

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

input:

XYYBYABYAAAYAAAABYYABAYBYABABBYABABBBBYABBAYBBBABBBYABBAAYYYBAAABBAABBBBYYYABABYBBBBYBAYYYBBYABAYYYYABBBAAYYBABBBAYABABAABBABBBYYBAYBYAAYYBYYAYBBABAYYYYABYYABBAYAYBAYBYAYYAABABAABAABAAYYABYBAAYABBYBYAYBYBBAAAYBABABAAYBBAYYBAABAABBYBBAYYAYYYBBBBABYBBYBYAAYYABBAABABYAABBABAYAABYYAYBAAYBBYYYABYBYYBBYBY...

output:

Accepted: 2002

result:

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

Test #58:

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

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: 3844kb

input:

YXXXABXAXXAABAXXXXBAAAXBXBBXXBAABABBAX

output:

Accepted: 40

result:

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

Test #60:

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

input:

BYYYYAYYAYYAAXAYYXAXAYXXYYYXYYYAYXXAAYXYXXYXAYYAYAYYXXXAX

output:

Accepted: 59

result:

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

Test #61:

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

input:

BXAXYAYXYYYXYAXYAAXXAXAAXXYAAXAYXXAXXYYXXAXAAXYYAAAYXYXAAAXXAXYAAXAXYAAAXYAX

output:

Accepted: 78

result:

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

Test #62:

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

input:

XBAABABYABBBAYBABABABBAYBYAABYYBAABYYBABBAYAAAYABBYBBAABBBAAYAAABBBYAAYAYYAABYBBBBYBBBYYBBYBYYA

output:

Accepted: 96

result:

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

Test #63:

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

input:

BYYXYXXAYAYXAXXAXAAAYXYYXXAYXXXAYYXXYYYXAYYYXXYXAXAYXYXXXYYXYYXYXAAXYYYXYXAXAAXAYXAXAXXAXYAXAYAAXYXXYYXAAYYAXAXAAA

output:

Accepted: 115

result:

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

Test #64:

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

input:

ABXYBBXXXYXYXBBBXXBXBYXYYXBBBYBYYBXXXXBBYXYYYYBXYYXBBXXYBXYBXBYBBBYYYXYYXXBBXBBYBYBYXBBXBXBBXXXBBBBBBXYBXYXYXYBBYXBXXBBXXYYBBYXXBYYXX

output:

Accepted: 135

result:

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

Test #65:

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

input:

XYYBABYBYYBBBBABYBAAYAYABABBAYYAYABAABBAAYBBABBBYBBYBBBABABAAAABBYYABBYYAAYBBYBBAYBABAAABYAYBBYBYAABABABBAYYBAYYAYYBAYBYAYBAYBAYABBYYAAABAYYBAABAABBAAAY

output:

Accepted: 154

result:

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

Test #66:

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

input:

BXAYXAAXAXAYXYAYYAXXYYAAXYAAYXYXYAAAAYAXAYXYXXAXAXAAXAXAYAYXYAXAYXXXXYYAYAXAAYAXYYXXXYAYYAYYXYYAYYAXAAAYAXYYYXAYYXXYAAXXXAYXXYAYXYXAYXYAAXAXAXAYYYYAYAYAXAXXXYAAXAAAAXAAAYY

output:

Accepted: 173

result:

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

Test #67:

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

input:

YXBBBAABBAXBBXABXAXBBAABBXXXBBAAABABAXBAAXBXABXXBXABABXBAXXAABBXAABAXAABAAXABBXXABBBXABABAXBXAAAXXBBBBXBAABBAAABXXXXAXBBXABAXBAXABBBBXABXXBBBBBAAAAXAAABAXBBXAXAAXAXBBAABXAABBABBAXAAAXABABXXB

output:

Accepted: 192

result:

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

Test #68:

score: 95
Accepted
time: 19ms
memory: 3856kb

input:

XAYAAABYYBAYYYABAAABBABYBBAAABYABBAYABAAABBBYBYAAAAAYBBAAYAABAYYYAYYAYABYBYBABAYYBYYYBYYYYAYAAYBABAAAAYYYYAYYBYBYBBBAYBAABAYYABBAABAAYBABAABYYYAABYYBYBABYYBAYABAABBBBBBAABYYBABAABAAYYBBYBAABBBBYAYYYYYBYYYAYAYBBAYBBABABBYABBABAYYBYAYABAYBBYAABYBYBBBYBYBBYBYAYABAAYBYYYBYBAYBYYYAAYAAYAYABYYABBBAYBBYYAY...

output:

Accepted: 1992

result:

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

Test #69:

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

input:

AXBYBBXBXXBBBXBYYBBXYXXXXBBBXBYBBBXYBBXBXXBBYYYYBXBYXYYXXYBBBXXYYYXBXXYBXBXXXXBXBBYYXBBXYBYBYYBBXXXYYXYYXBXXXYYYYBBXXXBXBXBBYXBXXXBYBBYYXXYBYXBXYXBYYXXXXBBYXBBXYXYXYYXYBXYYYYYYXYBBXXXBBYXYXXYXXYBYYXBBXBXXXXBYBXYXYBYBBYBBBXXYBXYBYBXYYYBXYBBBXBBYYBYYBXBXYXBXXBYYBXYYYYBBXXBYYYYBYBXXBXBBBBBXXYYYBXYBBBXB...

output:

Accepted: 1993

result:

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

Test #70:

score: 95
Accepted
time: 18ms
memory: 3984kb

input:

YBXXBBBXBBABBABAXBBXBBABAXBABAAXAXAXBABABAAXXXXBXBAXAXBBXBXABAAAAABXBBXBBAAABXABXXABABBBAXXXXBXXXXBABXABBBXAXAABABAAAAABAXBBABBBXBAAXBAAAAXXBABAAXABXXAXAXAXXBBXBXBBXABXXABBBAABXABBXXAXBXAXAXXAXBBABXXAABBBXXBAXXBABBXXAXXABAAXXBBBXBBXAXXXXXBAXBABAABAXBAXXAXAXABXXXBAAXBBAXXBXAXXAXBBABBBABAAABXABABAAABX...

output:

Accepted: 1993

result:

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

Test #71:

score: 95
Accepted
time: 18ms
memory: 3896kb

input:

XYAYABBBYBYBYBAYAAYBYBBAAYYBBYAYAYABBAAYBYYBBBBBAAYAAYAAAAABBAAAAYYYBBYAAYABBBYABAABABYABYAAYYABYAAAYBABAABYYABAAAYYYYYBABYBYYAAAYBABABYBAAAYBBABBYYBAYYYYYABBYYBYABBAYABBABBAAYYBYBBYBYAYYBYYYBAYAABABBYBYBABAYBYYYBAABABYAAAYYBAAABYAYYYBBAYYYABBYAYYYYYBBYAAYBBYBYBYAYBBBBABAABBYYAAABAAAYAYBYYBYBBYABAAB...

output:

Accepted: 1995

result:

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

Test #72:

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

input:

YAAAXBABBXAXXXXBBAAAXBBXXXBXXABXBAXXAXABBBAAAXAAAAAXXBBABXABBBBXBBXXBXAABXXBXABAXABABBAAAABXBXBXAXXAXXBAXAAXBABABBAAAXXAAAAXAXAAXBXXXBBAABXXXABXBXBBBBABBBAXXBXABXBAAXBAXBXAABAXAXXXBXAXAXBAXXBBBBXBABABXAABABXBXBBBABBAAABABAXBXXBBXAAAABBXBAAXABABAXXXXAABABXAXBXAXXXAAXBXBAABBABBXAXABXABXAXAXAAXAXBXXAXB...

output:

Accepted: 1996

result:

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

Test #73:

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

input:

AXYXBYBBBBBBXXXXBBBXBBXYXYBBBXXYYXXXBYXXXYBXXYBBYYXYBBBYBBXYXXXYBBBXYYBXBBYBXXXBXYYYYYBXXXYBXYYYBYXYBBXXXXBXBYXYBXBBYXBBBXYXBYYXYXYYBBYYBBXYYXXBYXYXYXBBYXBYYYBXBYBXXBXBBBXYBXXBYYXBXBXYYYXBXBBXXXYYYBBBYXXYBYXBBXYXXBXYYYXYYYBYBYBXXXXYXXYBYBXXYYYYBYYYYYYXXYYYYBBBBBYBXXBYBXYBBBYXBBXBYXBYYXBXXYXXBYBBBXBX...

output:

Accepted: 1996

result:

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

Test #74:

score: 95
Accepted
time: 19ms
memory: 3988kb

input:

XYYBAYBAAYYABYAABAAAAABYBBABBAABAYYBYYYYAYABBYAYBYYBAAABYYYBAAAYYBYABBYAYYBBBYYAYBBAYYYBYYYBBAYYYABBYAYYYYAAYABYYBABAAAABYYBYYABBYYAAABYYBYAABYBABYYBABABYBBAYBABBBBBBBYYYAAAYAABBYBYYBYYYBBBABAYBBBBBYABYBYYAYAYYBBBYAABAABYBAYABBABYYYYBAYAYABAYYYYYYAAYYYBABBYBBBBYABBBBBABYBYBYYAAAYYBYYBYYBABYBYYAAAABA...

output:

Accepted: 1998

result:

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

Test #75:

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

input:

YBAXAAABAABAAAXABXXXXBBAXBAXAAAXXXAXABAABXXAABXXAXXXAXBAXAXXAXBABXBAXBXXXBXBBABBBXABAXBBXBBXABXABBABXXXBBXBXABBBAABAXAAABAABXBXAXXAXXXBAAXBXXXXBAABXAXABAAXXBBBAAXAXXBXBABAXXABBABXXXBAABAAAABAXAXBXAABBBBBXAAXBXBXAXXXXXAABAAXBAAXABAAAAAABABAAXAABXAXBABXBBABBBBAAXABXBBXXXAXXBXBBXABBAXXXXBAXXBAABAXBBABA...

output:

Accepted: 1998

result:

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

Test #76:

score: 95
Accepted
time: 18ms
memory: 3852kb

input:

BAYYYYXXAXAXAAXAYAYAAXAXXYYYAYXYXYXAXXYYAAAAYXXXYAAYAXAYXYYYAYAYXAAXAYXYAYYAYXYYAAYYYYXAYXAXYXYXXXXAYYYAAXYXYXXXAXAYAXYAYYYYYYYXXYXXAAYXXAYAAXAXXAAYAXYYYXXAAYXYAYYXYXXYYXAAYXXXXYYAAXAXYYAYAXAAYXYAXYYXYYXAXYYXXXXYXYAXAXAYXAAYAYXAXXYXXXXYXXXAXAYYXYAAAXXXXXXXXYXAAXYXYXYYXYYAAXXXXXXXXXAXXYXYYXYAYXYAXYYX...

output:

Accepted: 1999

result:

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

Test #77:

score: 95
Accepted
time: 18ms
memory: 3992kb

input:

XAAAYAYYABAYYYBAYBAYYYBAYAAYAAYAYAABAAAYBABYBYBAYYABYABABBYBBBBBBBBAAYBBAYBYAYAAYABBYYYABABABAYBYYBAYBAYYAYABYBAABABYYAYAYBBYYAYYYBAAYYYBYBAYBBBBBYBAAABBBYBAAABYABBBABYAAAAYYYYYAYBBAYAAYYYYAAYAAABABYABBAAAYAABBBYABYYAYYYBYBYABYYAYYYBYBYAYBYYYYBYYYBBAYBAYABYBAYAAYBBYAYYBYBYAYYYABAAAYAYYBBAYBBBAAABYYB...

output:

Accepted: 2001

result:

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

Test #78:

score: 95
Accepted
time: 17ms
memory: 3968kb

input:

ABBBBBBXBBBBBBBBXYBBBBBBBBBBXXYBYBBBYBBBBBBBBBBXBBBBBYBBBBBBXXYBYXYYBBYBBBBBBBBBBBBBBBBYBBBBBYBBBBXBBYXBBXBYBBYBXBBBBBBBBBYYBXBBBYBBBBBBBXBBBBBBBBBBBXXBBBBYXYBBBBBBBBBBBBYBBBBXBBBBBBBBBBBBBBBBBBBBBBBBBBBBYBBBBXBBBBBBBBBBBYBBBBBBBBBBYBBBBYBBBBBYXBBBBBBBBBBBBYBBBBBBBBBBBBBYYXBXBBBXBBBYBBBBBBBBBBBBBBBY...

output:

Accepted: 2002

result:

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

Test #79:

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

input:

BAAXAAAAAAAAAAXAAXAAAXAAAAAXAAAAAAAAAAAYAAAXAAYAAAAAAAXAAYAAAAAAAAAAAAAAAAXAXAAAYYAYAAAAXAAAAAAAYAAAYYAAAAAAAAXAAAAAAXYAAAAAAAYAAAXAXAAAAXAAAAXYAAAAAXAAAAAAAAAAAAAAAAAAAXAAAAYAAAYAAAAYYAAAAYAAYAAAAAAAAAXAYAAXXXAYAAAAAAAAAAAXXAXAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAXXAAYAAAYYAAAAAAAAAAAAAXAAAAAAAAAAYYAXAY...

output:

Accepted: 2001

result:

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

Test #80:

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

input:

XAABBAYAAAAYAAAAAAAAYABABYAAABAAAAAAAYAABAABYAAAAABAAYBAYAAAABAAAAABABABAAAAAABAYABAAAAAAYAAAAABBABAAAAABAAAAABAYAAAAABAABAAAAAAAAYBAAAAABAAAAAAAAAAAAAAAYABAAAAAAABAAAAAABAAAAAABAAAAAAAABAAAAABAAAAAAAAAAAAAAAYAAAAAAYABAAAABAAAAAAAAAAAAAAAAAAABAAAYAAYAAAYABAABAAAYAABAAAAAAABBAAABAAAAAAAAAABAAAAAAABAA...

output:

Accepted: 2001

result:

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

Test #81:

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

input:

YAAAAAABAAAAXAAAAAAAAAAXABABAAAAAAAAAAAAXAXAAAXAAABXAAABAABBAABAAAAABAAXAAAAABAAAABAAAAAABXAAABXAAAAAAXAAAAAAAAAAAXXAAAAAXAXAAXAXAXAAAABABAAAAAXAAAAAXBBAAAAAAAAAAAAAAAAAAAAAAAAAAXAAAAAAAAABAAABAAAAAXAAAAAAAAXAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAXAAAABBXAAAABAAAXBAAAAABAAAXAAAAAAAAAABAAABABAAAAAAAXAAXX...

output:

Accepted: 2001

result:

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

Test #82:

score: 95
Accepted
time: 14ms
memory: 3904kb

input:

AXXXXXXXXXXXXXXXBYXXXXYXXXXBXXBXYYXXYYXXXXXXXXYXXXXXXXXXXXXXXXXXXXYYBXXBXXXXXXXXXXBXXBXXXXXBXBXXXXXXXXXXBYYXXXXXXXXXXYYXXXXXXXXXXXXXXXXXXBXXXXXXXXXXXXXBXXXXXXXXXXXXYXXXXXXXXXXXXXXXXXXXXXBXXXXXXYXXXXXBXXXXXXXXXXYYXXXXXBBXXXXXBYXXXXXXXXXXXXXYXXXXXXXXXBXBXXXXXBXXXXYXXXXXXXXXXYXBXXXXXXXXBXYXXXXBXXBBXXBX...

output:

Accepted: 2002

result:

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

Test #83:

score: 95
Accepted
time: 14ms
memory: 3972kb

input:

BXYXYXXXXYAYXXXAXXXXYXXAAXXXXXXXAYXXXXYYXXAXXXXXXYXXAXXXXXXXXXAXAXXXXXXYXAXXYXXAXXYXXXXXXXXXXXXXXXAXXXXXXXXXYXXXXXAXXYXXXYXXXXAYXXXXXAXXXXXAXXXXXXXXAXAXXXXXXXXAXXYXXYYXXXXXXXXAXXAXXXXYXXAXAXYXYXXXXXYXXXXXYXAXAXYXXXXXXXYXXXXAXYXXXXXXXYXXXXXXXAXYXXXXXYXXXYXAXXXYAXXYYXXXYXXXXYXXXXXYXXXXXXXXXXXAXAXXXXXX...

output:

Accepted: 2002

result:

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

Test #84:

score: 95
Accepted
time: 17ms
memory: 3904kb

input:

XABBBBBBBBBBBBBBBYBBBBBBBBBBBABBBBBBBBBBBBBBYBBBBBBBBBBBBABBBBBAAABBBBBBYYBBBBABBBBBBBABAABABAYBBABBBBABBYBBABBBBBABBBABAYBBABBBBBABYBBBBYBBBBBBBBBBBBBBBBABBBBYBBBBYBBBBBBBBBBBBBBBBBBBBBBBBBBBABBBBBBBBBYBBBYBABBBBBBBYBBBABBBBBBBBBBBBBYYBBBBAABBBYBBBBBAABABBBBBBAYBBBBBBBBBBBBBBBBBBBBABBYBBABBABBABBAB...

output:

Accepted: 2002

result:

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

Test #85:

score: 95
Accepted
time: 14ms
memory: 3992kb

input:

YBBAXBBBXBBBBBBABABBXBBBBBBBBBBBBXBBXBBBAABXBBBABXBBBBBBBXBBBBBBBXXBXBBBBBBXBBXBBXBBABBXXBBBBBBABABBBBBBBBBBBBBBBBABBBBBBBBBBBBBBBBABXXBBBXABBBABBBBBBBBAXBBBBBBBBBBBXBBBBBBBBXBXXBXBBBBXBBBBBBBBBBXBABBBBBBBXABBXBBBABBBBBBBBBABBBBBBBXBBBBBBBBABBBBXBBBBAABABBBBBXBABXBBBBBBBABXBBBBXBBBAXBBXBBBBBBABBABAB...

output:

Accepted: 2002

result:

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

Test #86:

score: 95
Accepted
time: 14ms
memory: 3856kb

input:

AYYYXYYYYYYYYYYXYYBBYYYYBYYYXYYYYXYXYBYXBYBYYYYYYYXBYYYYYYYYYBYYBXYYYYYYYYYYYXYYXYYYYYYYYYYYYBYYXYYYYYYBYYYYYYYYYYYBYYYYYYBYYYYYYYYYYXYBYYYYYBYYXYYYYXYYXYYXYYYBYYYBYYYYYYYYYYYYYYYYYYYBYYYYYBYYBBYXBYYXYYYXYYYYYYYYYYBYYYYYYYYYBBYYXYYYYYYYXYYYYYYYYYYYXYYYYYYYXXBYXYYBXYYYXYYYYYYYYYYYBYBYBBYYYYYYYYYYYYXB...

output:

Accepted: 2002

result:

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

Test #87:

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

input:

BYYYYYYYXAYYYYYYAYXAYYYXYYYYYYYXYYXYAYYYYYYAYYYYYYAAYAXYYXYYYXYYYAYYYYAYXYYYYAAYYYXYAXYAXXYAYYYYYYAYYYAAYAYAYYYXYYYYYYXYYAYYYYYYAYYYYYYYYYYYYXXXYAYYYXYYYAAYYYYYYAYYYYYYYXYYXYYYYYYXYYYYYXYYYAYXYYYYXYAYYYYYYYYYYYYAAYAYYYYYYYYYYYYYYXAYYYYYYYYYYYAAYYAYXYYXAYYYYYAYXXYXXYYXYYYXYYYYYYYYXYYYYYYYYYYYYYAXAYXA...

output:

Accepted: 2001

result:

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

Test #88:

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

input:

XABBYYYBBYYYYBYYYYAYYYYYYYYYAYYBYYYYYYBAYBYYYYBYYYAYYBYYYYYYYYYABYYYYYYYYBYAYYYYYYYYYYYYYYAYYYYYAYBYYAYYAYYYYYYYYYBYYYYYBYAYYYYYYYBYYYYYYYBYYAYYYYYYYBBYYYYYYBYYYYYBYAYYYYYAYYYYYYYYYBBYYAYYYYYYYYYYBYBYYYYBYYYYBYYYBYYYYYYYYYYYYYYYBYYYYAYYYAYBYYYYBAYYYYAYBYYYYYYYYYYYYYYYYYYYYBYYYYYYYYYYAYYYYYYYYAYYYYYY...

output:

Accepted: 2002

result:

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

Test #89:

score: 95
Accepted
time: 18ms
memory: 3888kb

input:

YBXXXAXXXXXXBXXXXXBXXXXXXXXXXBXXBXXBXAXXXXXXXXXXXXXXXXXXABXAXXAXXXXXXXAXAXXBXXXXXXXXBXXXXXXXXXXXXBXXXXXXXXAXXXXXAXBXXXXXXXXXABAAXXXXXXAXXAXAXXXXXXXBXXXXXXXAXXXXXXXXAXXXXBXXXBAXAXXXAXXXXXXXAAXXXXXXXXXXAXXXXXXBXXAXXBXXAXXXXXXBXBXXAXXXXBXXXXXAXXXXXXXXXBXXXXXXXXXXXXXXBXXXXXXBABXXXXXXBXXXXXXXXBXXXXAXXXXX...

output:

Accepted: 2002

result:

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

Test #90:

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

input:

ABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB...

output:

Accepted: 2001

result:

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

Test #91:

score: 95
Accepted
time: 14ms
memory: 3888kb

input:

BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

output:

Accepted: 2001

result:

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

Test #92:

score: 95
Accepted
time: 17ms
memory: 3896kb

input:

XAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

output:

Accepted: 2001

result:

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

Test #93:

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

input:

YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

output:

Accepted: 2001

result:

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

Test #94:

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

input:

AXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...

output:

Accepted: 2002

result:

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

Test #95:

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

input:

BXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...

output:

Accepted: 2002

result:

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

Test #96:

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

input:

XBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB...

output:

Accepted: 2002

result:

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

Test #97:

score: 95
Accepted
time: 13ms
memory: 3852kb

input:

YBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB...

output:

Accepted: 2002

result:

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

Test #98:

score: 95
Accepted
time: 17ms
memory: 3896kb

input:

AYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY...

output:

Accepted: 2002

result:

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

Test #99:

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

input:

BYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY...

output:

Accepted: 2002

result:

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

Test #100:

score: 95
Accepted
time: 14ms
memory: 3888kb

input:

XYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY...

output:

Accepted: 2002

result:

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

Test #101:

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

input:

YXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...

output:

Accepted: 2002

result:

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

Test #102:

score: 95
Accepted
time: 19ms
memory: 3988kb

input:

AYYXYBXXBXXXYXYYXXBXXXXYXYBYXYXXYBXYXYYYYXYYXXXXYXYXXYYYYXXYYXXYYXXYBBYYYYYYYYYXBBXXXYYXXBYXXYYYXYYXYYXYXXXYXXBYBBYXXYXXXXXBXBXBYYXXYXXYXYXXYYYYYYXYXBXYYXYBYYXBXXYXYXXXYYXXXYBYXXYBYYXXXBYYXXXXXXXXYYYYXYXYYXBBXXYXYXBXXYBYYXXBYYYYYXYXYXXYYYXYXYXBXXXYXXYXYYBXXYXYXXYYYYYYXYXBXYYYXYXXXXXXXYXYYXYXXYYYBYXX...

output:

Accepted: 2002

result:

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

Test #103:

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

input:

BXXXXXXYXYYXYYXXXYYAYXYXXAYXYXYAXYYXYYXYXAXXXYYXXYXYAYAXXYYAXYXXYXXYYYYYXXYXAYXXXXYXXYYYYYYYXXXXYAAYXXXXYYYYYXYXXYYYXXYYXYXXXXAYXAAYXAAXYXYXAXYYYAXXYYYAXYYYXXXXXXYXAXYYYXYAYXXXXYYXYXXYYXXXYXXYYYXYYXYXYXYYXXXXYYYXXYYAXXYYYXYXYXYYYXXXYYXYXYYXYXYAXXAYXYXYYYYYXYXXXXXYAAYXXAXYXYYXXXYXXXXYXYYXYXYXYXAAXXXX...

output:

Accepted: 2002

result:

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

Test #104:

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

input:

XBYBBYYBYBBYBYBBBBYYYYBBYBYBBBAYYYBAYABBBBYYBYYYYBBAYYBBYYBYYABBYYBYBBAAYBBYBABBBBYYYYYBBBYBYBBAYBAYYYYYBYBYBYBBYYAYBBYYYYBBYBBYBAAYBBYYYBYBYYBYYBYYYBYBYBBBBYYYYYYYABBABBYAYYYBBBBYBABAYYYBBYBABABYBBBAYBBBBBYBAYBBBYBBBBBBYYBYYYYYBYYBBBAAYYYYYYBYABBBBBBYYYYYYYAYYBYYBYYBYYABYBYBBAYYYYBYYYYBYBBBYBBYYAYB...

output:

Accepted: 2002

result:

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

Test #105:

score: 95
Accepted
time: 16ms
memory: 3888kb

input:

YXBBXXXBBBBBBABBXXBXXBBXXBBBXXXXXBXBXBBABXBBXBBXXXBXBXBXBBXBXBXXABXBXXBBXBXBXBBXBXXXBXXBBABBBBAXXXXXBBBBXBAXXBXXXAXBBBXXXBXXXXBBXBBABXBXXBBXXABBBXBXABBBBBBXXXXBBBBBAXBXBBBXXBBABXXXXXXBBXXBBXXXXXXBXABXBBXBXBXXXAXXAXXXXXXABBXBBABBXBAXBXXAXBAXXAXBXXXXBBXBXXXABBXBXABABXXXXXXABBBABBBBXXXBXBBBXBABBXXAXXAB...

output:

Accepted: 2001

result:

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

Test #106:

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

input:

ABBBBBBBYBYBBBYYYBBBYBBYYYXBYYYBYBYYBBBYBYBBBBXBYBBBYBYYBYBBBYYYBYXBXYBYBBYBYBYBBBYBYYYBBBYBBYYYYBBYYYBBBBYBBBYBBXBYYYBYBBBYBBBBYBYYBBYBXYBYYYYBYBBBBYBYBBYYBBXBYBYXYBYBYYBYYBXYBYYXYYBBYBBBYYBBBYBBBBBYYBYYYBBBBYYBBBYBYBXYYYXXYBXXYYBYBBYYYBBYYBXBYYBBYYBYBBYBYBYYBBBBBBYYYYBBYXXBBYBYBXBYYYYYYBYBYYYBBYYX...

output:

Accepted: 2002

result:

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

Test #107:

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

input:

BYYXAAYXYAYXYAAYYYYYAAYAAAAAYYXYAYAYXXAAYAAYAAAAXYYAAYAAAYYYYYAYYAYXYXXYAYYAYAXXAAXAYYYAAYYYXAYAYXYYYYXAAAYYAAAAYAAAAAYYYAYAYAYAYXAYYYAXAYAYXAAAXAAYAAAXXAAAYYYYYAAAYAYAYXYAAAXXYAYYAXXAYXAAXXAAAYAAAAAAAYAYXAYYAAYXAAYYYYAXYAYAYAAAAXAAYAYAAYXYYXYYAYXAAAYAYAAYAAYAYXYYAYAYAYXYXAXAYYYAAYYAYYAYXAYYAAXXYAYY...

output:

Accepted: 2002

result:

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

Test #108:

score: 95
Accepted
time: 15ms
memory: 3856kb

input:

XBYBAAAYAAAYBAAYAAYAYAAYYAAAYYAYAYBYYAAYAYAAYAYYYAABAAYYBYAAAAYBAABAAABAYAAYABAYYYYAAYAYYAAAYYAYYAYYAAAAAAYYAAAYABAYYAABYBYYAAYAYYAAYBAYYAYAYYYAAYAYAAYYYAYAAYAABYYYBBAYAYYYYAAAYAYABAYYAAYYYBYYAYAAYAYBYBYYYBAAAAAYYYYYYAYYYYBYYAAYYYAAYYAYYYAYAYAAABAYABAAYYAYAYYAYABBABYABYYYAYAAYYAAYBAAAYYABAAYYABYBBAA...

output:

Accepted: 2001

result:

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

Test #109:

score: 95
Accepted
time: 19ms
memory: 3904kb

input:

YAXAXXXBXAXBAAAABXXXBBXBAAAXAXAXAAXABAXXAAAXAAXXAAXXXAXBAXXXXAXXAABXXAAAAXAAXAAXXAXAXXXXAXXAXAXXXXXXAXAXXAXBAXAAXAXBBAXAXXAXBXABAAXAXAXAXXXXXAXBXAXXXABBXBAXXXAABBXXXAXAAXXAXAAAXAXBAXXAXXAAAABXXAXXAAAAAAAAXAAAXXXAAXABAXAAAAXXAABAXXXXXAXAAAXXXXXAAAXAXXAXAAXBAXXAXBABXXXAXBAXXXAAAAAAXAXAXXAAAAAABXXAXAXA...

output:

Accepted: 2002

result:

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

Test #110:

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

input:

AXXBBBBBBBXYBXBBBXXBXXYYXXXYBYBXXYXBBXBYBXXBXXXBYXXBYXBXXXBBBXBBBXYXBBXYYBXXXXBBXXYBXXBXBBBXBXXBXBXXXBXXXBXBBBXYBBXXXXXXBBXXBYBXBBXBXXXBXXBXBYXBXXBXXXBBXXXBBXBXXBYXYBBXYBBBBXXBBXXYXBXXBXBXXXXXXXXBYXXBBXXBXYBXBXBBYBBXBXXBXBXBBBXXXBXXXBXXXBBXXBBXXBYXXXBBBYXXBXBBXBBBBXBBYXBXBBXBBXXXXXXYXXYBBXXYBXXBBYXB...

output:

Accepted: 2002

result:

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

Test #111:

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

input:

BXAAYXAAAXAAXXAXAAYAXAXAAAAAXAXXAXXXAYXAXXAAXXXYAXYAAAXXAAAAAXXAAAAXYYXAAAAAAXYXXAAXXXAYAXAYXXXXXXXXXAAYAXAAAXXXAXXXXXAAAXXAYXXYAAAAAAXXXXXAAXAXAXAXYXAAAXAYAXAXXXAAXXYAXAXXAXAAAXXAAAAYXXAYXAXYAAAXAAXAAXAYAAXXXXYAXAXXAAYAAAXXXXXAXXAXAAAYAAXXXXAAXXAXAXXAXAXXAYYXAAAAAYAXYAAXAAYXAXXXXXAXXXXAYAXAAAXAAAXA...

output:

Accepted: 2001

result:

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

Test #112:

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

input:

XBBBAABBAAAABABBBBAAABAAABABAAAABAAABBABYYBAABBBAAYABAYABABABAABABBAAYBYAYAABBBAYAABBAABBBBBABBYBBBABAAAAABAABBABYYBBYBAAABAAYABABABABAAABAAYABBYBBBBABAAABYBABBBAAABABBBABAABAABYBYABBAAAABABYABAAABABAYABYABBBYYAABBBABAYAAYBABYYBABABBAAAABAYBABBBAABAAAABAABAYABYBAABAABBAABBYYAYBABAAAABBBABAABBYBAAAAB...

output:

Accepted: 2002

result:

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

Test #113:

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

input:

YABBABABAABXABBXAAABABBBBBBABAAXABAAAAXBBABBABBXAABABBBAXAABAABAABABAAXAABBABBAABBBABABABABBBAAXAAABABXBBABAAABAAAABBABAAAAAXXBBBBAAAAAAAAAABABBBBBXAAABAAXAAAAABAABBBBBBBBBBAABAABABBBBBBBBBXBBBBAAXABBXBXABBAAAAABXXABXAXBAAABBXBBBBXBXAAABAAABABABBAABBAAABBAAAAAABBABBAAABAAABABBAAAXABBAAXBBBAABAABAABA...

output:

Accepted: 2001

result:

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

Test #114:

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

input:

BAXAA

output:

Accepted: 6

result:

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

Test #115:

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

input:

YABABXBAXB

output:

Accepted: 12

result:

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

Test #116:

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

input:

AYXXYBYYYYXYYBY

output:

Accepted: 17

result:

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

Test #117:

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

input:

XBAABAAAYYYYBYAAYYAY

output:

Accepted: 22

result:

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

Test #118:

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

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: 3772kb

input:

AXBYYXYXBXXBYBBXBXXYXYBBYXBXXX

output:

Accepted: 32

result:

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

Test #120:

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

input:

YXAXBAXABXXXBABXXBAAAXAXBAAAXBXABAA

output:

Accepted: 36

result:

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

Test #121:

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

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: 3860kb

input:

AYXBYXBYXXYXXYBYBYXBYBYXXXBYYXYYXBXBBXYXBXBBY

output:

Accepted: 47

result:

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

Test #123:

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

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: 3720kb

input:

ABBBB

output:

Accepted: 6

result:

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

Test #125:

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

input:

BXAAAAXXYA

output:

Accepted: 11

result:

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

Test #126:

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

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: 3768kb

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: 3772kb

input:

AXXYXBYXXBXXXYXXXXXYXXYXX

output:

Accepted: 27

result:

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

Test #129:

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

input:

BXXXXXXXXXXAYXXXXXXXXXXXXAXXXX

output:

Accepted: 32

result:

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

Test #130:

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

input:

XBBYBBBYBBBBABBBBBBBBAYBABYBYBBBAAB

output:

Accepted: 37

result:

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

Test #131:

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

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: 3728kb

input:

AXYYYYYYBYYYBYYYYYYYYYYYXYYYYYYYXBYXYYYYYYBXX

output:

Accepted: 47

result:

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

Test #133:

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

input:

BYYAYAYYXYYAYYYYYYAYYYYYYYYXAYYYXYYYYYYYYYYAYYYYYY

output:

Accepted: 52

result:

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

Test #134:

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

input:

XYYYYYYYYYYYABBYYYYYYYYYBYYYYYYYYYYYYBAYYYYYYYYYYYYYBYY

output:

Accepted: 57

result:

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

Test #135:

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

input:

YXAXXXXXBXXBXXXXXXXXXXXXAXXXXXXAXAAXXBXXXXXBXBXXXXXXAXXXXXXX

output:

Accepted: 62

result:

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

Test #136:

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

input:

ABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB

output:

Accepted: 61

result:

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

Test #137:

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

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: 3740kb

input:

XAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

output:

Accepted: 51

result:

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

Test #139:

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

input:

YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

output:

Accepted: 46

result:

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

Test #140:

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

input:

AXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

output:

Accepted: 42

result:

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

Test #141:

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

input:

BXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

output:

Accepted: 37

result:

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

Test #142:

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

input:

XBBBBBBBBBBBBBBBBBBBBBBBBBBBBB

output:

Accepted: 32

result:

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

Test #143:

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

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: 3952kb

input:

AYYYYYYYYYYYYYYYYYYY

output:

Accepted: 22

result:

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

Test #145:

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

input:

BYYYYYYYYYYYYYY

output:

Accepted: 17

result:

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

Test #146:

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

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: 3752kb

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: 3948kb

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: 3720kb

input:

BXXXXYYXAX

output:

Accepted: 12

result:

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

Test #150:

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

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: 3720kb

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: 3656kb

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: 3868kb

input:

BYAYXYYAAAAYXXAYYYYYAXYYAAYAYY

output:

Accepted: 32

result:

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

Test #154:

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

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: 3772kb

input:

YXXXBXXAXAAAXXXAAXBXAXXXXXAXXAAXAXXXAAXX

output:

Accepted: 42

result:

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

Test #156:

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

input:

ABXBBBXBXYBXBXXXXYYXBBXXBBXXBXBBBXYBBYXXXBXXX

output:

Accepted: 47

result:

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

Test #157:

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

input:

BYXXXXYAXAAAXAAYXXXAYXAXXAXXAAXXAXXAAXXXYXXAAXAAXX

output:

Accepted: 52

result:

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

Test #158:

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

input:

XAABBBAABYBYAABYBABABBAAYABBABAYYBBAABBYABABBBBBBYBBBAB

output:

Accepted: 57

result:

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

Test #159:

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

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