QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#607007#4120. 双旋转字符串3un_larryfunc95 954ms136500kbC++201.7kb2024-10-03 13:35:282024-10-03 13:35:28

詳細信息


Pretests


Final Tests

Test #1:

score: 5
Accepted
time: 15ms
memory: 130948kb

input:

100 100 100 100
baabcabbbccaabbcbbcacabcaaacacabacbccbaacbcbcaacccbbcbaabcccbabcbcaaaacabbaccccacaabcbbacacaacabcbcc
cbcbcaacacbccbaccabacbcbbcbabacabbbbbbabbcabcbcbcaabcbcccbabaccccabbabbbacbbacbcccaaacaccababcccbcac
bcacbbbbcbbaacabaccbcbccabbbbccaabcbbcaccbbcaaaabababbabbbacaaabaabaccbcaaccaabcbb...

output:

1620

result:

ok single line: '1620'

Test #2:

score: 5
Accepted
time: 23ms
memory: 130876kb

input:

100 100 100 100
cadaadaccbcdaddcabccbdbcbdbadaccdabbdbbcdaabcabdcddbdadabbdabbbdacccaadabcccdbdaadbcacdadbacccdccbda
adcdcdabaddbccdacaabadaabcbdccaaddabaddbcbbcbddcacbcbcbbaacbbbbaccbadddcdaccbaccdddbbdbdbbbcbaccccba
bdccaaddabaddbcbbcbddcacbcbcbbaacbbbbaccbadddcdaccbaccdddbbdbdbbbcbaccccbaadcdcdab...

output:

2028

result:

ok single line: '2028'

Test #3:

score: 5
Accepted
time: 114ms
memory: 130984kb

input:

500 500 500 500
acbdeceaeeaaaddabdccccadbddcaeaaddcddcedebdcdabdedbaedaadcbdabaddeeddecbeadbbaabebeaecadcbdcbbdeeabcadabbbeebcbdcaabababcbaaceddbcdcdededbdecdedaaddaabedbdecbedcdeacdbededebdabecaddecdcabedbedaecedabecaaaaecdceaaeeaabbaeadddccbeddbadddedabaebdcdadabeadedbabeeacbabbbbcdaaeddabceadddac...

output:

25201

result:

ok single line: '25201'

Test #4:

score: 5
Accepted
time: 111ms
memory: 130752kb

input:

500 500 500 500
dfcecccefcdccebfbccfbeccbafbcecebcedbceafeedeaefefafbaadeedbdcdbbcbccedcfbbfffeefeaaecffbdbfbcdadacdeedccffafadefbbafdcddcdbfefceddbfdbeefcaaeeceecdcdecaddcdfaeacecfeadcbfecadfdfbaaadcfaffceadfddaeafaffdefecedeeedfbdbfddffbcfacecedcafafefafcdbdccbcceadadaebafbacacbfcbabfdafbefcfdcfbc...

output:

27910

result:

ok single line: '27910'

Test #5:

score: 5
Accepted
time: 123ms
memory: 131524kb

input:

500 500 500 500
afgffgbcdadcbaacaddecbgddaeebcbddedcggdbfgbeefbdbgaadgfdccgddfccfedaafgdfddfacbadfeffcfbbbaeffgbcdffgdegafggggedebdceegdgeagebggfeefcagdaefebdaeaeefeedgfdagegcbgfgccgdbdfbegfeffdfdffcdfaeeegffedccgeeeabbgcfebggcbfedcedgggdbfaefeddgeafffdeddceedgfedgcdcagcdedgddabgdcgabdcfegdgbddacafe...

output:

31141

result:

ok single line: '31141'

Test #6:

score: 5
Accepted
time: 108ms
memory: 133756kb

input:

500 500 500 500
ddeccccbhdbehgddebagfdbchbfcdedaadbedfeedbbfcceabfhbdffegbabfeacbfebaagagfcdehhbhabdddgdhcabcbccgchdedheafdaggddfcgfefchcefdcedbhdahegabhcfbhacbedgggdchahghggbhfgaacbbgffabhdcbddahbfgeadfefffdhfhdfececeeghbedccfagdgfdaadhdhgfgfdfaddebbagaaabagaegbdagadfghhadbgdddcfdgaecfabfaadebghfff...

output:

35669

result:

ok single line: '35669'

Test #7:

score: 5
Accepted
time: 81ms
memory: 131540kb

input:

2000 2000 100 100
ibhdcgcdgcdhcbffbgdhcdheecfgabefeefafghfdgdcafabafhfibgdcbcbidgifiheibdahcichghfhidaagfaehgfifcacage
bigcihahghfdbcgbdbbaabdechaeeidhhdfiibbbcfdfbafciecigaeiadbibbbcihdffbabfadcgcgabaeabdfahbahdhaigdbg
hdgicebgfebicafcdfcghfibdeahehgfhdihadbfehfagfdaedbhdbhddfgeidaecfaeafbbhecgbcif...

