QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#607037#4120. 双旋转字符串3un_larryfunc95 948ms135960kbC++207.7kb2024-10-03 13:43:522024-10-03 13:43:52

Details

Tip: Click on the bar to expand more detailed information

Pretests


Final Tests

Test #1:

score: 5
Accepted
time: 20ms
memory: 130884kb

input:

100 100 100 100
baabcabbbccaabbcbbcacabcaaacacabacbccbaacbcbcaacccbbcbaabcccbabcbcaaaacabbaccccacaabcbbacacaacabcbcc
cbcbcaacacbccbaccabacbcbbcbabacabbbbbbabbcabcbcbcaabcbcccbabaccccabbabbbacbbacbcccaaacaccababcccbcac
bcacbbbbcbbaacabaccbcbccabbbbccaabcbbcaccbbcaaaabababbabbbacaaabaabaccbcaaccaabcbb...

output:

1620

result:

ok single line: '1620'

Test #2:

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

input:

100 100 100 100
cadaadaccbcdaddcabccbdbcbdbadaccdabbdbbcdaabcabdcddbdadabbdabbbdacccaadabcccdbdaadbcacdadbacccdccbda
adcdcdabaddbccdacaabadaabcbdccaaddabaddbcbbcbddcacbcbcbbaacbbbbaccbadddcdaccbaccdddbbdbdbbbcbaccccba
bdccaaddabaddbcbbcbddcacbcbcbbaacbbbbaccbadddcdaccbaccdddbbdbdbbbcbaccccbaadcdcdab...

output:

2028

result:

ok single line: '2028'

Test #3:

score: 5
Accepted
time: 109ms
memory: 131840kb

input:

500 500 500 500
acbdeceaeeaaaddabdccccadbddcaeaaddcddcedebdcdabdedbaedaadcbdabaddeeddecbeadbbaabebeaecadcbdcbbdeeabcadabbbeebcbdcaabababcbaaceddbcdcdededbdecdedaaddaabedbdecbedcdeacdbededebdabecaddecdcabedbedaecedabecaaaaecdceaaeeaabbaeadddccbeddbadddedabaebdcdadabeadedbabeeacbabbbbcdaaeddabceadddac...

output:

25201

result:

ok single line: '25201'

Test #4:

score: 5
Accepted
time: 109ms
memory: 131780kb

input:

500 500 500 500
dfcecccefcdccebfbccfbeccbafbcecebcedbceafeedeaefefafbaadeedbdcdbbcbccedcfbbfffeefeaaecffbdbfbcdadacdeedccffafadefbbafdcddcdbfefceddbfdbeefcaaeeceecdcdecaddcdfaeacecfeadcbfecadfdfbaaadcfaffceadfddaeafaffdefecedeeedfbdbfddffbcfacecedcafafefafcdbdccbcceadadaebafbacacbfcbabfdafbefcfdcfbc...

output:

27910

result:

ok single line: '27910'

Test #5:

score: 5
Accepted
time: 104ms
memory: 131772kb

input:

500 500 500 500
afgffgbcdadcbaacaddecbgddaeebcbddedcggdbfgbeefbdbgaadgfdccgddfccfedaafgdfddfacbadfeffcfbbbaeffgbcdffgdegafggggedebdceegdgeagebggfeefcagdaefebdaeaeefeedgfdagegcbgfgccgdbdfbegfeffdfdffcdfaeeegffedccgeeeabbgcfebggcbfedcedgggdbfaefeddgeafffdeddceedgfedgcdcagcdedgddabgdcgabdcfegdgbddacafe...

output:

31141

result:

ok single line: '31141'

Test #6:

score: 5
Accepted
time: 103ms
memory: 132012kb

input:

500 500 500 500
ddeccccbhdbehgddebagfdbchbfcdedaadbedfeedbbfcceabfhbdffegbabfeacbfebaagagfcdehhbhabdddgdhcabcbccgchdedheafdaggddfcgfefchcefdcedbhdahegabhcfbhacbedgggdchahghggbhfgaacbbgffabhdcbddahbfgeadfefffdhfhdfececeeghbedccfagdgfdaadhdhgfgfdfaddebbagaaabagaegbdagadfghhadbgdddcfdgaecfabfaadebghfff...

output:

35669

result:

ok single line: '35669'

Test #7:

score: 5
Accepted
time: 76ms
memory: 131320kb

input:

2000 2000 100 100
ibhdcgcdgcdhcbffbgdhcdheecfgabefeefafghfdgdcafabafhfibgdcbcbidgifiheibdahcichghfhidaagfaehgfifcacage
bigcihahghfdbcgbdbbaabdechaeeidhhdfiibbbcfdfbafciecigaeiadbibbbcihdffbabfadcgcgabaeabdfahbahdhaigdbg
hdgicebgfebicafcdfcghfibdeahehgfhdihadbfehfagfdaedbhdbhddfgeidaecfaeafbbhecgbcif...

