QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#209067#5368. 异世界的文章分割者slime#60 6581ms22736kbC++233.7kb2023-10-10 08:43:202024-07-04 02:17:50

详细

Subtask #1:

score: 10
Accepted

Test #1:

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

input:

10 3
aaaaaaaaaa

output:

6

result:

ok single line: '6'

Test #2:

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

input:

10 1
abbbaabbba

output:

289

result:

ok single line: '289'

Test #3:

score: 0
Accepted
time: 1ms
memory: 5924kb

input:

10 2
cacabbcbca

output:

11

result:

ok single line: '11'

Test #4:

score: 0
Accepted
time: 1ms
memory: 5856kb

input:

10 4
aabbccddaa

output:

1

result:

ok single line: '1'

Test #5:

score: 0
Accepted
time: 1ms
memory: 6012kb

input:

10 4
ababbbabab

output:

2

result:

ok single line: '2'

Test #6:

score: 0
Accepted
time: 1ms
memory: 5952kb

input:

10 2
ababbaaaba

output:

12

result:

ok single line: '12'

Test #7:

score: 0
Accepted
time: 1ms
memory: 6008kb

input:

10 1
baabaababa

output:

156

result:

ok single line: '156'

Test #8:

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

input:

10 10
hbjebnidnq

output:

0

result:

ok single line: '0'

Subtask #2:

score: 10
Accepted

Dependency #1:

100%
Accepted

Test #9:

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

input:

50 10
aababaaabaabaaabababaaaaaabbbababbaababaaaabababba

output:

17

result:

ok single line: '17'

Test #10:

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

input:

50 5
bbbaabbbbbaabaababbbbbbaaaaababbbaaabaaaaaabbabaab

output:

91

result:

ok single line: '91'

Test #11:

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

input:

50 5
adbabadbabadbabadbabadbabadbabadbabadbabadbabadbab

output:

412

result:

ok single line: '412'

Test #12:

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

input:

50 3
caaabcaaabcaaabcaaabcaaabcaaabcaaabcaaabcaaabcaaab

output:

3222

result:

ok single line: '3222'

Test #13:

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

input:

50 1
cadabcadabcadcadabcadabcadcadabcadcadabcadabcadcad

output:

407986

result:

ok single line: '407986'

Test #14:

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

input:

50 15
bbbbbbabaabaaaabaaabbaababbaaabababbbbaabaababaaba

output:

3

result:

ok single line: '3'

Test #15:

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

input:

50 20
baaaaaaaabbabbababbaaaabbabaabbababbbabbbabaaabaaa

output:

2

result:

ok single line: '2'

Test #16:

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

input:

50 6
ababbbbaaaaabbbabaabaaabaaabababababbaaaababbbbbab

output:

65

result:

ok single line: '65'

Test #17:

score: 0
Accepted
time: 1ms
memory: 6140kb

input:

50 1
aabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaa

output:

129389

result:

ok single line: '129389'

Test #18:

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

input:

50 1
acbcaabcababaacbbacaabcbacccbbaacaccbabccacaccaabb

output:

16446

result:

ok single line: '16446'

Test #19:

score: 0
Accepted
time: 1ms
memory: 6112kb

input:

50 14
ccaccaccaccaccaccaccaccaccaccaccaccaccaccaccaccacc

output:

6

result:

ok single line: '6'

Test #20:

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

input:

50 24
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

output:

2

result:

ok single line: '2'

Test #21:

score: 0
Accepted
time: 1ms
memory: 6112kb

input:

50 50
txcopptgjrvkgzdvaxgrhwgnkjfbspyytzkbirczhcrctddsfj

output:

0

result:

ok single line: '0'

Subtask #3:

score: 20
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Test #22:

score: 20
Accepted
time: 45ms
memory: 8024kb

input:

200 1
cabaababbabbbcabcbcaacbccaabcacbccaabbccccbcabbcacbbcbacbccaabbbbcbcabbacabbacccbbbbbacccabcccaaacbcbaaaccabbbabcaabbbababcabccbccbaaabbbcbccbbcacbbabbaabcacbcaccccccaaaccabbaaabbbcbbccbcabbbcabcccabb

output:

2192936

result:

ok single line: '2192936'

Test #23:

score: 0
Accepted
time: 22ms
memory: 8080kb

input:

200 2
cbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaacbaa

output:

1196175

result:

ok single line: '1196175'

Test #24:

score: 0
Accepted
time: 39ms
memory: 7972kb

input:

200 3
acabacbacacabacbacacabacacabacbacacabacbacacabacacabacbacacabacacabacbacacabacbacacabacacabacbacacabacbacacabacacabacbacacabacacabacbacacabacbacacabacacabacbacacabacacabacbacacabacbacacabacacabacbacac

output:

1550907

result:

ok single line: '1550907'

Test #25:

score: 0
Accepted
time: 33ms
memory: 8576kb

input:

200 7
hefdaadcdgfecghbgcbggfgdfchchgbdfafghahacgbbcebfchadbcechdacacccahggadbdacbggadbgceacgeedfafbhhfhaacdccefddbfaffcdggabhhcghcbfbedddeheaeaabdahhbhcefeededbfdafghdahcfbfbcbbdgccffhaeggcdhdcghghfaaefechd

output:

1134

result:

ok single line: '1134'

Test #26:

score: 0
Accepted
time: 34ms
memory: 10624kb

input:

200 11
lmmeigmkegfbcmhfedchmeckbnbgjlfljahjleeldlnkdlnkngaeiiblangdlkdfjchalckfhfcjgljlelebhfacafkjknknjjfklnhcnlgkkjmhfafmhehgehmejajabgaikfnclihbkmeckghfljgfmajflilgcimamgljlhjkfhgjcbcddfjlnchcgedmghdlfaib

output:

155

result:

ok single line: '155'

Test #27:

score: 0
Accepted
time: 26ms
memory: 8524kb

input:

200 19
cdcccacbaccdcccacbaccdcccacbaccdcccacbaccdcccacbaccdcccacbaccdcccacbaccdcccacbaccdcccacbaccdcccacbaccdcccacbaccdcccacbaccdcccacbaccdcccacbaccdcccacbaccdcccacbaccdcccacbaccdcccacbaccdcccacbaccdcccacbac

output:

133

result:

ok single line: '133'

Test #28:

score: 0
Accepted
time: 38ms
memory: 7792kb

input:

200 16
acdbddbaacdbddbaacdbacdbddbaacdbddbaacdbacdbddbaacdbacdbddbaacdbddbaacdbacdbddbaacdbddbaacdbacdbddbaacdbacdbddbaacdbddbaacdbacdbddbaacdbacdbddbaacdbddbaacdbacdbddbaacdbddbaacdbacdbddbaacdbacdbddbaacdb

output:

481

result:

ok single line: '481'

Test #29:

score: 0
Accepted
time: 39ms
memory: 8456kb

input:

200 25
abacdacdabacdacdabacdabacdacdabacdacdabacdabacdacdabacdabacdacdabacdacdabacdabacdacdabacdacdabacdabacdacdabacdabacdacdabacdacdabacdabacdacdabacdabacdacdabacdacdabacdabacdacdabacdacdabacdabacdacdabacda

output:

99

result:

ok single line: '99'

Test #30:

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

input:

200 25
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadkgmivxnitlfmciurqeqnqghxveqrxidxbmzlpdveuucarjwdqyiiaegadulttqmkzinvxalbvnccchfvjechxnufmcmofrdkesmkjeiobfzwbppknslhtxoranwbjnxggudgjmjrigintzxkusvvaqwhuwvoyiz

output:

6

result:

ok single line: '6'

Test #31:

score: 0
Accepted
time: 41ms
memory: 8460kb

input:

200 37
aaaaaaaaaaaaabdecdebedebaaaaaaaaaaaaaaaacebcbcecaebeaaaaaaaaaaaaaebcddecebbebaaaaaaaaaaaaaaeadaaecdadbaeaaaaaaaaaaaaaccbabdbbeedaeaaaaaaaaaaaaadbddbebeddcbeaaaaaaaaaaaaaaceeedcecdadbaaaaaaaaaaaaaaaaaa

output:

10

result:

ok single line: '10'

Test #32:

score: 0
Accepted
time: 49ms
memory: 8520kb

input:

200 64
bbabbbaaaabababaabbaaaabbabbbaabbaababababbbaabbbbbbbbbabbbbabaababbbbabbbabbbaabbbbbaabaabbbbbbababbbabbaaaababbbbabbbaaaaaaabbabbaabaabaabbaaabbaaaaaabaabbbbaaaaabbababbaabaabbbbbabbbbababbbbaaabaab

