QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#429492#8223. 字符串游戏Register100 ✓797ms502944kbC++201.3kb2024-06-02 16:07:002024-06-02 16:07:01

详细

Subtask #1:

score: 10
Accepted

Test #1:

score: 10
Accepted
time: 2ms
memory: 21140kb

input:

abbabbbbabbaaaaabbbaabaaaaaabbbaabbabababaabababaababaaaaaabaaabaaabbbbababaaabbbabababbbabbbaabaaababbbaabaabbaaabbababaaaaabbbaabaaabbaabaabaaabaaabaababaabbbbbbbbabbbbbabbbaabababbaababbbbbabbbbaaabbaabaabaaabbabbaaabbaaababaabbbaabbbaaaabbababbabaababababaaaabbaaaabaabaaaababaaabababbbaaabababbb...

output:

1281

result:

ok single line: '1281'

Test #2:

score: 10
Accepted
time: 0ms
memory: 21000kb

input:

aaaabababbabbbbbabbbbbbbbbbbabbbbbabbbaaabbbbaababaabbbbbbbbbbbbbabaabbaaabaababaabaaabbabbbabbbabaabbaabaababbbbbbaaabbbbaaabaabbbabbbabbabaabbbbabbbaabaaaabbbbbabaaaabaabbabaaabbaabbabbaaabbabaaababbababababaabaaaabaabaabaaabaabbbabbbbbaababbabbbabbbbababaaabbabbaaaabbbaaabaabbbaaaaaababaababbbbba...

output:

1483

result:

ok single line: '1483'

Test #3:

score: 10
Accepted
time: 4ms
memory: 21172kb

input:

bbaaababbbabbbaabbbbbbababbbabbbbbbbbaabbbbbbbbbbaaabbbbbbbbbbbbbbbabbabbbabaababbbabbbbabbabbabbbbabbbbbbbbbaaababbaaabbbaabbabbbbbbbbbbbbbbbbbbbbabbbbbbababababbbbbbbbbabababaabbbbbbabbbbaabbababbaaababbbbabbbbabbbabbbbbabbbbbabbbbbbbbbbabbaabbbabababbbbaababbbababbbbabbabbaabbbbbbabbbbbababbbbaba...

output:

2310

result:

ok single line: '2310'

Test #4:

score: 10
Accepted
time: 4ms
memory: 21460kb

input:

abbbbbbbbababbbbbbbbbabbbbbbbbabbbabbbbbaaabbbbbabbbbababbbabbbbbbaabbabbbbbaabbbbabbabbbbbbbabbbbaaabbbbbbaabbbbbbbbbbbbbbbbbbbbbabbbabbbabbbbbbbabbbbbbbabbbabbbbbbbbabbbabbbbbbbbbbbbbbbbbaababbbbbbbbbbabbbbbbbbbbbbbababbbbbbbabbbbbbababbbabbbbbaabbbbbbbbbaabbabbbbaabbbabbbbbbbbbbbbbabbbbbbbbbbbbbb...

output:

1

result:

ok single line: '1'

Test #5:

score: 10
Accepted
time: 3ms
memory: 17440kb

input:

bbbabbbbbbbbbbbbbbbbbbbbabbbbbbbbbabbbbbbbbbbbbbbbbbbbbbbbbbabbbabbbabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbabbabbbbbbbbbabbbbabbabbbbbbbbbbbbbabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbabbbbbbbbbbabbbbbbbbbbbabbbbbbbbbbbbbbbbbbbabbbbbbabbabbbbbbaabbbabbbbbbbbbbbbbbbbabbbbbabbbabbbbbbbabbbababbabbbbba...

output:

3680

result:

ok single line: '3680'

Test #6:

score: 10
Accepted
time: 3ms
memory: 21012kb

input:

bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbabbbbbbbb...

output:

2454

result:

ok single line: '2454'

Test #7:

score: 10
Accepted
time: 3ms
memory: 20992kb

input:

bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...

output:

2702

result:

ok single line: '2702'

