QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#649576 | #6562. First Last | ucup-team425 | AC ✓ | 1ms | 3868kb | C++14 | 2.0kb | 2024-10-18 02:36:32 | 2024-10-18 02:36:32 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3456kb
input:
3 attic climb alpha
output:
2
result:
ok single line: '2'
Test #2:
score: 0
Accepted
time: 1ms
memory: 3556kb
input:
22 agora alpha antic aorta apnea arena aroma attic basic blurb china circa civic climb cobra cocoa comic comma conic crumb cubic cynic
output:
6
result:
ok single line: '6'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3512kb
input:
3 ccabaabbba acbbbacccb ccccccacba
output:
1
result:
ok single line: '1'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3568kb
input:
11 mraa myga vtwm mala vvgm atvv vusm mznv avea atfv amgv
output:
7
result:
ok single line: '7'
Test #5:
score: 0
Accepted
time: 1ms
memory: 3792kb
input:
1000 vznwivhoprv pvzcjyruxv phykv vozinczup vbp vgjxfotuhzhobfp pbv vygphslv vpnqrfep vzrphpfggoqcgv vgdjmzuckyedpnp vatmaxfp ppnmmwtqmv paawwp pspoycv vcjthv ppcvagp pteiqdonkklp vav vcsxv priqwbalidav vinp phqeijnqkgbxv pwvmbivmgvouv vwzhndzmqpcwkmp pyzlv vtvblfov vrdv vzrfmjdnaruwp pfup pwzv vwyv...
output:
478
result:
ok single line: '478'
Test #6:
score: 0
Accepted
time: 1ms
memory: 3664kb
input:
1000 rlp pgscawiivpjndlp pxr ruzutr pqdhfniemqvvr rvar rp prarwp pkuinxempbmear rupxuanwlvawmr pp rzfvr rcsxoyirp pgpilljr pogeizvqlr rajolbgzswur rcap ryzqymwr rrpp rbxtr rfldblbesyhqr rjidcekyrir pqrycftr rftwgmmakykkmep pehkxkayuip pguxsgtuikvp rtxmynvoolrp pzmsljlpcr phcfdr plaop rydojaccp pzfr ...
output:
246
result:
ok single line: '246'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
1000 ffn fgikjn fwtakdbjn fsjnfzzn feqmuasubirsf faypin fcsdhfjvncfzsn nbcmvxemkan ngoqtaaon nlovkxxrbn fhdqkltoxvif fxpnqbguftsrhff fyniukvsmlf fibwbqckjpojglf nwcvf fxgeivnakggcn nn fkghlusecf neuwdafrkzptwf fcxn ff nlkxtn fdlsijtpbcjjcbn frlcjjnpsn ntyabhf nvf fdlmlhebidazhn fjn fstxgnmfof fqhusf...
output:
496
result:
ok single line: '496'
Test #8:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
15 adb bdc cda aeb bec cea afb bfc cfa agb bgc cga ahb bhc cha
output:
15
result:
ok single line: '15'
Test #9:
score: 0
Accepted
time: 0ms
memory: 3660kb
input:
1 alpha
output:
1
result:
ok single line: '1'
Test #10:
score: 0
Accepted
time: 0ms
memory: 3592kb
input:
3 alpha beta gamma
output:
1
result:
ok single line: '1'
Test #11:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
2 alpha beta
output:
1
result:
ok single line: '1'
Test #12:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
20 ccbccaabaa aaccbbbbab bcbcbccabc bbbabcbbcc ccaaccabca acabbbccab baacbcbccc bcbbabbbbc bccbbbbabc bacaccbcac cbbabbbaca ccaaacbaaa acbbbaccab bcaacaaacc aabbaabcbb bbbabbbbcc aabcaaabcb aabbbaaacb acacaababb abacccccbb
output:
8
result:
ok single line: '8'
Test #13:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
20 acccccbcbb bccbccaaac aabbcbbccb ababcabccb abcaabbcab ccabbabcca bbccaaacbc bbabacbccc babacbaacc bcabaacbac acbabaabbb caaccbacaa bccccbcbcc abbbbbbcbb bbcbaabaac abccaabccb cacacaccca bcbbcbcacc bcccaabcbc cabaaaccca
output:
9
result:
ok single line: '9'
Test #14:
score: 0
Accepted
time: 0ms
memory: 3864kb
input:
20 bcbbbababc baccababbc bcccbaacbc ccccacbaca aaaaccabbb cbbbacbaaa aaabbaabcb aacccbbacb bcbccbcacc caabacbcba bcbcbbcbbc cacccabcaa abbababacb aacaabbccb abbcacaccb caaccaacca bcbacacaac baccbcccbc abbcaccabb acbacccccb
output:
13
result:
ok single line: '13'
Test #15:
score: 0
Accepted
time: 0ms
memory: 3572kb
input:
20 babccbbbbc accacaabcb acacabaabb bacbccacac cacacaacaa cacaaaaaca bccbccacac acbaccabbb ccbacaccba acbaaababb ccacabcaaa bbabbcabcc bacbccccac bcacaacacc ccabcbbbaa aaababbbab bbbbbabbac abbcaabbbb bababbabac aaabcbbacb
output:
12
result:
ok single line: '12'
Test #16:
score: 0
Accepted
time: 0ms
memory: 3564kb
input:
20 aacbaacccb cbcbcacaaa cacbacbaca aabacccacb bbbcbacbcc cababcacaa bbcaaacbbc ccccacaaca cabcbcccaa bbcbccabbc ccababccca aaacbaabbb baacabacbc accbbcbbab cccbccabba cbccaaaaca cbcabaccca caaacbccca acaaabccab bbbaaabbac
output:
10
result:
ok single line: '10'
Test #17:
score: 0
Accepted
time: 0ms
memory: 3560kb
input:
20 aaacaacbcb cccccccaca abbabbcacb accaacbabb bacbaccbac cbcbbcccba bacbcabcac abaabcabab acaaacaaab bacbbaccac baababbbbc caaaaabaca abacaccacb abbbcbccbb cbcbcbbcaa cabbcaabba cbccbaccaa ccbbcabbaa ababababcb abcbcbcabb
output:
9
result:
ok single line: '9'
Test #18:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
20 bcaccbabbc caaaaccaca acbaacabab aaabbabbcb ccccaccaca bcacbaacbc cbccacabca ccbabbaaaa ababcbaaab caabacabca bbbcaabcac cccccababa aabbabcccb abaaaccbbb bcabaabbcc bcbbbaacac acaacbbccb bacabbabcc bbcbccbbac aacbabccbb
output:
7
result:
ok single line: '7'
Test #19:
score: 0
Accepted
time: 0ms
memory: 3832kb
input:
20 cbacccbaba caccbccaba abcaccacab cbcccabaca acccbccacb bccacbbabc bbacabacac abbcccbbab acaaaabbcb cbbbaabaca babbbccacc bbabccbcbc cabaababaa caacbabcba aaaaaacccb ccaaacacaa baccaabcac aaaacbcbab baacaaaabc ccabcacaba
output:
8
result:
ok single line: '8'
Test #20:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
20 bbaccaccbc cabcccabba bcabbbbaac caaacccaca cabccbabaa abccaaacab ababbccabb acccaaabab bababbcacc acabbacacb accccbcaab cabaaccbca cccacbbcca acabbaccab baacccacbc bacacabbcc aabaaaacab cbbabcccba aaaacbaccb cccbaaaaca
output:
12
result:
ok single line: '12'
Test #21:
score: 0
Accepted
time: 0ms
memory: 3516kb
input:
20 aabacacacb abaccaccbb acaccccbcb cbacbcccca cccccabbaa bbbcbabccc cabbccccba babcbcabac baccbaacbc ccbbccbbba aacaabbbab bccaccacac abbcacaccb cbcaabacba babbcbaacc ccabbbbbaa cbcbbbaaba bcaabcbaac bcbbbcbbbc babccbbbac
output:
13
result:
ok single line: '13'
Test #22:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
17 hydrogen nitrogen helium neon magnesium niobium molybdenum newdymnium holmium hafnium neptunium mendelevium nobelium hassium meitnerium nihonium moscovium
output:
6
result:
ok single line: '6'
Test #23:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
10 cbabbbcabb bacbacbcba bcacacacba bbabbbbbac acaccccbac bbbbababca bacabccaac aacbcaabcb bacbabaaaa acabcabccb
output:
3
result:
ok single line: '3'
Test #24:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
100 ccbcaccbab bbcbcbbbca acbbbbbcbb bacabcbcba aaaabcbaac babaaabbba bbbabbbabc bccaaacbac acacaccbaa acbacbcaac baccabcccb bbabcccbca acbabaaaac bcbbcabacc ccbbacbcbc aaaabcbcaa aacbbbaaaa bbabbcacac baabacbbcc abaccbabab abcbbabacb cbbbaccbcb bbabbcabca bcbaacacaa aabccaacca bcabaaacca acbcbacbbc...
output:
32
result:
ok single line: '32'
Test #25:
score: 0
Accepted
time: 1ms
memory: 3868kb
input:
1000 pfalakkgegzhogw wkkuxghywruwxfe wyejymxprfudmww pzfhykyprexdzjp euglzawfswzsicw wukfsntcitmqqsp ptedktsjhdybegp woiewjinnixhftw pwysrvatyqcgxcp pyslupqwmpqluzw ezwtyuflrtgjdle pyecuqzysscnqvp pualunhhvihcohe eemgrxaolvkxmup egvaujnrfthojvw ekfhcvufcqcrhcw ecqzrgboomfjcve whxlumclfpgcanw pfoxyrw...
output:
225
result:
ok single line: '225'
Test #26:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
30 rfiuianksyzpkqz zkntbrwccnjcnzh hvyhatniqoeptvh zzwxgtvocagvdlz hkvtotqsilzpexr rmqjlxhiyuvtwrh ziynrswzgzpnfnz rntoducfmkqpaoz rgzweicxeqajpzr zjznfxgpfgshkbr rmtmhwrzkenopsz hyodaehasivoabz hkgxlvuxonzlvgr hcjelcmekbohgxr zkdlkppyvchvimh rehlcscmhbnjexr rhhhexryikreroz htuwcazhktbrvqr hvnicynkr...
output:
11
result:
ok single line: '11'
Test #27:
score: 0
Accepted
time: 1ms
memory: 3868kb
input:
300 bzpjihkgvkrwzav bssiintigbaccyv asuzprjzymuwkfv blajmgohbmihtwb bwocwcqekqwuwab azkbjbrjdnwgzhb aqdgacdlcofzjzb vvqgvpdtsphhqbb vafommzgswakrub bizlmhzwvokxezb btwrjkdkxiaciaa bgyfvakbcgcaima vtkthaktjltsvtv vmyxovrkpphmnna bgwhfiinpdjigza vaghbpbabwfsnub atztqndgqetgbzv agtepkzcnnrlfzb ayktyzbv...
output:
196
result:
ok single line: '196'
Test #28:
score: 0
Accepted
time: 0ms
memory: 3568kb
input:
1000 drucrd dwbdnwzffwd dkcoffhuvxgzd dtd dbud dhdjamctkfkufpd dpolagked dqpyleydrcbjd diunguld dbpxmzd dd dllmgjsd dnncoucapnojd dbydsqd did dgjd dmd dkzkjmdkd derbbcjvtgxbgd dbpznlrtud dxrdhad dqhyxdd dgqd dawzjid domzfuycd dlyed dkunoduhamd dlpwoaqgjuwazd dcd dxnvgrvxnd drxptrhxd duqwvybjgahd djh...
output:
0
result:
ok single line: '0'
Test #29:
score: 0
Accepted
time: 0ms
memory: 3516kb
input:
18 aab bac caa abb bbc cba acb bcc cca adb bdc cda aeb bec cea afb bfc cfa
output:
0
result:
ok single line: '0'
Test #30:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
1000 qqaligwjiggjcq iagxuiizhglmi xuikcxsrirevfi qgcyddrpx iriauckx xaq iczi xqhfnkhgx ihjmwpzmaplimcq qxhadplhx qylxcygq xi xansoq injixpfhfasvbq qiwgbci xjgmxhtxvdq iihmigcihi iedrdwzgq iyi xhqlttzyni qcx irbnlx qmcxdihujwlai iqaq qyhquti qcqzoifzglwxzdq ikjajeafi ifgydi xembxgcluzqq qyesjwiix qkx...
output:
242
result:
ok single line: '242'
Test #31:
score: 0
Accepted
time: 1ms
memory: 3560kb
input:
100 yhothsuntodvjbp yovbflgbufdystp plxhiphtvtvccxn yteszfwnocvquep yimksvuvxrmquyn yzxolkjfnwdwcop yvnzximnjfteqap padrxvamipryowy pxgkjkpddfbrarn ykqtkdxxwzknrvp pxewmovejzktyzn pnnjanibbinhwzn ylzdwvrozhyyyen yfyfqvvuycfaxpp nechefkhfvumkry yvtzpokomrtusyn pwpbgmtkpcnhmtn niyymfgohdgdhuy yedcxgnr...
output:
67
result:
ok single line: '67'
Test #32:
score: 0
Accepted
time: 0ms
memory: 3560kb
input:
1000 yaswiedrkfymnzk kzcaleacmpuazhv kfefxdppxusoqxv vifosydgwnqpssk ymtrrddmufmncfv vrupdvcsmepqtwk vjuvfllbidvbcqy veldskdioyyzock kdmjepctwkiixrv ypicbokwooycocv ybbsmccvqynbvwk yzgsbzbhteyajfk yyynqadclcjkcvv kmwrrremazrcdyv yfuauavqsoxnknv yizrfjukexccyvk yuodugxjnuymgwv vvdbmcmdcejdjhk vsesegg...
output:
360
result:
ok single line: '360'
Test #33:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
30 nduqkltyrjchrir npqnyjhvtczrxhk rvkhqwigvnjasln nqxnnyxpmhbzhrr kcrjplhrdkyyvpn nuxuodpvfvyovsk nzcbwoxvmuajnuk rcrqzqtykuzgiek rvzjffzzwapzvck rgntauijiodjcwn nqntaykdmrpiojr kmbynsfeerniqpr rszawhpanrairqk nhjsfdswnnaqumr kijysjjlrbwigin njebshbbcadcbwk ncwluvybyxhbuvr rlxuzfjuxgziehk rcbtttxlq...
output:
11
result:
ok single line: '11'
Test #34:
score: 0
Accepted
time: 0ms
memory: 3664kb
input:
300 ldqparrlixcrfhn lslzwfkysvvvaqt lklydecymfdsymn nxxolcshfdiofxt lkwqujbckqmigin nfqvomhsapqexsl njnqzhjetlnecwt twgomlfjreikycl lujnrxtaognjjbn lciyasqkkkcgrln ncwhdddgamnbgft naprkvnqkxqjdjl ttltucizicrybgl trdnzylpxeujmql nmyusbfdjyaoaft lsdwoewrtnrxhkn nfapnyvwftbnwyl lvahwwkijbffrxn tzmuasjd...
output:
107
result:
ok single line: '107'