QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#607043#4120. 双旋转字符串3un_larryfunc100 ✓366ms263832kbC++207.0kb2024-10-03 13:45:122024-10-03 13:45:12

Details

Tip: Click on the bar to expand more detailed information

Pretests


Final Tests

Test #1:

score: 5
Accepted
time: 35ms
memory: 253976kb

input:

100 100 100 100
baabcabbbccaabbcbbcacabcaaacacabacbccbaacbcbcaacccbbcbaabcccbabcbcaaaacabbaccccacaabcbbacacaacabcbcc
cbcbcaacacbccbaccabacbcbbcbabacabbbbbbabbcabcbcbcaabcbcccbabaccccabbabbbacbbacbcccaaacaccababcccbcac
bcacbbbbcbbaacabaccbcbccabbbbccaabcbbcaccbbcaaaabababbabbbacaaabaabaccbcaaccaabcbb...

output:

1620

result:

ok single line: '1620'

Test #2:

score: 5
Accepted
time: 35ms
memory: 254776kb

input:

100 100 100 100
cadaadaccbcdaddcabccbdbcbdbadaccdabbdbbcdaabcabdcddbdadabbdabbbdacccaadabcccdbdaadbcacdadbacccdccbda
adcdcdabaddbccdacaabadaabcbdccaaddabaddbcbbcbddcacbcbcbbaacbbbbaccbadddcdaccbaccdddbbdbdbbbcbaccccba
bdccaaddabaddbcbbcbddcacbcbcbbaacbbbbaccbadddcdaccbaccdddbbdbdbbbcbaccccbaadcdcdab...

output:

2028

result:

ok single line: '2028'

Test #3:

score: 5
Accepted
time: 71ms
memory: 255564kb

input:

500 500 500 500
acbdeceaeeaaaddabdccccadbddcaeaaddcddcedebdcdabdedbaedaadcbdabaddeeddecbeadbbaabebeaecadcbdcbbdeeabcadabbbeebcbdcaabababcbaaceddbcdcdededbdecdedaaddaabedbdecbedcdeacdbededebdabecaddecdcabedbedaecedabecaaaaecdceaaeeaabbaeadddccbeddbadddedabaebdcdadabeadedbabeeacbabbbbcdaaeddabceadddac...

output:

25201

result:

ok single line: '25201'

Test #4:

score: 5
Accepted
time: 59ms
memory: 255104kb

input:

500 500 500 500
dfcecccefcdccebfbccfbeccbafbcecebcedbceafeedeaefefafbaadeedbdcdbbcbccedcfbbfffeefeaaecffbdbfbcdadacdeedccffafadefbbafdcddcdbfefceddbfdbeefcaaeeceecdcdecaddcdfaeacecfeadcbfecadfdfbaaadcfaffceadfddaeafaffdefecedeeedfbdbfddffbcfacecedcafafefafcdbdccbcceadadaebafbacacbfcbabfdafbefcfdcfbc...

output:

27910

result:

ok single line: '27910'

Test #5:

score: 5
Accepted
time: 55ms
memory: 256732kb

input:

500 500 500 500
afgffgbcdadcbaacaddecbgddaeebcbddedcggdbfgbeefbdbgaadgfdccgddfccfedaafgdfddfacbadfeffcfbbbaeffgbcdffgdegafggggedebdceegdgeagebggfeefcagdaefebdaeaeefeedgfdagegcbgfgccgdbdfbegfeffdfdffcdfaeeegffedccgeeeabbgcfebggcbfedcedgggdbfaefeddgeafffdeddceedgfedgcdcagcdedgddabgdcgabdcfegdgbddacafe...

output:

31141

result:

ok single line: '31141'

Test #6:

score: 5
Accepted
time: 64ms
memory: 256400kb

input:

500 500 500 500
ddeccccbhdbehgddebagfdbchbfcdedaadbedfeedbbfcceabfhbdffegbabfeacbfebaagagfcdehhbhabdddgdhcabcbccgchdedheafdaggddfcgfefchcefdcedbhdahegabhcfbhacbedgggdchahghggbhfgaacbbgffabhdcbddahbfgeadfefffdhfhdfececeeghbedccfagdgfdaadhdhgfgfdfaddebbagaaabagaegbdagadfghhadbgdddcfdgaecfabfaadebghfff...

output:

35669

result:

ok single line: '35669'

Test #7:

score: 5
Accepted
time: 60ms
memory: 255192kb

input:

2000 2000 100 100
ibhdcgcdgcdhcbffbgdhcdheecfgabefeefafghfdgdcafabafhfibgdcbcbidgifiheibdahcichghfhidaagfaehgfifcacage
bigcihahghfdbcgbdbbaabdechaeeidhhdfiibbbcfdfbafciecigaeiadbibbbcihdffbabfadcgcgabaeabdfahbahdhaigdbg
hdgicebgfebicafcdfcghfibdeahehgfhdihadbfehfagfdaedbhdbhddfgeidaecfaeafbbhecgbcif...