Test #8:

score: 10
Accepted
time: 6ms
memory: 17556kb

input:

bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...

output:

2499

result:

ok single line: '2499'

Test #9:

score: 10
Accepted
time: 3ms
memory: 18940kb

input:

amahaaajakalaiacabararasafaxasagamajaqagaqaeauauayagasadazavaeagabaaajalajavalatauapacaearaeagafawaaapawadaiaaapalahanavazasayamaiafagabahaxanacaaagaoadasakayagawaiaharanamaraiaramazaoagajataoazasalavatafaoalacaqavanafatajawauayakaoaqawawayasatasazagafacayasasawaqayadasaiazaxamaaaragataxawazadalaxak...

output:

2475

result:

ok single line: '2475'

Test #10:

score: 10
Accepted
time: 0ms
memory: 17020kb

input:

afabagadaeaeacaeaeafagafagababaaagacabaaagadacafadabaaaaacadaaagafacagadaeacacacabadagadaaabafadafadadaeafaaagadafabaeaaafaeaeaaaeabaaabaaaeafagadaaaaacaeaaaaacabaeacadagafafacacabaeaaagagaeaaadagabadaaaaagafagaaabaaaaafacafacadaaagabaaafadagacaaafafadadadacadadaaacagabacaaabacaeadabacagaeagagafafag...

output:

2807

result:

ok single line: '2807'

Subtask #2:

score: 10
Accepted

Test #11:

score: 10
Accepted
time: 751ms
memory: 502364kb

input:

aaaaaaabbaaabbbbabbabbbababaabaaabaabbaaababaaaaaabbbbbaabbbabbbaabbabaababaababaabbbababbbabaaaaaaaaabaaaaabbbabbbbbabaaabaaaababbabbbbbbaabbbbbaababbbbababbbbbbbbbbbaaabbabbaababbaaaabbabaaabbaaabbbbaaababbbbbabbaababbaaababaaabbabaabbbbabbaaabbababbaabbaaaaaaaaaabababbbaaaababbabbbabbababbabbabbb...

output:

234567

result:

ok single line: '234567'

Test #12:

score: 10
Accepted
time: 773ms
memory: 501712kb

input:

aababbbbaaabaabababbbaabbabbaabbaababaabaabaabbbaaaabbabbbbbaaaaabbbaabbbaaaaaaaabbbabaabbbaabaaabaabbabbabbbaaabbbbbaabaabaaaaabbbabbaaaababbaaababbbbaaabaabbababbbbbaaabbaabaaaaaaabbbbbaabbaaabaababababbbbabbbbaabbababbbbbaabbabaaaaabbabbbabbaaaababababbbabaabababaaabbbbaaabbabababaabaabaaabbabaab...

output:

198433

result:

ok single line: '198433'

Test #13:

score: 10
Accepted
time: 740ms
memory: 501160kb

input:

bababbbabaaabbbaabaabaababbbaabaabaaaaaabaaaaaaaabaaabbabbaaaaababbbbbbababaabbaabbabaabaaabaaaabbbbbaaabbababbabbbabbbaaaabbbbaaabbaabbbababbbabbbbabbbbabbbbabaaaabaaaabababbaaabbaaabbaabbbbbababababbbbbbbbabaaabaaaaaaabbbabbabbbaaabbbabbababaabababaabbabbbabaaabbaabbabbbababaababaaabaabababaababbb...

output:

248857

result:

ok single line: '248857'

Test #14:

score: 10
Accepted
time: 797ms
memory: 502944kb

input:

aabababababbaaaababbaabbabaaaaaababbaabaaabbaaaaabaaabbaababbbaaaabbbaabbabbaaaabaaabbbaaaababbbbaabaabbaabaaaaaabababaabbaaabbbaaabbabababaabaaaababaaaaabbbbabbaabbbababbbbaaaaabbbabaabbbaababaabbaaababbaabababbabaaabbbabbbbabaaabaaabbbaabbbaabbbabbbbabaaabbabababbbbabababbbbbbaaababaababaabaabbbbb...