output:

285548

result:

ok single line: '285548'

Test #8:

score: 5
Accepted
time: 81ms
memory: 131228kb

input:

2000 2000 100 100
hhabhfehdahfbhbbegaefgcaccfdgeedgededccchhehfhcdcdbaegdbhacagfhdhgchaadabdbacgbghbbabefeggbdeaahcdfh
gegcddbeagcbeecfeagbeadadchgcadefhghgcdcgegbggcaffhcchcgeaghaacedhchafdahaffcaegchbeegfgbafhgbefbchd
efeggbdeaahcdfhhhabhfehdahfbhbbegaefgcaccfdgeedgededccchhehfhcdcdbaegdbhacagfhdh...

output:

307156

result:

ok single line: '307156'

Test #9:

score: 5
Accepted
time: 82ms
memory: 131284kb

input:

2000 2000 100 100
egcaaeaeacgccgbiaacegdhiigfcafhccgghhiedghgeddcggddggiccbcbegbhehhfbfgfbgegeaieegbcbaeefachidcibfdgg
cbcbegbhehhfbfgfbgegeaieegbcbaeefachidcibfdggegcaaeaeacgccgbiaacegdhiigfcafhccgghhiedghgeddcggddggic
afcdfcghfibdeahehgfhdihadbfehfagfdaedbhdbhddfgeidaecfaeafbbhecgbcifafegihgacigca...

output:

333374

result:

ok single line: '333374'

Test #10:

score: 5
Accepted
time: 88ms
memory: 131284kb

input:

1000 1000 200 200
hcceehdafadhfgbfcbdgebeggcabbbdbddgdehegbegfeghhgdcfadddghdcfbafhfedegffddfbcedgcacagaagfcbcggfbefheceagadeahcdbcgcbfbdhcacbcbcfbeagfbfbaccbedhhgheggfeggdhhbbhbhbfbgfegccgfaehchchabeddbcgdegeefeheebgf
dhdfbdffbachbagfcdahaffcaegchbeegfgbafhgbefbchdgegcddbeagcbeecfeagbeadadchgcadefh...

output:

90223

result:

ok single line: '90223'

Test #11:

score: 5
Accepted
time: 87ms
memory: 131552kb

input:

1000 1000 200 200
egccbhhhcfcicdicefiaagdhdhddiicfifbhhbbbaedcggebecihibddgfibcahefcabbabbdhieihciehdhgeieeeaafbbgafcffecfdehghgaageifhaaghiebgifhacdfcchaefbeebeaaideehhhbbdcaiideadfbchddieceihbccihdaabgffbbgfhicegabgf
fbiigdffccafadbdgbhcefcdcffcabieigffbbdaiddbgdeccaacffghabfihfdebbaddegeheeaahefg...

output:

99374

result:

ok single line: '99374'

Test #12:

score: 5
Accepted
time: 78ms
memory: 131272kb

input:

1000 1000 200 200
ahcdfhhhabhfehdahfbhbbegaefgcaccfdgeedchfhdbfgcgfhcghfbgfgebabcebefbhhggdfagadababdaccbeahbhaafcbfgbbcdeechhafafhfhaeffebddfbafgbfhdfaabahgededccchhehfhcdcdbaegdbhacagfhdhgchaadabdbacgbghbbabefeggbdea
gbghchaeefffeaagccdbahedfgbbecfcecdhbgdadddbfaafbcfccfcfcebhfdfbfcedafhdhcheaccfg...

output:

111074

result:

ok single line: '111074'

Test #13:

score: 5
Accepted
time: 851ms
memory: 134508kb

input:

5000 5000 400 400
xuuffbrwhpevcoqrgrqwplkhjucfuwohzvphjbjyovdlnbfrkvbemwytfjynqmgzagbkwekkouxdcynkhtosfytlucentoilfuldvrxlonvkxzecxepkmzzgxluahmjyecsldjesdcpjikvpaudvkxgllisaambovjkdqrkdorjfnyghhhptzifawftzqgemnhpqyictmoyfpcvkcaodakjacqauzyowdzsfqhkplfbyzmnimdlxmjydaxyjnecxsjjbhiqnvocdenqmwilxxzoqfo...

output:

1248979

result:

ok single line: '1248979'

Test #14:

score: 5
Accepted
time: 852ms
memory: 135552kb

input:

4000 4000 500 500
ztoidukuhjzefczzzbfkqdpqzikfobucdhthxdjgkjelrlpaxamceroswitdptpcclifkeljytihrcqaybnefxnxvgzedyyhngycdqsoemuvnpppsuacbazuxmhecthlegrpunkdmbppweqtgjoparmowzdqyoxytjbbhawdydcprjbxphoohpkwqyuhrqzhnbnfuvqnqqlrzjpxiogvliexdzuzosrkrusvojbrzmwzpowkjilefraamdigpnpuuhgxpqnjwjmwaxxmnsnhhlqqrz...

output:

1067436

result:

ok single line: '1067436'

Test #15:

score: 5
Accepted
time: 954ms
memory: 136500kb

input:

2000 2000 1000 1000
vjjmpsvknhkwjopmmlebksucvzqlyqnwcmbvbhrmlowpjbwyvwtgtoqnmicxapzarknnxtuufarzrosdqwsmtcjghecqudosrtjxyaaykqrxycrxuwjxnpqjnbkcpdmokalxapemvbqlzsvxzkutappwgzpdpyzkzcvbntcvfxsxpjaoxtfhvxxytgokrcxaetauqgndmphwzyiayabjrqgeppxyjsttyzuvldvybsuxkbmfzvrtnovidznpghozvafmsnsnqivmvubcwtfsrqtm...

output:

307672

result:

ok single line: '307672'

Test #16:

score: 0
Time Limit Exceeded

input:

1000 1000 2000 2000
nonchigmtfbourzhmfffsrcbdzdfbeostfvskrebtljhzkrghtsgbbdhlsicutfmmjoutfvexdczschytbcrkliwcxkgoqvufyogvfrnymopfwpnfuzeihxyxansprggwdyafawqgqbtdgffcegtpcybqvrqusqsydymvpeibgxffnopfymrmqhucgomdiuxemxbzyslvlitwubnspbmewwhgpmprkcyfdxkmtuhevoixrwlmxwgcnoyzmmyovrtepqtibdvthmpoaqyddqrxnvk...

output:


result:


Test #17:

score: 5
Accepted
time: 785ms
memory: 133808kb

input:

10000 10000 200 200
ckbgejbfcbfghfbmdildfkjjkmfkdllgmdcafmfgbifbdkjghcjmbmkemhhlfldgajdkcklmaalkdkdblmjmlhbmamcckhkgkldmiichlchefmbifgeklegmikdhcbamiafleaekfikhgddiheefigbhmjmhjkmmlfcaaeaejkegjccihhejibjgfddjbbggehdmchme
lhhflekijdhkfcmbfiffefdgicmibecjfmflmmcjjaehelkkjmhbhacclfkclmbbghghbkeajiceecj...

output:

4347415

result:

ok single line: '4347415'

Test #18:

score: 5
Accepted
time: 688ms
memory: 134208kb

input:

20000 20000 100 100
krnoipoiefcgxlvuywuecxwmlpllfrfygcaaqyqfhqhmhmdiujjivnwvgfnsaqmfkjymxiuqcaqlyuvvxysjgjdysnancrdsxihv
edjdgxyrnjdafsiaflodbsjcllikbkndeyxxjhqtfsblafbyvjporanrvxwbgxeefbmaspllqotgclnhfpgfqalmlpamjsdqcimi
lwixoqldswtmhmjxqedqkprngproxvfpeuagbsxexjegpqbgitobxmnsheqqrjatydimofugclqurc...

output:

15997802

result:

ok single line: '15997802'

Test #19:

score: 5
Accepted
time: 906ms
memory: 136232kb

input:

2000 2000 1000 1000
alfdkfiecifckggbjkfaddhkjfafbmifegkjceecggkecaeilfgmjclfllcdceiikeffmmaimkkafijfeeamklckfkglfglcffadcbbefkmbcbejhiciabblgcbellfcbacljieiiclamlehjdadedcmkhjjlbbiabjhkjhmfacbkcbkffmkiagkdkalljlhfikjfjakkhfahkkmembmamgdbbkegllhakbahgmdecddihgeibjjallmcifcmcfajlfighbfaabilmllagekdccj...

output:

364230

result:

ok single line: '364230'

Test #20:

score: 5
Accepted
time: 904ms
memory: 135920kb

input:

4000 4000 500 500
dfbiihffdfdjehgkdmhjglagkmejkkjglggklgbiblldaildadbjfkkifkahhjmbbcljaeiagdjcldidkebcbljmjllbjhbghjmlieglfmdmdbghbkhbffiacefbdllbbcjdkkmmahfjgmhcmhgdamchadkamhhekgeffacligemkkldacllgebjbmbakedljmgiaeaamjackkaedejhdkmefhfejjgbbkilafhkfgceaahmaddkfdmimcahgdcckkaaldmfkggbbbgdagiicjgbjb...

output:

762279

result:

ok single line: '762279'