QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#346542#6816. Invincible HotwheelsZ_301AC ✓1160ms461784kbC++177.1kb2024-03-08 17:30:372024-03-08 17:30:37

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 28ms
memory: 195516kb

input:

8
wwwsoupunetcom
wwwsoupunet
soupunet
punetcom
punet
pun
net
n

output:

6

result:

ok 1 number(s): "6"

Test #2:

score: 0
Accepted
time: 24ms
memory: 196896kb

input:

4
a
aa
aaa
aaaa

output:

2

result:

ok 1 number(s): "2"

Test #3:

score: 0
Accepted
time: 15ms
memory: 198056kb

input:

5
bc
cbcb
cbca
cbc
c

output:

3

result:

ok 1 number(s): "3"

Test #4:

score: 0
Accepted
time: 14ms
memory: 196804kb

input:

5
c
ccaaaa
caaa
aa
ccaaa

output:

3

result:

ok 1 number(s): "3"

Test #5:

score: 0
Accepted
time: 15ms
memory: 196644kb

input:

5
bbabc
b
bbba
abb
abbbbab

output:

0

result:

ok 1 number(s): "0"

Test #6:

score: 0
Accepted
time: 20ms
memory: 199128kb

input:

100
cccabcacaccbcacbbcaaabacacbbccaacacacacccbcaacaaaaaacbcbcbcaccccaccccbaaaabcaacbacabaccaaccbcccbabbcbbbaaabbcbbabccacbbabaac
acacacccbcaacaaaaaacbcbcbcaccccaccccbaaaabca
babaaccbbacbcacca
acbbcaaabacacbbccaacacacacccbcaacaaaaaacbcbcbcaccccaccccbaaaabcaacbacabaccaaccbcccbabbcbbbaaabbcbbabccacbbab...

output:

202

result:

ok 1 number(s): "202"

Test #7:

score: 0
Accepted
time: 21ms
memory: 198616kb

input:

100
zdbbzzedhbzpphphpzbpbcddb
cbhzdbbzzedhbzpphphpzbpbcddbhcbzcphee
dbbzzedhbzp
dbbzzedhbzpphphpzbpbcddbhcbzcpheeczzzhhabeephbhe
bhzdbbzzedhbzpphphpzbpbcddbhcbzcpheeczzzhhabeephbhepczcdhd
dhbzpphphpzbpbcddbhcbzcpheeczzzhhabeephbhepczcdhdaczadhad
ac
dhbzpphphpzbpbcddbh
zzedhbzpphphpzbpbcddbhcbzcpheec...

output:

190

result:

ok 1 number(s): "190"

Test #8:

score: 0
Accepted
time: 27ms
memory: 199752kb

input:

100
abhpappzeddpdbezhzdhezpzcpchbhecdebpahacbpebdeppdbpepbeaehphheepeb
ebcaacpdhcbcddhbhczahpchbzbzdhzzaddaaebabbphdbbeepdhpeazeaaapbdezhdeeedcpadbzbhheadpezpheddcdcbeedcdbdzbddpacaedazheddhheezzdaebeheeccachcaapazdpchpzdbpzeaahhczcppchazdephdzzeaahzbzzeabhppapezeaahzhdbzhchabazcczpdhhdhedbdbebhecph...

output:

204

result:

ok 1 number(s): "204"

Test #9:

score: 0
Accepted
time: 8ms
memory: 195932kb

input:

19
babaada
aabaadabbb
ccb
aa
abaada
ccbaadba
ababaadac
baad
db
ababaadaccaaa
aadb
aabaabaadabbba
baebcababaadaccaaaababaa
abaadab
baebcababaadaccaaa
adba
aababaadacb
aadbba
baebcababaadaccaaaacbc

output:

13

result:

ok 1 number(s): "13"

Test #10:

score: 0
Accepted
time: 15ms
memory: 197456kb

input:

23
aababa
ababaaaadd
b
aad
aaad
aaababaaaa
aaa
aadaacbababaaaadbab
acbababaaaadba
aba
ababa
acbab
ababaa
aaababaaa
babaaaad
ddaaababaaaadd
aadaacbababaaa
bababaaa
babaaaadaba
aacbababaaaa
abaaaa
dacbababaaaa
aaaa

output:

29

result:

ok 1 number(s): "29"

Test #11:

score: 0
Accepted
time: 1074ms
memory: 430412kb

input:

28519
abbbaaaaaaaacabcacabbaadabcbaa
cdaaacabbabc
addaaaaabbaabcbbaabbccaaaacabaadbacbbbbaaabacacabbaadabcbbaaaabaecaaaaaadbaabdaabbacbaaacbbabbacecbbacbaabcaababbaaabdbaaacbbeaabadaabbcabdaabaacaaaaadabaac
bbaadabcdebacbaaabbcaabbbaab
bbcabbbaadaabbbaabc
accaccbababbaacaaacabcacabcaabababaaaca
aaaa...

output:

308149

result:

ok 1 number(s): "308149"

Test #12:

score: 0
Accepted
time: 731ms
memory: 433240kb

input:

24126
bcbaaacaabbbaaabaacaaabaaaaabbbaaaabaabbabaabababbdababbaaa
dcaaaaabbcbbacbaaabaaaaca
aadccacaaacaaaaabbaaabaaabaaaacadcbabaaaac
aaabbaacbbdbcaa
dbaaabbaaabccbaabbbabbbabbdccabbdaacadaaabaaadbbbeaaaaacbabaabacaabbacaaaadbaaabbbabcaabaaaababcaaabbacbaabaaabaaaacaabbcbaaabcaabaaaadaacadaaabdbbbc...

output:

145436

result:

ok 1 number(s): "145436"

Test #13:

score: 0
Accepted
time: 716ms
memory: 428532kb

input:

30530
dcabaaaaaabacacaaccacaaccaabbcbbacbaaaaaacaaadbbbdcbbccbaa
bcabdabbaacbdbdabbcacbabaacbcbaaaaaa
baaaacacabaabaaabdadadbcaaababdbcbabcacabaaccaacaaadbacbbaaaabccbaacbdbdabbca
aaabbaacbdbdaba
aebaacbaabaaadbaacccbeacabaadaaabbabaacaaaaaabaaaaaaacaaaaaabababcaaaacacbcaaabaabccbabacacbbcaaabaacbdb...

output:

141015

result:

ok 1 number(s): "141015"

Test #14:

score: 0
Accepted
time: 650ms
memory: 439368kb

input:

19347
abaababbaeaabdd
bbcbadbaaabbbaaaaabbacca
aaaacbaacaaabadbaaababdaacba
aaabbcbdaaaabbaaba
cccaabbbcaacbdbaaaaaabacabbbacaaabbac
aaabbaaabcbaabadbacbabaaaaaca
baababadbaaabaabaaba
eaaaaaaaeacabbbaabadbaaaabc
beaabababaaabcbaabaacbaacaacbacacbababb
bacaaaaaaababbabacabaaabcbaabaacbaaccaacabbadaba...

output:

74900

result:

ok 1 number(s): "74900"

Test #15:

score: 0
Accepted
time: 1160ms
memory: 408928kb

input:

45269
cbbaabcabccaacbbabaadbaabaac
aaaaaadbaab
abbdbbcbdabaababa
aadbdaaaababaa
acabbaabbcaadabaacababdbdbdaaadaaabcbbaaaabaaaabacbabaaaacaba
bbbbabdaaacc
accdaabcbacababbabaaabaeaddaacabbaaacacbbbaababbbca
ccbdaacacbaacaaaabaababadbdaacacdda
adaaaabaabaaaa
bbcaaaabbbbbabdaaaccdaabcbacaba
caaeaaaaab...

output:

429092

result:

ok 1 number(s): "429092"

Test #16:

score: 0
Accepted
time: 766ms
memory: 420464kb

input:

35979
cbbaaacdaab
bbaabcbaabc
abaacaabbadaaadaaaab
bbacabadaaacbccab
aabbabababbbbbbaaaaa
abbbabbaacba
abaaaabbabaaabaabaa
abcbaabcabbaacababaa
bbaccaabbbb
bbababbababbbbdaaaaaaaabddbcaabbadaaabbabbbbcabbaaaaa
bbadaaadbd
acbcaaaaa
bbaaaaaabbbcdaaacaabbadaaadaaabbababaaaababaacaacbbabbab
bbabbbbcaaab...

output:

171509

result:

ok 1 number(s): "171509"

Test #17:

score: 0
Accepted
time: 1006ms
memory: 439524kb

input:

31418
ddhiilmeeeclciebfbcodkgcehkaacbcbiaqfbgaetiloaeneaihadbbcbeaibl
diieeabekgteif
beej
eabbbbjbfeckg
icbhhcieeabefcgaibn
galceecjfegcmdibaodabfjafdeckdabdmkgadseaaadabibichbi
dcljpcacjpcjfcecceabekgmabfbecbe
iaigmabehcb
aejldbfibfpeackaadmnkacanmbjhkaeggcbffgbdhbedbcadaajmdajafdeckdabdmkgad
aeacb...

output:

246945

result:

ok 1 number(s): "246945"

Test #18:

score: 0
Accepted
time: 746ms
memory: 442968kb

input:

23418
kbcbbaihhc
hgjgefedbidibegajvabhadhagccmfbmadahiiaaaddgiikgfbmdbaefkdcaiaedcbmglecgffifbfcfcbfbcdabeimbdafdjegahkaabigfejdhhfhcjfacmoabhachfajcchbhcebbaghbbeidccqgajbcbjmapqmjkojbikdhdbackfabachpeadaakmkdbaeeiibjiebhaadbeefercfncccjbmqfdocdbsclcaaccggeibjfejhbchearedbalhefaljdaddchhghbb
cbilsj...

output:

91568

result:

ok 1 number(s): "91568"

Test #19:

score: 0
Accepted
time: 777ms
memory: 436272kb

input:

35794
ncmhacehffddlnlaefeasaahgcbdcaahaab
bbbllgebkhgfchagbmdeabahflgdeicmemchbcgqlahadfaibmeaf
bibbhabfbdcaahfjkdaikiiliegbafdednagbjbgcahdbmaihffdejcagfbd
beabcojjfbhhffhebfgdochgiaiidhiadbdgdeeflcmdbicbqdealhaaclgbdhakefedcbklfhndacodaifkbbdcaahfjfjbjaapjagjbblbkkadacdbeafgqbidalaiedgefcubgmbhlbm...

output:

120452

result:

ok 1 number(s): "120452"

Test #20:

score: 0
Accepted
time: 678ms
memory: 443176kb

input:

27322
debgcbefefchf
ndak
dbfjapeakccbeihceaabckackaac
fdbdbbgiufbajnbbbalaajfkbeajgfdipdabhaghcdjaaacdfbggbbcccia
eakccbmfif
eleb
okiafcfcdfecapeakccbeihlfogjahgeeggdicg
odafagehebhcelcaecjaidcbbdjbkaadbnkamjldfjapeakccbeihcemlgbbojfaibpveadaiijaieeajedbjecheifbafaagiahkpbahaggjgsecdabfbfcabkhjbbbae...

output:

78966

result:

ok 1 number(s): "78966"

Test #21:

score: 0
Accepted
time: 994ms
memory: 438692kb

input:

37036
hkrasrjdvddwopitjnuifahponixtxxhgmwikfywjzqbykbbnknwfadltruguuvaktrcithyhenjjdjixmgukmvxboaxlxvevdpphgzssbfhdmzfczjsmxiurzcffifjyikntdzmnwuyqcaqnnyctixkdnwcsqjjipuakfankcwpcvewqcnrrorqgmthyrimqljphmnfsvanicvuyrvngicyvjoygfeztjtcrbmykktytswdawtngfeuhosyzrgtqrqurmyysjnfeikwcwueesyaxxissf
cngimmx...

output:

242179

result:

ok 1 number(s): "242179"

Test #22:

score: 0
Accepted
time: 775ms
memory: 437872kb

input:

36825
hdsjstbcqfqcwtcaggpioyrjwnrvyfyvbywfjiqehfawlhecbpo
ngbsabhqjpjevkgdfwslcdgleeivjqfpuuqavxspsaooeyekcipkpnnmcionkkgvubdplyqtfqizgkdffl
dfqobsuvezcypmxfjqusogyopp
pmqtfqizgktrbqhuluovpmmvblxeprogcfenqfrbjupwnegxjtuqfjbp
jnymzjryrvhfltafxwmfitmkzmhddrcye
ydikolhfltatnweojmy
rmqmahyvpqteyubdplyqt...

output:

128963

result:

ok 1 number(s): "128963"

Test #23:

score: 0
Accepted
time: 733ms
memory: 441508kb

input:

33449
uqstovbhcclock
ycdhjxrojwhrsobvwjxsnxdqfxezyoczghtsbnpifjtrcqbgsuhkluwcendynwrbcxssuiccclockkjvkfvdydnumhronicoislmrwutwbesavqeyyfbhumlowsxoqgkrngbhssevwpjpygxprhffsmwgflhtbqaierqukrjlxknewchksnrw
fobewidelwsacclockkjulhpqxgayszta
dfzfdogiccclockkjvkbs
uccclockkryrakckjgyd
oaaegicccloclhfhytkh...

output:

100263

result:

ok 1 number(s): "100263"

Test #24:

score: 0
Accepted
time: 919ms
memory: 442832kb

input:

10398
aabaaababaaabaaaaaab
aabaaaaaaaaabbaaaaaaaaaaabaaabaababbaabbaaaaaaaaaabacabaaaaaaaabbaaaabaaabababaaaaaaabaaaaabaabaaababaaabaaaaaabaaaababaaaaaaaaaabacaaaaaabaaaaababaaaaabaaaaabbbbaaaaaaaaabaabaaaaabaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaabbaaaaaaaaaaaababbaaabaaaacaaaaa
aaababaaaaaaaaaaa
aaaaaa...

output:

116308

result:

ok 1 number(s): "116308"

Test #25:

score: 0
Accepted
time: 776ms
memory: 438596kb

input:

10682
aacbbaaaaaaabaaababaaaaaaaaaaabaaaaabaabbaacbaaaaaaa
bbaaaaaabaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaacacaabbbbaaaaabaaaabaabbbaaaabaaabbabbaaaaaaababaaabaaaaaaaaabaaaaaaabaaaaaaaaaabaaaaaabaaaaacbbaaaaaaabaaababaaaaaaaaaaabaaaaabaabbaacbaaaaaaaaaaaaaaaaaabbaaaaaabbbaaaaaaaaaabaaaabcabaababaabaaabaaaa...

output:

104858

result:

ok 1 number(s): "104858"

Test #26:

score: 0
Accepted
time: 494ms
memory: 461320kb

input:

1050
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaabaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaabaaaaabbaaaaaaabaaaaaaaaaaaaaaabaaaaabaaaababaaaaaaaaaaaaaaaaaaaaaaabaaabaaaaaaabaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaababaaaaaaaaaaaaaaaabaaaa...

output:

3616

result:

ok 1 number(s): "3616"

Test #27:

score: 0
Accepted
time: 523ms
memory: 461784kb

input:

1224
baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaabaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaababaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaababaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaa...

output:

5277

result:

ok 1 number(s): "5277"

Test #28:

score: 0
Accepted
time: 59ms
memory: 203180kb

input:

40430
abdnf
abfmh
abgge
abgfb
abghe
ablcj
aavjk
abwbu
acesd
abcse
aazay
abwsw
abbcx
aamsu
abtkt
aahpl
abgzv
abspy
abyku
aboqt
aadxh
acfax
aawje
abgiu
abupr
aambu
aamts
abbyr
abory
aajhv
accmv
abvcr
abxhj
aakvs
aaebq
aaowl
accks
aaoyr
abbuu
aafki
aaocr
aaxxd
acakw
abzpr
aaytz
abrmy
acbzb
aapqk
abxlf
...

output:

78226

result:

ok 1 number(s): "78226"

Test #29:

score: 0
Accepted
time: 64ms
memory: 199064kb

input:

20550
aaaabbddee
aaabaadeca
aaabaadada
aaaaaabeca
aaaaccdbab
aaaabddbac
aaaadaaee
aaaaacdca
aaaaaaedad
aaaaddccee
aaaaaacdeb
aaaaeadccb
aaaacdeaba
aaaadcebc
aaaadebedd
aaaaadbcea
aaaaabbcda
aaaacddbad
aaaaeeccbb
aaaaadcbed
aaaadeade
aaaaedde
aaaaacdaae
aaaaaedcdd
aaaaebbcce
aaaadedeeb
aaaabeada
aaaa...

output:

29720

result:

ok 1 number(s): "29720"

Test #30:

score: 0
Accepted
time: 632ms
memory: 216976kb

input:

125357
bbbaabbbbaaaba
bbbabbaaaaaaabbba
bbbbabaabbaabbaba
baaabbbabababbb
bbaabbabbababb
bbaabbbbbb
babbbbabbaabbbabb
bbbabaabbbbabbbba
baaababbaabaaabb
bbbabaabaaabbbaab
bbbaaababbababbb
baabababbabaabbbb
babbabbabbbbaab
bbaabbaaabbbbbab
bbabaababbbbabbb
bbbabbbbabaaa
baabbbbbaababbbbb
babbaaaababa...

output:

249496

result:

ok 1 number(s): "249496"

Test #31:

score: 0
Accepted
time: 178ms
memory: 201108kb

input:

1999
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

1997

result:

ok 1 number(s): "1997"

Test #32:

score: 0
Accepted
time: 86ms
memory: 244768kb

input:

601
mhptifrvieralcbllluqjqrvjxpzefzdxizaztfmvqqbpasxpthhvljubcdojcnwrvpiwjjkcnusfquwiqrlxnoeztuzynlpbyjbhnlhqrevnfqlvqqqfuojyrudhdabljeoqkoarjkndfrpdtoahigksdbiwrcklmmhoxpeosywfptztkgrdlcqnvqyxhlpdbhdebjsajkmdryypmotiekhclyhbyhgqrbcgsqeutugorrrwgubaffonvifhrdwnlxybobrjigmdukkhnalbhkxswclumqhdqietrhe...

output:

50000

result:

ok 1 number(s): "50000"

Test #33:

score: 0
Accepted
time: 79ms
memory: 243764kb

input:

601
jaoylgxbtcvtjzhbgkdnkrviaudekfzzznkwlbzrgxjiisjcigwofybawofrscbwfijhzalubrucctinsmeobblrdyzusqffazgatlxqbmujejdpqwbefbrxqmopkoaewiygtzbmuvlkvsupgepnkcfhltiwdnrxialpqswhtrreunpxgkbwxjtcorrdklzeiyrpyhhelnjmimwpgmnvexpbjnxxznbwgqjoudqsrsahnjjnbicgweoudszxfejjfwfxspwaryjmgrobbjhczhtcurmiuapwzorpaadc...

output:

50000

result:

ok 1 number(s): "50000"