output:

257032

result:

ok single line: '257032'

Test #15:

score: 10
Accepted
time: 776ms
memory: 501724kb

input:

bbbababbaaabbaababaaababaaaababababbbbbabaaaaaabbbbbabbabbaaabaaabababbbabbbaaaaaaaaabbaaaababbbaabaaabbaaabbabbabaabbabbbaabbabaabbbbaaabbbaaabbabbbabbabbbbaabaababaaabbbbabbbbbaaaaaaabbabbbbbabbabbbbaaabbaabbbaabbbbaabbbbbbbababaabaaaabbababaaaaabbabaaabaabbaabbbaaabbbbbbaabababbbbbababbbaabbbabaa...

output:

222902

result:

ok single line: '222902'

Subtask #3:

score: 5
Accepted

Test #16:

score: 5
Accepted
time: 265ms
memory: 317968kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

493827

result:

ok single line: '493827'

Subtask #4:

score: 25
Accepted

Test #17:

score: 25
Accepted
time: 85ms
memory: 82784kb

input:

bbbbbbbbbaabbbbbabaaabaabaaabaaaaabaaaabbbbbbbaaaabaabbbababbaaaabbabababbbabbbbabbabaabaaabbabbaaababaaabaaaabababbbbbbbaabbaaabbabbbbbabbbaaaaababbbaaabaabababbabbabababbabbabaaaaabaaaaaabbbabaabbbaaaabbabababaaababaabbbbbbbaaabbbabaabaaaabaabaababbaaaabababaabbbaaaababaaababbbbbbabbbbbbaabbabbaaa...

output:

43524

result:

ok single line: '43524'

Test #18:

score: 25
Accepted
time: 100ms
memory: 100072kb

input:

baaaabbbabbbbabbbbabbbabbbbbabbbabbaabbbbbbabbabaabbbbbbbbbbbbaabbbbbaaabaaabbbbbaabbbbbbbbbbbbbababbbbabbbbbbbbbbbbbbbbabbbbbbbbabbbbabbbbaabaabbbabbbabbbaabbbbbabbbbbbaaabbbbbbaaabbaaabbabbabbbbbaabbbbbabbabababbbbbbbbbbbbabbbbaabbbbabbbbbbbbbbbbbbbabbbbbabbabbabababbbabbbbaabbabbbbbbbbaabbaabbbbb...

output:

107148

result:

ok single line: '107148'

Test #19:

score: 25
Accepted
time: 114ms
memory: 117112kb

input:

bbbbbabbbbbabbbbbbbbbbbbbbbbbbaaabbbbbbabbbbbbbaababbbbbbbbbbbabbbbbababbaabbbbbbbbbbbbbbbbbbabbbbabbbbbbbbaabbbbabbbbbbbbaabbbbbbbbbbbbbbbbbbbbbbabbbbbbaaabbabbbbbbabbbbbbabbbabbabbbbabbbbbbbbbbbbbabbbbbabbbbbbbbbbbbababbbbbbbbbbababbbabbabbbabbbabbabbbbabbababbbbbbbbbbbbbababbbbbabbbabbbbabbbbbbab...

output:

84043

result:

ok single line: '84043'

Test #20:

score: 25
Accepted
time: 98ms
memory: 115664kb

input:

baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

3

result:

ok single line: '3'

Test #21:

score: 25
Accepted
time: 94ms
memory: 119224kb

input:

bbbbbbbbbbbbbbbbabbbbbbbbabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbabbbbbbabbabbbbbbbbbbbbbbbbbb...

output:

142965

result:

ok single line: '142965'

Test #22:

score: 25
Accepted
time: 82ms
memory: 113644kb

input:

baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

5

result:

ok single line: '5'

Test #23:

score: 25
Accepted
time: 85ms
memory: 116096kb

input:

bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...

output:

99972

result:

ok single line: '99972'

Test #24:

score: 25
Accepted
time: 53ms
memory: 89972kb