output:

285548

result:

ok single line: '285548'

Test #8:

score: 5
Accepted
time: 39ms
memory: 256288kb

input:

2000 2000 100 100
hhabhfehdahfbhbbegaefgcaccfdgeedgededccchhehfhcdcdbaegdbhacagfhdhgchaadabdbacgbghbbabefeggbdeaahcdfh
gegcddbeagcbeecfeagbeadadchgcadefhghgcdcgegbggcaffhcchcgeaghaacedhchafdahaffcaegchbeegfgbafhgbefbchd
efeggbdeaahcdfhhhabhfehdahfbhbbegaefgcaccfdgeedgededccchhehfhcdcdbaegdbhacagfhdh...

output:

307156

result:

ok single line: '307156'

Test #9:

score: 5
Accepted
time: 50ms
memory: 255368kb

input:

2000 2000 100 100
egcaaeaeacgccgbiaacegdhiigfcafhccgghhiedghgeddcggddggiccbcbegbhehhfbfgfbgegeaieegbcbaeefachidcibfdgg
cbcbegbhehhfbfgfbgegeaieegbcbaeefachidcibfdggegcaaeaeacgccgbiaacegdhiigfcafhccgghhiedghgeddcggddggic
afcdfcghfibdeahehgfhdihadbfehfagfdaedbhdbhddfgeidaecfaeafbbhecgbcifafegihgacigca...

output:

333374

result:

ok single line: '333374'

Test #10:

score: 5
Accepted
time: 52ms
memory: 255088kb

input:

1000 1000 200 200
hcceehdafadhfgbfcbdgebeggcabbbdbddgdehegbegfeghhgdcfadddghdcfbafhfedegffddfbcedgcacagaagfcbcggfbefheceagadeahcdbcgcbfbdhcacbcbcfbeagfbfbaccbedhhgheggfeggdhhbbhbhbfbgfegccgfaehchchabeddbcgdegeefeheebgf
dhdfbdffbachbagfcdahaffcaegchbeegfgbafhgbefbchdgegcddbeagcbeecfeagbeadadchgcadefh...

output:

90223

result:

ok single line: '90223'

Test #11:

score: 5
Accepted
time: 53ms
memory: 255472kb

input:

1000 1000 200 200
egccbhhhcfcicdicefiaagdhdhddiicfifbhhbbbaedcggebecihibddgfibcahefcabbabbdhieihciehdhgeieeeaafbbgafcffecfdehghgaageifhaaghiebgifhacdfcchaefbeebeaaideehhhbbdcaiideadfbchddieceihbccihdaabgffbbgfhicegabgf
fbiigdffccafadbdgbhcefcdcffcabieigffbbdaiddbgdeccaacffghabfihfdebbaddegeheeaahefg...

output:

99374

result:

ok single line: '99374'

Test #12:

score: 5
Accepted
time: 61ms
memory: 255976kb

input:

1000 1000 200 200
ahcdfhhhabhfehdahfbhbbegaefgcaccfdgeedchfhdbfgcgfhcghfbgfgebabcebefbhhggdfagadababdaccbeahbhaafcbfgbbcdeechhafafhfhaeffebddfbafgbfhdfaabahgededccchhehfhcdcdbaegdbhacagfhdhgchaadabdbacgbghbbabefeggbdea
gbghchaeefffeaagccdbahedfgbbecfcecdhbgdadddbfaafbcfccfcfcebhfdfbfcedafhdhcheaccfg...

output:

111074

result:

ok single line: '111074'

Test #13:

score: 5
Accepted
time: 304ms
memory: 259740kb

input:

5000 5000 400 400
xuuffbrwhpevcoqrgrqwplkhjucfuwohzvphjbjyovdlnbfrkvbemwytfjynqmgzagbkwekkouxdcynkhtosfytlucentoilfuldvrxlonvkxzecxepkmzzgxluahmjyecsldjesdcpjikvpaudvkxgllisaambovjkdqrkdorjfnyghhhptzifawftzqgemnhpqyictmoyfpcvkcaodakjacqauzyowdzsfqhkplfbyzmnimdlxmjydaxyjnecxsjjbhiqnvocdenqmwilxxzoqfo...

output:

1248979

result:

ok single line: '1248979'

Test #14:

score: 5
Accepted
time: 272ms
memory: 262700kb

input:

4000 4000 500 500
ztoidukuhjzefczzzbfkqdpqzikfobucdhthxdjgkjelrlpaxamceroswitdptpcclifkeljytihrcqaybnefxnxvgzedyyhngycdqsoemuvnpppsuacbazuxmhecthlegrpunkdmbppweqtgjoparmowzdqyoxytjbbhawdydcprjbxphoohpkwqyuhrqzhnbnfuvqnqqlrzjpxiogvliexdzuzosrkrusvojbrzmwzpowkjilefraamdigpnpuuhgxpqnjwjmwaxxmnsnhhlqqrz...

output:

1067436

result:

ok single line: '1067436'

Test #15:

score: 5
Accepted
time: 289ms
memory: 263832kb

input:

2000 2000 1000 1000
vjjmpsvknhkwjopmmlebksucvzqlyqnwcmbvbhrmlowpjbwyvwtgtoqnmicxapzarknnxtuufarzrosdqwsmtcjghecqudosrtjxyaaykqrxycrxuwjxnpqjnbkcpdmokalxapemvbqlzsvxzkutappwgzpdpyzkzcvbntcvfxsxpjaoxtfhvxxytgokrcxaetauqgndmphwzyiayabjrqgeppxyjsttyzuvldvybsuxkbmfzvrtnovidznpghozvafmsnsnqivmvubcwtfsrqtm...

output:

307672

result:

ok single line: '307672'

Test #16:

score: 5
Accepted
time: 366ms
memory: 263208kb

input:

1000 1000 2000 2000
nonchigmtfbourzhmfffsrcbdzdfbeostfvskrebtljhzkrghtsgbbdhlsicutfmmjoutfvexdczschytbcrkliwcxkgoqvufyogvfrnymopfwpnfuzeihxyxansprggwdyafawqgqbtdgffcegtpcybqvrqusqsydymvpeibgxffnopfymrmqhucgomdiuxemxbzyslvlitwubnspbmewwhgpmprkcyfdxkmtuhevoixrwlmxwgcnoyzmmyovrtepqtibdvthmpoaqyddqrxnvk...

output:

83431

result:

ok single line: '83431'

Test #17:

score: 5
Accepted
time: 246ms
memory: 259044kb

input:

10000 10000 200 200
ckbgejbfcbfghfbmdildfkjjkmfkdllgmdcafmfgbifbdkjghcjmbmkemhhlfldgajdkcklmaalkdkdblmjmlhbmamcckhkgkldmiichlchefmbifgeklegmikdhcbamiafleaekfikhgddiheefigbhmjmhjkmmlfcaaeaejkegjccihhejibjgfddjbbggehdmchme
lhhflekijdhkfcmbfiffefdgicmibecjfmflmmcjjaehelkkjmhbhacclfkclmbbghghbkeajiceecj...

output:

4347415

result:

ok single line: '4347415'

Test #18:

score: 5
Accepted
time: 219ms
memory: 261084kb

input:

20000 20000 100 100
krnoipoiefcgxlvuywuecxwmlpllfrfygcaaqyqfhqhmhmdiujjivnwvgfnsaqmfkjymxiuqcaqlyuvvxysjgjdysnancrdsxihv
edjdgxyrnjdafsiaflodbsjcllikbkndeyxxjhqtfsblafbyvjporanrvxwbgxeefbmaspllqotgclnhfpgfqalmlpamjsdqcimi
lwixoqldswtmhmjxqedqkprngproxvfpeuagbsxexjegpqbgitobxmnsheqqrjatydimofugclqurc...

output:

15997802

result:

ok single line: '15997802'

Test #19:

score: 5
Accepted
time: 270ms
memory: 263672kb

input:

2000 2000 1000 1000
alfdkfiecifckggbjkfaddhkjfafbmifegkjceecggkecaeilfgmjclfllcdceiikeffmmaimkkafijfeeamklckfkglfglcffadcbbefkmbcbejhiciabblgcbellfcbacljieiiclamlehjdadedcmkhjjlbbiabjhkjhmfacbkcbkffmkiagkdkalljlhfikjfjakkhfahkkmembmamgdbbkegllhakbahgmdecddihgeibjjallmcifcmcfajlfighbfaabilmllagekdccj...

output:

364230

result:

ok single line: '364230'

Test #20:

score: 5
Accepted
time: 275ms
memory: 263632kb

input:

4000 4000 500 500
dfbiihffdfdjehgkdmhjglagkmejkkjglggklgbiblldaildadbjfkkifkahhjmbbcljaeiagdjcldidkebcbljmjllbjhbghjmlieglfmdmdbghbkhbffiacefbdllbbcjdkkmmahfjgmhcmhgdamchadkamhhekgeffacligemkkldacllgebjbmbakedljmgiaeaamjackkaedejhdkmefhfejjgbbkilafhkfgceaahmaddkfdmimcahgdcckkaaldmfkggbbbgdagiicjgbjb...

output:

762279

result:

ok single line: '762279'