output:

285548

result:

ok single line: '285548'

Test #8:

score: 5
Accepted
time: 66ms
memory: 131248kb

input:

2000 2000 100 100
hhabhfehdahfbhbbegaefgcaccfdgeedgededccchhehfhcdcdbaegdbhacagfhdhgchaadabdbacgbghbbabefeggbdeaahcdfh
gegcddbeagcbeecfeagbeadadchgcadefhghgcdcgegbggcaffhcchcgeaghaacedhchafdahaffcaegchbeegfgbafhgbefbchd
efeggbdeaahcdfhhhabhfehdahfbhbbegaefgcaccfdgeedgededccchhehfhcdcdbaegdbhacagfhdh...

output:

307156

result:

ok single line: '307156'

Test #9:

score: 5
Accepted
time: 77ms
memory: 133288kb

input:

2000 2000 100 100
egcaaeaeacgccgbiaacegdhiigfcafhccgghhiedghgeddcggddggiccbcbegbhehhfbfgfbgegeaieegbcbaeefachidcibfdgg
cbcbegbhehhfbfgfbgegeaieegbcbaeefachidcibfdggegcaaeaeacgccgbiaacegdhiigfcafhccgghhiedghgeddcggddggic
afcdfcghfibdeahehgfhdihadbfehfagfdaedbhdbhddfgeidaecfaeafbbhecgbcifafegihgacigca...

output:

333374

result:

ok single line: '333374'

Test #10:

score: 5
Accepted
time: 75ms
memory: 131620kb

input:

1000 1000 200 200
hcceehdafadhfgbfcbdgebeggcabbbdbddgdehegbegfeghhgdcfadddghdcfbafhfedegffddfbcedgcacagaagfcbcggfbefheceagadeahcdbcgcbfbdhcacbcbcfbeagfbfbaccbedhhgheggfeggdhhbbhbhbfbgfegccgfaehchchabeddbcgdegeefeheebgf
dhdfbdffbachbagfcdahaffcaegchbeegfgbafhgbefbchdgegcddbeagcbeecfeagbeadadchgcadefh...

output:

90223

result:

ok single line: '90223'

Test #11:

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

input:

1000 1000 200 200
egccbhhhcfcicdicefiaagdhdhddiicfifbhhbbbaedcggebecihibddgfibcahefcabbabbdhieihciehdhgeieeeaafbbgafcffecfdehghgaageifhaaghiebgifhacdfcchaefbeebeaaideehhhbbdcaiideadfbchddieceihbccihdaabgffbbgfhicegabgf
fbiigdffccafadbdgbhcefcdcffcabieigffbbdaiddbgdeccaacffghabfihfdebbaddegeheeaahefg...

output:

99374

result:

ok single line: '99374'

Test #12:

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

input:

1000 1000 200 200
ahcdfhhhabhfehdahfbhbbegaefgcaccfdgeedchfhdbfgcgfhcghfbgfgebabcebefbhhggdfagadababdaccbeahbhaafcbfgbbcdeechhafafhfhaeffebddfbafgbfhdfaabahgededccchhehfhcdcdbaegdbhacagfhdhgchaadabdbacgbghbbabefeggbdea
gbghchaeefffeaagccdbahedfgbbecfcecdhbgdadddbfaafbcfccfcfcebhfdfbfcedafhdhcheaccfg...

output:

111074

result:

ok single line: '111074'

Test #13:

score: 5
Accepted
time: 885ms
memory: 134280kb

input:

5000 5000 400 400
xuuffbrwhpevcoqrgrqwplkhjucfuwohzvphjbjyovdlnbfrkvbemwytfjynqmgzagbkwekkouxdcynkhtosfytlucentoilfuldvrxlonvkxzecxepkmzzgxluahmjyecsldjesdcpjikvpaudvkxgllisaambovjkdqrkdorjfnyghhhptzifawftzqgemnhpqyictmoyfpcvkcaodakjacqauzyowdzsfqhkplfbyzmnimdlxmjydaxyjnecxsjjbhiqnvocdenqmwilxxzoqfo...

output:

1248979

result:

ok single line: '1248979'

Test #14:

score: 5
Accepted
time: 849ms
memory: 135540kb

input:

4000 4000 500 500
ztoidukuhjzefczzzbfkqdpqzikfobucdhthxdjgkjelrlpaxamceroswitdptpcclifkeljytihrcqaybnefxnxvgzedyyhngycdqsoemuvnpppsuacbazuxmhecthlegrpunkdmbppweqtgjoparmowzdqyoxytjbbhawdydcprjbxphoohpkwqyuhrqzhnbnfuvqnqqlrzjpxiogvliexdzuzosrkrusvojbrzmwzpowkjilefraamdigpnpuuhgxpqnjwjmwaxxmnsnhhlqqrz...

output:

1067436

result:

ok single line: '1067436'

Test #15:

score: 0
Time Limit Exceeded

input:

2000 2000 1000 1000
vjjmpsvknhkwjopmmlebksucvzqlyqnwcmbvbhrmlowpjbwyvwtgtoqnmicxapzarknnxtuufarzrosdqwsmtcjghecqudosrtjxyaaykqrxycrxuwjxnpqjnbkcpdmokalxapemvbqlzsvxzkutappwgzpdpyzkzcvbntcvfxsxpjaoxtfhvxxytgokrcxaetauqgndmphwzyiayabjrqgeppxyjsttyzuvldvybsuxkbmfzvrtnovidznpghozvafmsnsnqivmvubcwtfsrqtm...

output:

307672

result:


Test #16:

score: 5
Accepted
time: 11ms
memory: 130968kb

input:

1000 1000 2000 2000
nonchigmtfbourzhmfffsrcbdzdfbeostfvskrebtljhzkrghtsgbbdhlsicutfmmjoutfvexdczschytbcrkliwcxkgoqvufyogvfrnymopfwpnfuzeihxyxansprggwdyafawqgqbtdgffcegtpcybqvrqusqsydymvpeibgxffnopfymrmqhucgomdiuxemxbzyslvlitwubnspbmewwhgpmprkcyfdxkmtuhevoixrwlmxwgcnoyzmmyovrtepqtibdvthmpoaqyddqrxnvk...

output:

83431

result:

ok single line: '83431'

Test #17:

score: 5
Accepted
time: 784ms
memory: 133880kb

input:

10000 10000 200 200
ckbgejbfcbfghfbmdildfkjjkmfkdllgmdcafmfgbifbdkjghcjmbmkemhhlfldgajdkcklmaalkdkdblmjmlhbmamcckhkgkldmiichlchefmbifgeklegmikdhcbamiafleaekfikhgddiheefigbhmjmhjkmmlfcaaeaejkegjccihhejibjgfddjbbggehdmchme
lhhflekijdhkfcmbfiffefdgicmibecjfmflmmcjjaehelkkjmhbhacclfkclmbbghghbkeajiceecj...

output:

4347415

result:

ok single line: '4347415'

Test #18:

score: 5
Accepted
time: 704ms
memory: 133916kb

input:

20000 20000 100 100
krnoipoiefcgxlvuywuecxwmlpllfrfygcaaqyqfhqhmhmdiujjivnwvgfnsaqmfkjymxiuqcaqlyuvvxysjgjdysnancrdsxihv
edjdgxyrnjdafsiaflodbsjcllikbkndeyxxjhqtfsblafbyvjporanrvxwbgxeefbmaspllqotgclnhfpgfqalmlpamjsdqcimi
lwixoqldswtmhmjxqedqkprngproxvfpeuagbsxexjegpqbgitobxmnsheqqrjatydimofugclqurc...

output:

15997802

result:

ok single line: '15997802'

Test #19:

score: 5
Accepted
time: 948ms
memory: 135960kb

input:

2000 2000 1000 1000
alfdkfiecifckggbjkfaddhkjfafbmifegkjceecggkecaeilfgmjclfllcdceiikeffmmaimkkafijfeeamklckfkglfglcffadcbbefkmbcbejhiciabblgcbellfcbacljieiiclamlehjdadedcmkhjjlbbiabjhkjhmfacbkcbkffmkiagkdkalljlhfikjfjakkhfahkkmembmamgdbbkegllhakbahgmdecddihgeibjjallmcifcmcfajlfighbfaabilmllagekdccj...

output:

364230

result:

ok single line: '364230'

Test #20:

score: 5
Accepted
time: 943ms
memory: 135892kb

input:

4000 4000 500 500
dfbiihffdfdjehgkdmhjglagkmejkkjglggklgbiblldaildadbjfkkifkahhjmbbcljaeiagdjcldidkebcbljmjllbjhbghjmlieglfmdmdbghbkhbffiacefbdllbbcjdkkmmahfjgmhcmhgdamchadkamhhekgeffacligemkkldacllgebjbmbakedljmgiaeaamjackkaedejhdkmefhfejjgbbkilafhkfgceaahmaddkfdmimcahgdcckkaaldmfkggbbbgdagiicjgbjb...

output:

762279

result:

ok single line: '762279'