input:

bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...

output:

99997

result:

ok single line: '99997'

Test #25:

score: 25
Accepted
time: 77ms
memory: 112476kb

input:

bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...

output:

99999

result:

ok single line: '99999'

Test #26:

score: 25
Accepted
time: 82ms
memory: 115596kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

130005

result:

ok single line: '130005'

Test #27:

score: 25
Accepted
time: 85ms
memory: 87736kb

input:

baabbaabaaabbaaaababaabbaabbabaabaaaabaaaaababaaabaabbbbaabbaabaaaabaabaaaaabaabbabaaaaabbaaabaaababbbbbabbbbbbbbabbbbbbbbabbaaabaabaaaabaaaabbbbbaaabaaaaaaabaaabbbaaabbbbbaaabbaaaababaabbbbaabaaabbbbaababaaabaaabbababbbababbabaaaaabaaababbaaabbbabababaababaabbababaaaabbababaababbbbbbaabbaabababbaab...

output:

67291

result:

ok single line: '67291'

Test #28:

score: 25
Accepted
time: 94ms
memory: 115724kb

input:

baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

3

result:

ok single line: '3'

Subtask #5:

score: 25
Accepted

Dependency #1:

100%
Accepted

Dependency #4:

100%
Accepted

Test #29:

score: 25
Accepted
time: 240ms
memory: 164564kb

input:

aabbbaaaaaaaababaabaaaabbbbabababbaaaaaabaabbabbbaaabbaaabbaaaabbabaabaaababbbaaaabbababbabbaabbbbaabaaabbaabababaaaabbbbbabbbaaaaaabbbbabbaaababbaaabaaaabaaaaaaabbbaababaabababaabbabaababababaabbaabaaabababbbbabbbaaabbbbaabaaaabaaaaaababbababbaabbabaababbababbabbbbabbaabbabbbbbbbbaabaabbbbbbbbbbbba...

output:

72979

result:

ok single line: '72979'

Test #30:

score: 25
Accepted
time: 279ms
memory: 201068kb

input:

fefddeecdbffabadeeccbafdcfcabfacbfdbadccbcaebecdfeaaaebaacddcbacefacfcfdccfcecaabaebaeebeadddcfbaecdcaeebfbdeaecfdabcbdeabecbdbcdcdebedaaffacffbbedacefbffecfffebeebbfadabbfcafdbcedadbcddfbdedabbdafcacbafaeccaabbbbffceaebeebeeaffbdbfdceffdcdfdefdbedfdcddacefeafbcbaedbfefbaddeaecbcbfdaaacfdabeeacaaeea...

output:

68728

result:

ok single line: '68728'

Test #31:

score: 25
Accepted
time: 240ms
memory: 198004kb

input:

agahaiaaafagaeagagadajaaaeagagaiacacaeagaeafajajajajacafahaiagaeabaiaiaaagadaeabahacadafajagajahafacaaafadaiahahajajajaeagabahahahaeaaacahahaaafagababaeaeacagaiabacagaaaaaaafadaaajadafacagaaajaiahaiaaacabajaiagaiagacahadabahaaaeaeababadadaaaeaeacaeadaiaeaeagagadaaaiadabaiagaaaaaiajahahagacaeahahahaa...

output:

272423

result:

ok single line: '272423'

Test #32:

score: 25
Accepted
time: 150ms
memory: 168944kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

250000

result:

ok single line: '250000'

Test #33:

score: 25
Accepted
time: 186ms
memory: 192904kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

249976

result:

ok single line: '249976'

Test #34:

score: 25
Accepted
time: 222ms
memory: 163396kb

input:

abbabababbbaaabbbabbabaaababbabbabbaabbbaabaababbbbaabaabaaabbbbbbaabbbabbbbbabababbbbaababbbbaabaaaaabbbbbbbabbbbabaabaaaababbaabaaaabbbaabbbabbbbaaaaaabbaaaaababbaaabaaaabbaabaabbbabababbababbbbababaaaabbabbbbbbbbbbaaaababababababababaababbbaabbbbbabbbbabbbbbababbabbabbaaaabaaabbababaaabbbabbbbbbb...