output:

2

result:

ok single line: '2'

Test #33:

score: 0
Accepted
time: 25ms
memory: 8004kb

input:

200 49
abbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbab

output:

10

result:

ok single line: '10'

Test #34:

score: 0
Accepted
time: 41ms
memory: 10724kb

input:

200 57
zbizbizbzbizbizbzbizbzbizbizbzbizbizbzbizbzbizbizbzbizbzbizbizbzbizbizbzbizbzbizbizbzbizbizbzbizbzbizbizbzbizbzbizbizbzbizbizbzbizbzbizbizbzbizbzbizbizbzbizbizbzbizbzbizbizbzbizbizbzbizbzbizbizbzbizbz

output:

3

result:

ok single line: '3'

Test #35:

score: 0
Accepted
time: 42ms
memory: 8576kb

input:

200 44
aaaaaaacdaadaaaaaaabdbbaaaaaaaaaacbdaaaaaadccdcbaaaaaabdcdadaaaaaaccdabbaaaaaadcbaadaaaaaacdcdbaaaaaaabbcbdbaaaaaaabacbbaaaaaabcbccdaaaaaadbaabdaaaaaadaacddaaaaaaadcdbcaaaaaabbcdcaadbbdccdacdbcaccdbbd

output:

6

result:

ok single line: '6'

Subtask #4:

score: 20
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Test #36:

score: 20
Accepted
time: 3334ms
memory: 16360kb

input:

1000 153
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

28

result:

ok single line: '28'

Test #37:

score: 0
Accepted
time: 6581ms
memory: 15652kb

input:

1000 79
babacbbcacbbccccababbacbacacbbcabcabbaaabccbacbaacccaaaaabbcabaabcaaabccccbbaabbcaccaaacccbaaacaacccaccababaacbcbbacbcbbbcccbbcbaaababbcbacaacaccbcacaaccbbbcaabcaababbcbbabbccaccbccabaacbcacbbccbbcbaaccbcaacccacccccabbbabccacbbbbcaabccccacababacaccacbcccbcccbaccabaacbaccabbcbbacaabcbcacccaac...

output:

200

result:

ok single line: '200'

Test #38:

score: 0
Accepted
time: 4772ms
memory: 15040kb

input:

1000 6
ahcfaddebbbccheeffbfdbbbdcjhdefhcibhgjbgeaigaaifcbdfbjdjiddicbhagggaaaajiejjjfdabcjjjceieaijacjbaecifacgdajcigfababaddecfehdhfbfjhdahchahiiiafaibdbbdegeachfdicciaegdcagaahgdgebdhbdejajafajjjfdjfjdijjgahjdjjjifeejjbachjaiacgjfhccebjgddjehiecibjfheicgihfdabhbdiijbcdgffaedcejecciddahjajdfjiddhgc...

output:

237763

result:

ok single line: '237763'

Test #39:

score: 0
Accepted
time: 5171ms
memory: 14532kb

input:

1000 79
cfbdcgcdcdgabebecbbgcebcgefcbdageefffaddafegeabdagdaaabeaedgabgedafdegdggbedcceafgegbceceebaaadbccgadebeaeebcaggdbdgefeaeegafgbaeegaadbcaeddceecacbecdgfaefaeagdbaadbdfceedgdabfbaadcffgbedfgbbdddbcgdfccaeabbgabdfgefcefbaadefcfagebegfafbabfcbaagbedacfgffefadcdecbabbcfaegcgcddbagceaaaabcfacgfbe...

output:

91

result:

ok single line: '91'

Test #40:

score: 0
Accepted
time: 4329ms
memory: 15104kb

input:

1000 3
htspasbnfsqdnsppbkaaprldgjpfaikdjcaojaejdtipsrkrfddlkepkqbjprsejnpcqigqjkmpqfhbbglccmtrrngoopfscopnocqkfesphqnteofsinkqqopnknbkejodkpnmjobgcisimpsgnqqidtfsdjakntlkgtgnnaietrijhgksrsnohilbrrtcpndciksonfptfkljhhisihcngqsdmgreakrrgmgnspabhfmegnmhtlhkrfnliipssjcbdikfgqmjtaltootaaopdrfrfrdaelnbrdd...

