QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#742977#6228. 字符串Urd100 ✓155ms17944kbC++172.7kb2024-11-13 17:47:072024-11-13 17:47:15

详细

Subtask #1:

score: 10
Accepted

Test #1:

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

input:

11 1
rbbzzmxmbmz
rbzmrbzxxxz

output:

3

result:

ok single line: '3'

Test #2:

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

input:

11 5
iiecieccice
ecccceicicc

output:

27

result:

ok single line: '27'

Test #3:

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

input:

11 2
vfxaikwshqw
vcrstlhgupu

output:

17

result:

ok single line: '17'

Test #4:

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

input:

11 5
abbaaaababb
babbabbabba

output:

24

result:

ok single line: '24'

Subtask #2:

score: 10
Accepted

Test #5:

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

input:

189 183
ggzkilwnazromarxgofvbpvoiyxjezsnazromsuadvbqcrbpcgopuaflzxarxsclfzjymwofsoupxgrokklvydfclzkvzosyromseacgopuadvbqcadvbzgrovetzatvbgrgcrdfgwlyokkavyrooibhplfopwyrvkdqtplqjvetarxscoalmscxmjpzt
pceqoxxlwnazromseacqiyzsbmksznaafomibhgsomseaccjgfsoupxgrokkavyromseavzzxarmprlpcgopuadvbqcrxhotzatvgt...

output:

1281

result:

ok single line: '1281'

Test #6:

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

input:

200 57
fepkbvxoerpcvroebkmqhnffauhmrupetettegzclvsuahdpjpbudmlgqoejupzgxwudnyuiyyjgmqhgwsgsgxwpkpqjszlxyoxueypcughhvttnxzskldvfngvvbzxsetkypupmwszsexkplmgspfbzxsetkypcughgwsgstdmjpgxlfzexlxygayahepkbkmqhnkkm
oexzskldvfnudxwudnmxsetkvxoerxonxzjdoejuplcvroerphpzojpqjsjlrmqjueykphydhbkszlxykmdvfyyjgwsf...

output:

7863

result:

ok single line: '7863'

Subtask #3:

score: 10
Accepted

Test #7:

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

input:

200 186
bmtexhhnkxtturdmbdwlnojqbrgmfsldftmxfuhwcsfvhqrwtyxahyaeqhdmptdzatiusqlzplnpwwpjtqruzwzfxrkmolppethnfcjahkggzrahuhjxtzzxftapeckzluzbawtqebmkuqvowxjjejyhlwviatpwsgrjlskzdemcjaikeqodtkzjfpuxjvajbecvzbfr
iuaztcsejcanhhcxbceaivostovczsbsrqongikbzzrgrmubfqexqczjgzhdonhidpecjyugbbgsalfmosipjpumrgk...

output:

2783

result:

ok single line: '2783'

Test #8:

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

input:

200 91
babbaabaaabaabbababaaaaabababbaabbabababbabbabbaabbabbbabbaaabbbbbaaaabbbbbabbbbbbabaabbabbbbbbbabbabababbbbbbbaabbbbbabbaababbbaaababaaababbabbaaabbbbbaaaaaabababaaababbbababababbbabbbababbbababaabaa
aabaabbaaaabbaaabbbbbbbbaabbbaaabbaabbabbababbabbbbbbbababbbabbababbbaaaababbbbbbbbbabaaabab...

output:

9267

result:

ok single line: '9267'

Test #9:

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

input:

200 150
nbosezhgtlbulcqhzxmsekhmlwjxdnykhhrppccxytopamjpnmmlwjnvzxmlmzbgonxrfjnbehezhgtlbulgvjewofqnuurfjngckhhreqocuonxrlpthohchzzuatphchzwumrbokiqfbsbehnxsekhcbyoighozeesdxrbgonxrthozeebclvtpptlyjfgicbgbiko
fvzctlpthoqfbssekhcbyoikzeexsezhgtlbulchhrebswwfgjjqxdnmtpotlpwcxytopauafopamjpnmzxmlmzbgon...

output:

7551

result:

ok single line: '7551'

Subtask #4:

score: 10
Accepted

Test #10:

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

input:

1970 76
dbajnykavlpizxpttpyxdtospawwemltpdearvnatpwekllfrwdelahxyilixhccmsukvusqodalaqqrxnyufonqzubxmddmryuysetyxlqrrepcajjhtoriwliaubkocbkyfwvdsuchvtxnhytznlmkzggxmolwkrwqjyhvnipugloyrpnplaokjtlwijwbdzttpeqjqdfqgtnlmkzggxmolwkccgorxwpipugloyrpnplaoubxmdoslibzcwbgqygqjmhpfbiggjanvjamjbwkcpzoucifnkjo...

output:

99038

result:

ok single line: '99038'

Test #11:

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

input:

2000 1800
vagekztgqyfqacujtmjjdggeisvtokooiolvurvumezuhipwklzgpivjrtfscnnsmbaumbnvwfrafjhrsotdfuhkafprhzrtjhjqmgduylebgxjqgmwtqocgthlxcjbxjhhpwaagzdpwmvagekztgqyfqacujtmjjdggeisvtokooiolvurvumezuhipwklzgpivjrtfscnnsmbaubvnmmftofygcvjsnotectmvyyagrpdgtcnwduojcrzwdsvqutkizcedhuqupwlrnlerheesueheorqfrf...

output:

359745

result:

ok single line: '359745'

Subtask #5:

score: 10
Accepted

Test #12:

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

input:

2000 110
cctdrvumnyzeieuzynrhpgdjhtblkwegiqspeqdvlfquembvbgkbxbxqxkzcrejmjybxpaajjbahvnllhsnwqhwbodppwugaglhiccqgwfrqwrrtzvarjphzdvpanlilvvubyzfpinkncmusfpeythsyaqehcpsqeoarrjesmszoxjdwokscxiopdvlrrcatthspslqeteanbgvonavsekcjlxzqkdknewqwkzlrkogaqarlookpwmdbglitjpljgkskomjlpjaxnqneorxlvaacsepppualnwg...

output:

204737

result:

ok single line: '204737'

Test #13:

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

input:

2000 1568
bbaaabbbbbabbbbbbbbabaabbbbaaabbbaaaabbbabbbbbbaabababbaabbabaabbabbabbbbbbbbbaabbaaaaaaaaaaaaababbabbbbababaaaaaaaabbababaaababaaaaaaabbbbaaaababbabbaaabaaaaabbbaabbbbabbabbbaabbbbabbababbababaaabbbaaaabbaaabbabbaaaabbbbabbbbaaabbbababbbaaabbaabaaaaabbaabbabbabaaabbaaaaabbbabaaaaababaabbb...

output:

675034

result:

ok single line: '675034'

Test #14:

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

input:

2000 1344
lolkxicffjoahkfdggddidecuqrfpfooutddnzbcazpcocgubmrigntptbyvztzqgicupxqkjakctdgmbqtfljxesdkumgzypjteiomnavydabegdsueyupxucuopzhucgrbipveldsgvdzxbtskfoficlremrcxzgnhkumgkqhkgrvdabegdsueyutemrcxzgnhkbkqhylgoldsvtgbljrmcbicgqshbetgofdjcxzlysumcfxpcovccfclgjltgmjvwlgghxzvwlgghxzhanmfwhlhxsvrno...

output:

880113

result:

ok single line: '880113'

Subtask #6:

score: 10
Accepted

Test #15:

score: 10
Accepted
time: 136ms
memory: 17700kb

input:

136531 132287
dqkgbnnyzwmbzckupyuuupmenzjfpooutxplglbcqcyeyniuzhgecanatlvlfowlzqjrztednqbhopdrxaaephxnbfaqqfoqovicxazopnkttwzqvlyqrgistvpetfmhhughbqrncmrdbgmyfmivuxbwtuqbrqazuyygcxxgcragzwwxoxqyvpzugywirksslmhsspzountdivthtkvvdqhuoncsdrcewhqkptcwfuysrhqkgrivpckevgbejvwryjtsglmditbbjtxqubwruuqngjugbu...

output:

561550095

result:

ok single line: '561550095'

Test #16:

score: 10
Accepted
time: 155ms
memory: 17792kb

input:

150000 121497
zngvmoixlvkgnadwokornampshpamkzttdsrlrdpljvnyhtumgbjrszxmlbjvuqqilfbwzozrbrofqdiwivrtylbupfvinlggpqojtpqnyjmyisydgzwcpicsacutzkpcttcktknqmvhjvvwkomytrhajtifdqldcfnhhwaavxfqtazukudojiyhxpxqoasmlvfbgavfdamyvdapmlxjvxrzvldbthtagauvczpuofglawxdlhvfughisxfxhskuuybyipbwxauxuytsagjronxoimcbzd...

output:

3463078308

result:

ok single line: '3463078308'

Subtask #7:

score: 10
Accepted

Test #17:

score: 10
Accepted
time: 73ms
memory: 16848kb

input:

93376 10006
qvajyijbvmbtcgejthwkwatplbtmscyqqlbjmooteoyzbushasbdruqbwsvdjwzwnfzkawoaqwwibibmsnmnbinktjybibswordjyxipmonbqujxmexlgnchbiqsalrrlnupdhaxvaehcnbjsmcypcakmmengrpogkisfrqghzuakdwdyipuioibvatllelgtqaeqnnmcqcooftbyvjbrfyczwmbiuccckfgdjkdhfdnygsmpspulqwlaorrepzauxbmwpyfqzkkgjyenyfqpulqkhbuegic...

output:

833972344

result:

ok single line: '833972344'

Test #18:

score: 10
Accepted
time: 79ms
memory: 17016kb

input:

100000 3453
klyarstaybbaawhfordfxixwdlbxplhsequnbxtfmeanqfqimnkbcyqqyedrdtpstcddekspidolwgrqelojswgdfnaepcurhsyhvtdwfgufebqjrcyizbinzlntltteasxpwybvkiowzrdfwqybqglvtakkkejwiuvgypdtjycxiqrjfpwitfkrqkifjmxwzfpqgvvhdjfcfufqzxsnslakggtbtbzgrakleovglwbwhayczuygizjvsncrchniozxywswpchtohckqulsvytglehfhgtmk...

output:

246347135

result:

ok single line: '246347135'

Subtask #8:

score: 10
Accepted

Test #19:

score: 10
Accepted
time: 76ms
memory: 16692kb

input:

90081 61832
lqqwzyiwccivztgzvdcjowmgtohjstttigxkkciexmyicxputfgudxdwemcpnnforfltonoeevwxptmbzvelckmgmboebsmfqgvxwhgdlwezreycawmjgnlinxzjsbaqjafsrwhngmorjjubzbwynwgblayrduekrmrenvcuqdmnebsjqvhgcugnwppxtbuuekizxwcpvsusxmzmhzdsmlurhzugnitxtplmsefrsihjdvroaihlluqtttthcyyuekitefhcjcrwrcricypqhehanczcqarp...

output:

1742191016

result:

ok single line: '1742191016'

Test #20:

score: 10
Accepted
time: 79ms
memory: 16848kb

input:

100000 18330
aabbbaaaabbaabbaababababaaabbabaabbaaaabaabbbbbbababbbababaabaabbbaabbbbbbaaabbabbabbabbbbbaaabaaabbbbbabbabbabbabbaaabbaaababbaaabbaaabababbaabaabbbabaababbaabaabbbbabbabaaaabbbabbbaabbbbbaaaaabbaabbbaaaaabbaaaaaabaaabbbbabbaabbaabaaaababaaaabbbabbbaaabbbabaaaabaaababbbabaabaabaabbabbb...

output:

1438031519

result:

ok single line: '1438031519'

Subtask #9:

score: 10
Accepted

Test #21:

score: 10
Accepted
time: 143ms
memory: 17764kb

input:

148067 68475
ndqltwlfnbfgjjrxfzwzlxjwuytfnmgkoozbgxmjhagcxowjeowjshohauryuvbhyijzktzzjnffhccmufbutucqpymbncwdopfziqpdcxqnkgwqekmyfxfftyzmwuyutgddadhmtteqefmbwpuauvsffbcqjhjwukvpleaykjajfdxhcspygwkikuwmtnjhjgxoaktshigoysxhrjjlptordbzoumukatnlzygzcykbnxgvlevngkwygjqrpyaodfutjhyyfygjccqkyjnzebcujwvvokd...

output:

5449905181

result:

ok single line: '5449905181'

Test #22:

score: 10
Accepted
time: 143ms
memory: 17692kb

input:

150000 125148
ccpbdfncvudrbqqhkphhmpqgzdnpfztoddoznzptiocplmqasljuuplejyjyczoencfvaxxkwwdradqpgrxhcenakmttyisfuzksmtuhfryqrzqjbmfgoiaxnpgvkiaidndioksdtfhojgfxxnceywvkkbtdresxebwpiqqxqcwgemgjblwugmolkozcqvueobmapsrdxwllpesqiberzefaktdnxxydxorremnsjsesvvgnwugwmzkgdeathtnvqxqzkzmhnihtopfmbvaaeunnzzuiix...

output:

3100212388

result:

ok single line: '3100212388'

Subtask #10:

score: 10
Accepted

Test #23:

score: 10
Accepted
time: 145ms
memory: 17836kb

input:

142928 139024
jdgusjdfvxvfdtvgwwumkrnhgpckfgeoagwnspjyiexkkgudqtkxbeprmpvzfsdtoexmccgqmgewithttrtoceddynvnvhurikgwhvdibmyaokzysmyrjxbwymdyskhsdhnhhbhoeyzsepiyvebfyojfxzlhrxozvsvzdmlggrtbyemqcxixqnmzscepaoogdxfdrvbwxxscokuucdycppvssnckvazqoutebossriaxuhnesksxzycabccoafbluystrytufwxhhdrcfumanheulnbgph...

output:

542881204

result:

ok single line: '542881204'

Test #24:

score: 10
Accepted
time: 137ms
memory: 17944kb

input:

150000 101453
bbbaaabbbabbbaababaabaaaababbbbbaabaaabbababbababbaaaababbbbbaababbbabbbabaaaabaabaaaabbbbabbababbabbbaababbababaabbaababbbbbbaaaaaaabbbbaaabbababbbbbbbbbbbbabbbaaaaabaaaaabbaaabaabbbbbaabbbaabbabbaaaababaabbbaaaabbbaababaabbbaaaabaabbbabbabbaaababababbaaabaabbbabbbbbababbbbbbbbbbbaabb...

output:

4870040636

result:

ok single line: '4870040636'