output:

106249

result:

ok single line: '106249'

Test #35:

score: 25
Accepted
time: 228ms
memory: 165764kb

input:

abaaabbabbbabbaabbbbbbbabbaababbbabbaabbabaabbabbbbabaababbbbaaaaabbbbbbababbbaabaababaabbbaaababaaaaaaaabaaabaaaaaabaaabbbbabbabbaaabbaabbabbbaabbbbaaabaaaabbaabababbaaabbaaaabbabbbbaabbaaabaaaabbbaabbabbbbaababaabaaaaabbbabbbbababaaabbaabababbaababbabbbbbbabaaaabbbbbaaababbbaaaababaaaaaababaababba...

output:

175546

result:

ok single line: '175546'

Test #36:

score: 25
Accepted
time: 230ms
memory: 183956kb

input:

zksvttiyllprjwwcbhfjhdixsaxlgmolhwqrenaqnhuupvjlloduecabbumzrblxlhrmbiiwsfuyqnxpkqyesjtvvhdxmakdkenackoorbdsaaauhdnyjtpvunfnhjxgexufgcmlofvybcaoaisoofrgcypcaaxtbvwhlkilgryxblkpnprmpnjekybsnwngnudeohozwjdgwnifuxogrkszgjebmanxcvbjfpetcnytapxkmqdoivsqzpfxhckmsosohwtcvdubnfjyydagtarffsmnmjszjyskysyrudrl...

output:

12409

result:

ok single line: '12409'

Test #37:

score: 25
Accepted
time: 256ms
memory: 181156kb

input:

ifcjrrilczgpvwvcryxjygnifpgmkvpzqqapttabzfzcgooybkcnfwtqmjynftxlbqqtsnwcmdrfvpvxhppqwvipewfabeyplslxlplhkrvtyqejmrrwrfxpxwnqynafskbrulumilnsvtnwfmzlvwcmtlsnsidgqwknknlpwpvdurazgajldygvijqpdmkjuygdbhduzopepwbovtggvpvegyhdlenyglmrpdfaolqiseowiqeqsbtuedprcezazmyrtudwpilozezxipedcyfnykueyvgghfpzzlcqsues...

output:

3103

result:

ok single line: '3103'

Test #38:

score: 25
Accepted
time: 271ms
memory: 202964kb

input:

bcbefabbbbacdcfccfedddffbdaddbbdfcdbcbaffdcccbdecddbcfdcffbdeafcaffbebfbcaecaceacadafbcedddabfcdeeffeeebeafccfbdebeccbcdbeaebbfeabedecfdfdadafabbadbddffdbabddacebdcbdefbddebeaaceeceedeecddbbcbfcabbaebcceddcedfaababecdbbebadcfaeacfcdaefeeacebcbdeaadaafffebdcaabadebdbebacfecddccdbddffaeafbdaeefaafbcbb...

output:

59712

result:

ok single line: '59712'

Test #39:

score: 25
Accepted
time: 304ms
memory: 204600kb

input:

dfdbdbacddfcbadafcadaabaafcfbfebcaabefecfbbddceccddacefbadfdcefbcbecdbfceaccdaaaefcfdfefecfaecebacfcccbcaeffccbaceaeddcfadaddadbeedbbbfabbefbaddecefaeadcceabeedfeedaedfdbcacecddacedfeecfbcebfbbccecaccaaadeeeebeebeefaeacdafcedbeaccbfcacaefdcddeaeefdabfccadbfbcbeceedddaeaddffdfddafacdfacfeaffdadcbbded...

output:

59161

result:

ok single line: '59161'

Test #40:

score: 25
Accepted
time: 174ms
memory: 209696kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

249976

result:

ok single line: '249976'

Test #41:

score: 25
Accepted
time: 155ms
memory: 169904kb

input:

baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

1

result:

ok single line: '1'