output:

1022595

result:

ok single line: '1022595'

Test #41:

score: 0
Accepted
time: 4120ms
memory: 15236kb

input:

1000 14
jmgovzbodqoznwcmegtwxcunytkvnnoqixxjgbspvoochcctbmgfcofmdctzmpxwqwztunedfpvrdbbgujrmowvbahioiwnewuidqkajpxdkwckpmmbrkbrebgiqdktjgeaktrcgcaduslvxlpqofscjzmjmjyyzpvogthoglxsdvqpvcccfljopkcudctgxjovrppnbyzairtebpggtheutanrfalcsakvcreyxxchzalfaybwptnbulyteeuapgoscpzvigwetrjhtzxtgzhehhknztxhcvrbw...

output:

11558

result:

ok single line: '11558'

Test #42:

score: 0
Accepted
time: 3306ms
memory: 14636kb

input:

1000 102
bacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaabacaab...

output:

384

result:

ok single line: '384'

Test #43:

score: 0
Accepted
time: 3523ms
memory: 14456kb

input:

1000 11
dfbkbjdlafmdkfifefkbcblkmjhjhidabdhgcdfbkbjdlafmdkfifefkbcblkmjhjhidabdhgcdfbkbjdlafmdkfifefkbcblkmjhjhidabdhgcdfbkbjdlafmdkfifefkbcblkmjhjhidabdhgcdfbkbjdlafmdkfifefkbcblkmjhjhidabdhgcdfbkbjdlafmdkfifefkbcblkmjhjhidabdhgcdfbkbjdlafmdkfifefkbcblkmjhjhidabdhgcdfbkbjdlafmdkfifefkbcblkmjhjhidab...

output:

15796914

result:

ok single line: '15796914'

Test #44:

score: 0
Accepted
time: 3477ms
memory: 13912kb

input:

1000 3
cmabiacablhoadfenghhdekggicmfkhennaifblffiofabfdkmlcklkndoiognhfihbocmabiacablhoadfenghhdekggicmfkhennaifblffiofabfdkmlcklkndoiognhfihbocmabiacablhoadfenghhdekggicmfkhennaifblffiofabfdkmlcklkndoiognhfihbocmabiacablhoadfenghhdekggicmfkhennaifblffiofabfdkmlcklkndoiognhfihbocmabiacablhoadfenghhd...

output:

6797306034

result:

ok single line: '6797306034'

Test #45:

score: 0
Accepted
time: 3463ms
memory: 15384kb

input:

1000 1
deebcabbaeeaadeebcabbaeeaadeebcabbaeeaadeebcabbaeeaadeebcabbaeeaadeebcabbaeeaadeebcabbaeeaadeebcabbaeeaadeebcabbaeeaadeebcabbaeeaadeebcabbaeeaadeebcabbaeeaadeebcabbaeeaadeebcabbaeeaadeebcabbaeeaadeebcabbaeeaadeebcabbaeeaadeebcabbaeeaadeebcabbaeeaadeebcabbaeeaadeebcabbaeeaadeebcabbaeeaadeebcab...

output:

13523081623

result:

ok single line: '13523081623'

Test #46:

score: 0
Accepted
time: 3361ms
memory: 16408kb

input:

1000 176
ddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddcddcaaddc...

output:

15

result:

ok single line: '15'

Test #47:

score: 0
Accepted
time: 3372ms
memory: 16848kb

input:

1000 176
dcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbdcbdbd...

output:

26

result:

ok single line: '26'

Test #48:

score: 0
Accepted
time: 5398ms
memory: 15292kb

input:

1000 1
bbabaabbabaabbabbabaabbabaabbabbabaabbabbabaabbabaabbabbabaabbabaabbabbabaabbabbabaabbabaabbabbabaabbabbabaabbabaabbabbabaabbabaabbabbabaabbabbabaabbabaabbabbabaabbabaabbabbabaabbabbabaabbabaabbabbabaabbabbabaabbabaabbabbabaabbabaabbabbabaabbabbabaabbabaabbabbabaabbabbabaabbabaabbabbabaabbaba...

output:

674957710334

result:

ok single line: '674957710334'

Test #49:

score: 0
Accepted
time: 5342ms
memory: 15188kb

input:

1000 27
aacabebebebeaacabebebebeaacabebeaacabebebebeaacabebebebeaacabebeaacabebebebeaacabebeaacabebebebeaacabebebebeaacabebeaacabebebebeaacabebebebeaacabebeaacabebebebeaacabebeaacabebebebeaacabebebebeaacabebeaacabebebebeaacabebeaacabebebebeaacabebebebeaacabebeaacabebebebeaacabebebebeaacabebeaacabebe...

output:

97930

result:

ok single line: '97930'

Test #50:

score: 0
Accepted
time: 5405ms
memory: 14400kb

input:

1000 92
agddghjgdcdaagddghjgdcdaagddghjgdagddghjgdcdaagddghjgdcdaagddghjgdagddghjgdcdaagddghjgdagddghjgdcdaagddghjgdcdaagddghjgdagddghjgdcdaagddghjgdcdaagddghjgdagddghjgdcdaagddghjgdagddghjgdcdaagddghjgdcdaagddghjgdagddghjgdcdaagddghjgdagddghjgdcdaagddghjgdcdaagddghjgdagddghjgdcdaagddghjgdcdaagddghj...

output:

91

result:

ok single line: '91'

Test #51:

score: 0
Accepted
time: 5518ms
memory: 16624kb

input:

1000 229
acabaacabaacaacabaacabaacaacabaacaacabaacabaacaacabaacabaacaacabaacaacabaacabaacaacabaacaacabaacabaacaacabaacabaacaacabaacaacabaacabaacaacabaacabaacaacabaacaacabaacabaacaacabaacaacabaacabaacaacabaacabaacaacabaacaacabaacabaacaacabaacaacabaacabaacaacabaacabaacaacabaacaacabaacabaacaacabaacabaa...

output:

6

result:

ok single line: '6'

Test #52:

score: 0
Accepted
time: 3915ms
memory: 17144kb

input:

1000 387
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

1

result:

ok single line: '1'

Test #53:

score: 0
Accepted
time: 4500ms
memory: 15520kb

input:

1000 79
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaautinovsqokcxceilfvzjuysmgbiyekhrjqvuhhncnpwdtvsyztzgtalquqtzfcvkwymtgamyvbgfzwdauxdetdjumnyi...

output:

107

result:

ok single line: '107'

Test #54:

score: 0
Accepted
time: 3967ms
memory: 14484kb

input:

1000 15
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaeykkmvfmjxnnkseynhnyfbqpwwixbaaaaaaaaaaaaaaaaaaaaaaaaaaaaarpatbemszmhqxaxnyvkrdyqhbghuuaaaaaaaaaaaaaaaaaaaaaaaaaaaaayslipjklioorocacxthuhpczyttxgaaaaaaaaaaaaaaaaaaaaaaaaaaaaahakpigwtewvfeumzjluchidvlsfobaaaaaaaaaaaaaaaaaaaaaaaaaaaaazwzvxvonganwxwbacknxoaozsirfuaa...

output:

11461

result:

ok single line: '11461'

Test #55:

score: 0
Accepted
time: 4821ms
memory: 22736kb

input:

1000 1000
lgugapptmavvpeohxdkunrtpzidgaokzvstjjgksmlbkmqsuymbcdjrwgeigyrxbepzxpjvqmdsotqfpkpxlhqimhsdmplvvnarlejkguqqdvuxexwnqmfvtbilpszuonxvkmqfejhjkhvswijpbjacbjutfrkkmzdryibkpzpzdkcdavvqyygpvzxtmpkqzapdreghjxogcvigztzpeecembjpvifgmnvreswaestowqvolqgwpvkvtgtiimgvhjegzuwdjdfhlectopiinmvkyckopyavyyv...

output:

0

result:

ok single line: '0'

Subtask #5:

score: 0
Runtime Error

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Test #56:

score: 0
Runtime Error

input:

50000 1
eaadcfedcbcceccfccdbbeccbcaeaaeffbbbecedddfacfdeaadbbebdcbaafcefedddbfdfbcdfbccbdcdcbccbebcbddfcdaacfefffbafcdfefabbecbcacdfcabbebedacdbcdfebbccfeecddcfbdfbebffafdbaeddcbbecfdbfaecbeeffcdfbceefeddfdadfadfadfeafaeddbccabebeaccadbfdfbedededecccbcdcafddefaefccbfbcdaeedfeaabdceafeaabcdabbceddecc...

output:


result: