QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#772629#2192. Balls of BumavolfridAC ✓6ms5864kbC++20993b2024-11-22 20:52:182024-11-22 20:52:18

Judging History

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

  • [2024-11-22 20:52:18]
  • 评测
  • 测评结果:AC
  • 用时:6ms
  • 内存:5864kb
  • [2024-11-22 20:52:18]
  • 提交

answer

#include <iostream>
#include <vector>
#include <string>

using namespace std;

int main() {
  string S;
  cin >> S;

  int N = S.size();
  vector<pair<char, int>> buckets;
  for (int i = 0; i < N; i++) {
    int j = i + 1;
    while (j < N && S[i] == S[j]) {
      j++;
    }
    buckets.emplace_back(S[i], j - i);
    i = j - 1;
  }

  if (buckets.size() % 2 == 0) {
    cout << 0 << "\n";
    return 0;
  }

  int M = buckets.size();
  if (buckets[M / 2].second == 1) {
    cout << 0 << "\n";
    return 0;
  }

  // cerr << buckets.size() << "\n";
  // for (const auto& [x, y] : buckets) {
  //   cerr << x << " " << y << "\n";
  // }
  // cerr << "\n\n";

  for (int i = 1; i <= M / 2; i++) {
    if (buckets[M / 2 - i].second + buckets[M / 2 + i].second < 3 || 
      buckets[M / 2 - i].first != buckets[M / 2 + i].first) {
        cout << 0 << "\n";
        return 0;
      }
  }

  cout << buckets[M / 2].second + 1 << "\n";
  return 0;
}

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3604kb

input:

BBWWBB

output:

3

result:

ok 1 number(s): "3"

Test #2:

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

input:

BWWB

output:

0

result:

ok 1 number(s): "0"

Test #3:

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

input:

BBWBB

output:

0

result:

ok 1 number(s): "0"

Test #4:

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

input:

OOOWWW

output:

0

result:

ok 1 number(s): "0"

Test #5:

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

input:

WWWOOOOOOWWW

output:

7

result:

ok 1 number(s): "7"

Test #6:

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

input:

ABCDEF

output:

0

result:

ok 1 number(s): "0"

Test #7:

score: 0
Accepted
time: 4ms
memory: 3872kb

input:

UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU...

output:

14238

result:

ok 1 number(s): "14238"

Test #8:

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

input:

SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS...

output:

12366

result:

ok 1 number(s): "12366"

Test #9:

score: 0
Accepted
time: 4ms
memory: 3808kb

input:

VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV...

output:

29991

result:

ok 1 number(s): "29991"

Test #10:

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

input:

SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS...

output:

7115

result:

ok 1 number(s): "7115"

Test #11:

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

input:

HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHSSSSSSSSSSSSSSSKKKK...

output:

24740

result:

ok 1 number(s): "24740"

Test #12:

score: 0
Accepted
time: 4ms
memory: 3992kb

input:

RRRRRRRRRRRRRRRRRRRRRRRRRRRRRSSSYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...

output:

22868

result:

ok 1 number(s): "22868"

Test #13:

score: 0
Accepted
time: 2ms
memory: 3980kb

input:

QBBBBBBBBBBBBBBBBBBBBTTTTTTTTEEXOHHZZZMMMMMMMMMMMMFFFFFFFSSSSSSSSSSSSRRAAAAAAAAAAAAAAAAAAAAAAAAEEEEEEUUUUUUSSSSSSSSSSSSSSSSSSSSQLLLLLLLLLLLLLLLLLLLLLDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUCCJJJL...

output:

10494

result:

ok 1 number(s): "10494"

Test #14:

score: 0
Accepted
time: 4ms
memory: 3928kb

input:

GGGGGGXAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPPPPPPPPPPPPPPPPPPPPPPPPPPYYYYYYYYYYKKKKKKKKKGGGGGGGGKKKKKKKKKKKKKKKSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSCCCCCCCQQQQQRRRRRREEEEEEEEEEEEEWWNNNNNNNJJKNNNNNNNNNIIIIIIINNNNNNNNNOIIIIIIINNNNNNNNNNNNNNNNNNNNCCMMMMMMMMMMMM...

output:

17617

result:

ok 1 number(s): "17617"

Test #15:

score: 0
Accepted
time: 6ms
memory: 5724kb

input:

CFFCCKKJLLOOGGLWWYYJJFFSEJJOONNMMVVPJJVEVVZZQYNPPIIAIIYJJYYQQGGPCZZOOZZMUUDMMRRDDZQQCCPPBNNUNNBUXXLGJVVGGLLVTZZFHHVVDDTTOOUUSOOHHRRQIICCQAAEETEEOTZZUZZRRHIYYZZNNHHGDDWGZZLLSYYZPPSSZKAFFHQBBZZJDDMMBKGGNHHOOTAFFVVTTNNAAJJWWQQTQBTRLGGZKYJJFFYYOOJJIIFFFCCBEQQJJMAMKKIRNIIEEFFWWOEDWWOBCCVVPPYPGGURFFMLLTRR...

output:

5243

result:

ok 1 number(s): "5243"

Test #16:

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

input:

RRVSSQQRDUUDPIISSRRCIIOOZZXWWKDCCRRPPNJGEZZCKKTTRRGBAARRRRNIGGVVHSSONAVZSSUUEEKKCTLLLLTTXXXXTTJJUCSSEEGGHCGGKHHJJQQSMEEXKSSQGGAHHVWFFFIIKKZINNWLBBYHHWPPYWWZZHYYAKRCCNNNNLLCZZPPNNRVUUZZVVGJBHUBBYYDDMCCXXFLLWWWVVPZMMWWXXAAIDDPPRTTIIEZXXORRJJRISSDXIIJJVELTTCGRRWWBBBOPPEMMMFRRGGBGGRRLVVOOEFFZNNBBVYEEXYY...

output:

9353

result:

ok 1 number(s): "9353"

Test #17:

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

input:

FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY...

output:

0

result:

ok 1 number(s): "0"

Test #18:

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

input:

TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT...

output:

0

result:

ok 1 number(s): "0"

Test #19:

score: 0
Accepted
time: 4ms
memory: 3944kb

input:

JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN...

output:

0

result:

ok 1 number(s): "0"

Test #20:

score: 0
Accepted
time: 4ms
memory: 3936kb

input:

GGGGGGGGGGGGGGGGGGGGGIQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQFFFFFFWWWWWWWWWWWJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJSHHHUUUUUUUUUUUUUUUOOOOOOOOOOOOOOOOOAAAAGGGTTTTTTBBBBBBBBBBXXXXXXXXXXXXXXXXXXXXXXXXXXXSSSSSSSSSSSSUUUUUUUUUUUUUUUUUUSSSSSSSSSSSSSSSSSSSSSSSSSHHHHHGGGGGGGGGTTTTTTTTTZZZZZZZXXXXXXXXXXXXXXXXXXXXXXXX...

output:

0

result:

ok 1 number(s): "0"

Test #21:

score: 0
Accepted
time: 6ms
memory: 5864kb

input:

KSSPZYYUHHFFBBXXYURIINNCTMMUSLHHMGBIWPPDDJJJHHFFKKQQKIIVHOONNVYYJSSOZDUUVVRRZYYZZWWPPFLNNLZZWWKEWZYYABHHNNSSUKKHHWWSSQGCCHUUYYDCDTTKKFFUISSIHHJPPNKMMPPBBSSLLAAAPMYHHIIQRRRWGEWHHUCZZJJYYHQLEESSRRHUUYJJLRLLEATDDQQWQFUBQAALTTXTDDAIJYGYYJCSLLAAAOOCCVVHHVVMMVZHJNNIIPPSSHKGMMLLRRWEERRBBVVJJJJPPDDEEFFQFFUH...

output:

0

result:

ok 1 number(s): "0"

Test #22:

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

input:

FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF...

output:

0

result:

ok 1 number(s): "0"

Test #23:

score: 0
Accepted
time: 4ms
memory: 3824kb

input:

OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII...

output:

0

result:

ok 1 number(s): "0"

Test #24:

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

input:

YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW...

output:

0

result:

ok 1 number(s): "0"

Test #25:

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

input:

UUUOOOOOOOOOOOOOOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXKKKKKKKFFFFFFFFFFFFFFFFFFFFFFFFFFQQQQQQQQQQQQQQQQQQQQQQQLLLLLLLLLLLLLLLLLLJJJJJJJJJJJJJAAAAANNNNMMMMMMMMMMMMMMMMMMMMTTTTTTTTTTTTTTTTTTTTTTTTTTTTTNNNLNNNNNNNNNNNSSSSSSSSSSSSSSSSSSSSJJVVQQQQQQQQQQQQQQQQQQQIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII...

output:

0

result:

ok 1 number(s): "0"

Test #26:

score: 0
Accepted
time: 6ms
memory: 5608kb

input:

IIQXXENCOGGGGTTDRUUHHQCGGSSTTBUNDSWBZSRRPPQURDDWAQHYYWWDFRRXUOOBUURRHCTTIITTWWLLBVSNFZZQRMMEEBBGGOOVOOZPPFQLLQQYJJIIZCCNNZZJJNNYDANBBXFAAYYCJKKTTJRRHHVFFTTZABIIYZOJDDNNXCNWWZZHHQQQWQYJMMPPVVGGJJYSZHHHTTQQROORRDDMMZZNNEDAJMMCCXBVAANHGGZZVTTMEEBBJJLLRRAAEEKTTNNUUSOAAZZWQQPAAOUUTFFCFTTPFFTTEEKKFYPWEEWW...

output:

0

result:

ok 1 number(s): "0"

Test #27:

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

input:

RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...

output:

0

result:

ok 1 number(s): "0"

Test #28:

score: 0
Accepted
time: 4ms
memory: 3700kb

input:

YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY...

output:

0

result:

ok 1 number(s): "0"

Test #29:

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

input:

KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLQYYYYYYYYYYYIIIIIIIPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP...

output:

0

result:

ok 1 number(s): "0"

Test #30:

score: 0
Accepted
time: 2ms
memory: 4112kb

input:

UUUUYYYYYYYPPPPPPPPPPZZZZLLLLLLLLLLLKKKKKKKKKKKKKKKKKKKKKKKKKRRRRRRRRRRRJJJJJJJJJJJJJJJJJJJJJNWWWWWWWWWWWWWWWWWWWWWRRRRRRRRRRRRIIIDDPPPPPPPPPEVVVVVVVBBBBBBBBBMMWNNNNNNNNFFFFFFFFWWWOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOEEEEEEDDDDDDDDDDDDDDDDDDDDDDDZZZZWWWWWWWWWWWWWWWWWWWWWWWWXXXXXXXXXX...

output:

0

result:

ok 1 number(s): "0"

Test #31:

score: 0
Accepted
time: 6ms
memory: 5684kb

input:

ZWNNLNDDOFFQZZSZZSCUUERRIIHFOXXUHHCCTDDCQQRRKKGGDDBPPSSZZYNNHOOVVJKFZIIHMMTCCUUSLLFFGGNOUUOOWWFZDCCWWXXSQLHIIKKHJIIEXJYYCCXXQCGNEEPHHHHUUFFQUUHHBRKPPHHODLLLFQQYMHHJPPIHUUVYFCCIIBBKWFWSSBBHHYTTJHXEEEELLAABBFFOOCCAMPPAACCPTTZXXAABBNNXGRRDGWIITSQQBBDDFLLTEEJJXNNAWWOOPPPWWXEEQWWWYYLLDTEEYBBJPPUBTTQVLIFU...

output:

23234

result:

ok 1 number(s): "23234"

Test #32:

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

input:

EYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY...

output:

0

result:

ok 1 number(s): "0"

Test #33:

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

input:

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...

output:

0

result:

ok 1 number(s): "0"

Test #34:

score: 0
Accepted
time: 4ms
memory: 3764kb

input:

UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ...

output:

0

result:

ok 1 number(s): "0"

Test #35:

score: 0
Accepted
time: 4ms
memory: 4108kb

input:

MMMMMMMMMMMMMMMMMMMUUUUUUUUUUUUUUWWWWWWWWWWWWWWYYSPPPPPPPPPPPPPPPPPGGGGGGGGGHVVVVVVVVVVVSSSSSSSSSSSSSSSSSSSSSQQQQQQQOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOKKKKKKKKKKKKKKKKKKKMMMMMMMMZZUUUUUUUUUUUUUCCCCCCXNNNNNNNNNNNNNNNNMMMMMFFFFIJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJWWWWWWEEEEEEEEEEEEEESSSLLLLLLLL...

output:

0

result:

ok 1 number(s): "0"

Test #36:

score: 0
Accepted
time: 6ms
memory: 5712kb

input:

GYYQQRRQQPIIIIDWWEAAKZHHJOHHDDEEXXPPEEFFZSSGMMTNONAAIINNGKKCCIITCCSITTOOZZNNNRFQQCIIPPABEERRFDZZZZNNWWCAEEDDFZZDXXMPTTZWSSCBBVNSVVDLOOLLCCSSFFCHJJGEXMMOVBBDDFFEEGGUUWCCCGGJJQNNTBBPPUWWXYZZGGXLLQQTTBMMDDZYYAAAFFLLIFBBXXIIVWGHRKKNLLQQQQAAQQKKRRQTTHUBLLCRKSSQQXXUULJVVGGZYJJZZDZZSNTMMGGMMAAKWWNNBBESEKKF...

output:

0

result:

ok 1 number(s): "0"

Test #37:

score: 0
Accepted
time: 2ms
memory: 5824kb

input:

AABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABB...

output:

3

result:

ok 1 number(s): "3"

Test #38:

score: 0
Accepted
time: 3ms
memory: 4324kb

input:

AABBABBABABBABABBABABABAABBABBAABABABAABABAABAABABBABBAABBABBAABBAABBABBABBAABBAABABABAABABBAABAABBAABBABAABBAABABBABAABBABABBABBAABABAABABBABAABAABBAABBABBAABABAABBABBABABABAABAABBABABBAABBAABAABBABABBAABABBABABBABAABBABBAABBABAABBABBABBABBABBAABBABAABBABABABBAABAABABABBABABAABBAABAABAABBABBABAABBA...

output:

3

result:

ok 1 number(s): "3"

Test #39:

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

input:

AABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABBAABB...

output:

0

result:

ok 1 number(s): "0"

Test #40:

score: 0
Accepted
time: 3ms
memory: 5408kb

input:

ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB...

output:

0

result:

ok 1 number(s): "0"

Test #41:

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

input:

A

output:

0

result:

ok 1 number(s): "0"

Test #42:

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

input:

AA

output:

3

result:

ok 1 number(s): "3"

Test #43:

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

input:

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...

output:

300001

result:

ok 1 number(s): "300001"

Test #44:

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

input:

ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ...

output:

300001

result:

ok 1 number(s): "300001"