Test #42:

score: 25
Accepted
time: 226ms
memory: 167072kb

input:

abbabababbbaaabbbabbabaaababbabbabbaabbbaabaababbbbaabaabaaabbbbbbaabbbabbbbbabababbbbaababbbbaabaaaaabbbbbbbabbbbabaabaaaababbaabaaaabbbaabbbabbbbaaaaaabbaaaaababbaaabaaaabbaabaabbbabababbababbbbababaaaabbabbbbbbbbbbaaaababababababababaababbbaabbbbbabbbbabbbbbababbabbabbaaaabaaabbababaaabbbabbbbbbb...

output:

106249

result:

ok single line: '106249'

Test #43:

score: 25
Accepted
time: 173ms
memory: 202300kb

input:

baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

71

result:

ok single line: '71'

Test #44:

score: 25
Accepted
time: 160ms
memory: 190872kb

input:

caaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

75

result:

ok single line: '75'

Test #45:

score: 25
Accepted
time: 144ms
memory: 171820kb

input:

baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

2

result:

ok single line: '2'

Subtask #6:

score: 25
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #5:

100%
Accepted

Test #46:

score: 25
Accepted
time: 634ms
memory: 350708kb

input:

mwwbxfwwayliqflnawfefkmgmwtweyrxobkdiqdleenlncchjgdoonpyekqpklctjirybsftrlewxuyvelkmnprdsdfvzkhatjmamulwfqesxsqjhzoyxceyruxkrpucqcpbqetdnjfslcwdiglgryodhvcwiqrfcrkpvriwdnqkbrdxrqlhjhlhdjlbyhqdnwdsrafqgqpjhtrtkfuetacyzzuitfjstjgiulyxaoneeyspxjyfbvbbqfobidicseztwlwamagvduizgmyscfdumgafhjlbcnmwvtpjkgiz...

output:

3427

result:

ok single line: '3427'

Test #47:

score: 25
Accepted
time: 642ms
memory: 348784kb

input:

jpqxtaollqqmqvnxrznvviaaobvcnzizszcocelshqopokjbydrvsbewxhrqroqlewprxqdmmgetmanzdvmhoosjjypulwqddgsftctcwrfjgzhmsjsnjgizpczenspgmvfqbfxobzlndgveuvbitvrtfofjkexejnxsdmuoydyitdakindsmhjvxcukiwsvlkhjvzomdfcujnlaarlsocbsldjrcoicisxkttaspqhjxayjtvpgberegzscqhtxehkzpxeewpvhskfgmnadspyjdwrpjybztnhxplrwaqwo...

output:

31255

result:

ok single line: '31255'

Test #48:

score: 25
Accepted
time: 504ms
memory: 300348kb

input:

bbabbbaaabbbabaaaabababbabbbbbabbbbbbbbbbbabbbbbabbbaaabbbbaababaabbbbbbbbbbbbbabaabbaaabaababaabaaabbabbbabbbabaabbaabaababbbbbbaaabbbbaaabaabbbabbbabbabaabbbbabbbaabaaaabbbbbabaaaabaabbabaaabbaabbabbaaabbabaaababbababababaabaaaabaabaabaaabaabbbabbbbbaababbabbbabbbbababaaabbabbaaaabbbaaabaabbbaaaaa...

output:

295499

result:

ok single line: '295499'

Test #49:

score: 25
Accepted
time: 459ms
memory: 302544kb

input:

bbaababaaabababbbabbbbbabaaaababababbaababbaaabbabbbababaaaababbbbabbbababbaaaababbbaabaababbabbbaaaabbabbbabbaaaababababaabbbbbbaaababaabaaababaabababbbababbbbabbabaabaaabaaabaaababababaaabbbaaaaabaabbbbbbbababbabababbaabaababaabbbbaaababaabbaaabaabaabbbbaaabababbbaabaaabaaaabaaaaaabaaabaaaabbaaaab...

output:

142897

result:

ok single line: '142897'

Test #50:

score: 25
Accepted
time: 293ms
memory: 320824kb

input:

baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

1

result:

ok single line: '1'

Test #51:

score: 25
Accepted
time: 472ms
memory: 302180kb

input:

bbaaabaabababaaababbababaabbaaaabbabbbaabaaabaabaaaabbababbbaaabbaaaabaaabaaabbbabbbbabbaaaaababbbaabbabababaabbabbabbabbaaabbbaababaaabbabbaababaabaaabbbaababbbaaabbaaabbaabaabbababbaababbbbbaabaabababababaaaaabbbbabbabbbbabbbbabbbbabaabbbaabbabbaaaabbabaaabbbababbbaaabaaabbaaabaaabbbaabaaaabaabbaa...

output:

204172

result:

ok single line: '204172'

Test #52:

score: 25
Accepted
time: 676ms
memory: 392032kb

input:

eafebaefcabeaadaeeacecdfdfababaeadfbdaabcfccafcafacfbbdaebaddffaedbadafbbbfafcfbbceeccccbeddaefcddaaacaaaebdefdafadaacdaaebeaefbfaccfdbfaabfffafecacdedfabadafababedabcaabfaedefabfbccafccbacccafcdddaafaeddedadedbbbbfeefcbdabeaefaebeddeebaedadfcacaebcdccaeaeaaaacdcbfbeeeaeddeaaddacdcbfebaddbffddfaabca...

output:

21449

result:

ok single line: '21449'

Test #53:

score: 25
Accepted
time: 692ms
memory: 389428kb

input:

dbddbcffaeeecbdbcbccebcfdcbfeefbfbeffabfcedccbadadeecfbeefabdbacfefaebfbbcbbbeefffaacfeedffbbcfadecaefcddacfbfcbbddeeabeddccbfcaadcdeeaccfafaacaccdebdfcdbdafddcdbfbacfccfdfcedbfdecfebabaaadeddeeacbbbffafabcfceebcbdfaffbcbabdedfefbeddfedbceaedeabaedfecfbbbcaefdcadcceaeafeefaceabfcbadfdaaaaecfffefaaac...

output:

67202

result:

ok single line: '67202'

Test #54:

score: 25
Accepted
time: 374ms
memory: 378716kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

500000

result:

ok single line: '500000'

Test #55:

score: 25
Accepted
time: 377ms
memory: 396996kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

499954

result:

ok single line: '499954'

Test #56:

score: 25
Accepted
time: 519ms
memory: 345572kb

input:

ayaxaiakaeasaiacawakadaqacaqaoauakaeaqazaaamajabazauaradagalanahajaoahadadataqauawasawapabanaaapajahajadabalacadafadaaacaoadajaraqaaaaacaoaxaxajaeakafadapalacahayazadawakamaaafahacavatazacaoasacararacatamaralazaaadajavamamaxacarakauaoarayalakakalaqabafapaxavaaabafabaiajauaoanatarayaoakanaqalayataoap...

output:

500603

result:

ok single line: '500603'

Test #57:

score: 25
Accepted
time: 366ms
memory: 373352kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

499950

result:

ok single line: '499950'

Test #58:

score: 25
Accepted
time: 651ms
memory: 441716kb

input:

acacababababaaacaaacacacaaaaabaaaaacacabacababacabacaaaaababaaacacacacacaaaaacacaaaaaaababaaaaabacaaacacabababaaacacacaaaaacacabacaaacacabacaaaaaaacacabaaababababacacaaaaaaacabacacaaacacacabaaabacaaabaaacabababacacaaacabacabaaabacabacaaabaaacaaacacaaaaabacacabaaacaaacacaaacacabaaacaaabababacaaacacac...

output:

537438

result:

ok single line: '537438'

Test #59:

score: 25
Accepted
time: 185ms
memory: 217480kb

input:

baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

76

result:

ok single line: '76'

Test #60:

score: 25
Accepted
time: 382ms
memory: 389300kb

input:

baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

3

result:

ok single line: '3'