QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#128769#801. 回文自动机william555#100 ✓15ms117792kbC++14851b2023-07-21 15:41:152023-07-21 15:57:11

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-21 15:57:11]
  • 评测
  • 测评结果:100
  • 用时:15ms
  • 内存:117792kb
  • [2023-07-21 15:41:15]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
const int N=1e6+5;
int n;
char s[N];
struct PAM{
    int lst,tot=1;
    int len[N],fa[N],ch[N][26],cnt[N];
    int getfail(int i,int p){
        while(s[i-len[p]-1]!=s[i])p=fa[p];
        return p;
    }
    void insert(int i,int c){
        int p=getfail(i,lst);
        if(ch[p][c]){lst=ch[p][c];return;}
        int np=++tot;
        fa[np]=ch[getfail(i,fa[p])][c];
        ch[p][c]=np;len[np]=len[p]+2;lst=np;
    }
    void build(int n,char *s){
        len[1]=-1,fa[0]=1,lst;
        for(int i=1;i<=n;i++)insert(i,s[i]-'a'),cnt[lst]++;
        long long ans=0;
        for(int i=tot;i>=1;i--)cnt[fa[i]]+=cnt[i],ans=max(ans,1ll*cnt[i]*len[i]*len[i]);
        cout<<ans<<endl;
    }
}pam;
int main(){
    scanf("%s",s+1),n=strlen(s+1);
    pam.build(n,s);
    return 0;
}

详细

Subtask #1:

score: 35
Accepted

Test #1:

score: 35
Accepted
time: 1ms
memory: 7564kb

input:

bdgedcfadbabbfgeacdgbggaefddebabbfgeacdgbefaecfddffeddacbabfcgecedacbffeddacbabfebadggfafabcdfdeaabdeecgbcecegcgecedacbfgdagbgagafdegecadfebcdbgfacdecdegecadfebbcdfdeaabdbfgcbccfcaebcecfdfccagdafaeaacbggaefddebcbecdafageeaabcbdafadcbecdbcgcbdgedcfadbcaefbdfcbgfcdeceddaaffgcedfcdcgdcgbfdddfdadgagbbef...

output:

5594

result:

ok answer is '5594'

Test #2:

score: 0
Accepted
time: 3ms
memory: 9884kb

input:

bdgfcbabegfbbbgecfbddbaceaefbebgeafdbbgaebebdabgebabacccebbaebeafbefaabdgfcbabegdbaceaefbegcaegagcdgcacccfbbfgffgcdgbccgecbdbcagbbcacccfbbfgeegfcaecbcebebdabgebbbebbgcfafbbbgbdbabgbabfgdfaggfbcbabeebbdaagacgbafecebfccdbgfacgcabefaaedadeacgdeegfcaecbcabacccebbacdbbdceeegcdbbdceeegbaccaecfbgbbebbgcfaf...

output:

7308

result:

ok answer is '7308'

Test #3:

score: 0
Accepted
time: 3ms
memory: 9772kb

input:

baeedcbgaeaabdcaeeagbeffgedegdfcggaeafeegccecbacaaaabdcaeeaggedcbbaebfbcbbbebeaeagedddgabgccdecfeegcababaddfcabcbbbebeaegabeddeedaaabebgcafgeefgeabcaafgcbcfaafgadddgdbccbcddfacfcgdeefgeabcaagbgbgdbefdcefcacafcagcfadegebcababaddfcaffbfgdfecefgafcfgddbagfgceabefcaaebagddabcbbbebeaedaddaacgfcabeffgfgeg...

output:

6011

result:

ok answer is '6011'

Test #4:

score: 0
Accepted
time: 2ms
memory: 9632kb

input:

fadabcedabffccgceafdfgebfgebdfffccgceafdfbabeebbccbcebdaabagbdcabbebbgbbdddddcfdfefcfgcaedcdfbfcgagggeacabgddfdggddgcgagfefgeafdaefefgeafdaefbabeebbccabccadccgcbbdddddcfdfadabcedabgbdegbcgdecfcefaedcffadabcedabadgbbacdfbfecccfacaaggggffddffffbcgacfgbcbeadagbfffefcfgcaedgeacabgddfgbcccdcgegbdcabbebbg...

output:

5874

result:

ok answer is '5874'

Test #5:

score: 0
Accepted
time: 0ms
memory: 9880kb

input:

efggbbfcabcdfbceagadfagaeegbegcbfbcfcgfbgdfffcdeagfcggffcacbbadedceffedbgafcbegdggabccbcecfcbfegdcbecdedfdeebebecffcaafgffabgbgedfcdabgbeffaagbffcdccaddcadgbbcadedgcfbgbdefggbbfcabddccdefedagebfbbfadfagagedffaagabcgbcffaggfebdbefdcfecegaeggggdacedbgfcdedfdeebececbfefeegdebddaeafbffabgbgedfcfcdgcaacc...

output:

5751

result:

ok answer is '5751'

Test #6:

score: 0
Accepted
time: 2ms
memory: 7872kb

input:

eafdccagcbcaeebabcggdgdfcdfgeacbgcdfbgcabdegdbbaabgecbaaagffecffedeffcedcdgcecbgfedbdgabfdcbefcecdfdfaegccbfeefdccgfbfebecffedeffcbdegdbbaabeafcbegcbagecbaaagffefcdafgageffefbcceecdffabcbbdbefcdafgageedcdgcecbgcaeebabcggfbeegdaccfdffabcbbdbcbefcecdfdcdccfcbadcecffedeffcdcgaagfaegddecgffafcdgdfcdfgea...

output:

6156

result:

ok answer is '6156'

Test #7:

score: 0
Accepted
time: 1ms
memory: 9612kb

input:

aecedcggbddbeeadcfbcaebcdceeegbcbaegcecbfefbbgbcfgegbdaggeebdfebbaeddgffdgfedegbaecedcggbdbbddadfageebfadbbegbaaaffddbdacdgbgbdggfgebaaebcfceefgaedacdeeecaccecgdcbafafccffdaedbbegagecfcdbbacceafeaabbefccgbgceeabcbaegcecbdfgacggffbdcbafafccfbfccfbgggadddddacbfeeebgdaddagcdgbgbdggffdaedbbegabcbaegcecb...

output:

5662

result:

ok answer is '5662'

Test #8:

score: 0
Accepted
time: 2ms
memory: 9568kb

input:

aaffagaebeecbgagbccbafgceadgeebdgffeceacbgcbebggfdbgcbebggfdadgceeggefaaffagaebeegfafdeeecaaffagaebebgaabbebcaaaaceagaabcabddacfebbfbefagdbcdaggeggcfagdgfddegcabcddaefcdcaaaceagaabecbgagbccbaaffagaebegbagabfddcbdgffeceacccafcbcdcagcebbbgfggbfbefagdbcgddcdaadafgcebbbgfggccafcbcdcaafgceadgeebfbgbbddeb...

output:

6006

result:

ok answer is '6006'

Test #9:

score: 0
Accepted
time: 2ms
memory: 7620kb

input:

bfbbfccggagbeddgdcbdfecaedcedefgfeaabdcaebabegdgdebbddaefebgcefgfcagdbgccacgdbcdadbeafcedeffbeccebabacedebabagadfgbdcaeaadbacgdfbgabgdbafeadgbfbecfccbfgeecabgfafacefbgbcebbddaefebgadbacgdfbgdagefcefgeddgagggedefgafgdbgacffbeccebabgbeebbdafegbeddgdcbdcefgfcagdbacafdggbacccebfdcddgadbeafcedecefgfcagdb...

output:

5966

result:

ok answer is '5966'

Test #10:

score: 0
Accepted
time: 2ms
memory: 7624kb

input:

gbegegfcdbbdagefbgadbfafadedacdbbffcbagfcgebcbbeabedbedegbdbebfcbcbffddeadadffffadccgfebbadbdcdfecbadbfbfeaefadfdgfeaebfcbgdbfbcfebdagefbgadedgaeecegbeaffcddaggcafcddaffccafcddaffcgfdegffaaeggadabffaddbaebcffcadbaebcffcabfafadedacdabgaccfdedbfbfeaefadeadadffffeaffeffaffdbbffcbagfcbbaebfbfgebfcbcbffd...

output:

5997

result:

ok answer is '5997'

Test #11:

score: 0
Accepted
time: 2ms
memory: 9604kb

input:

cihgfkaabfcjeehlggeihjadhfkjdfegfiibdidefcdehjgkkhjfldaeelddklklgjdkbeidjahlkjligjdhjffddfljlbejibdgllkddjcccddajbkfjkfkecegichgklaeccfcgjidfkgckhafjeabajihcchghkchjfjkkbeeajcghaillghbcidglkcldfkkkegjdgcjfecjbaekhcadlfefcgagjdgebkgafagdeijfkgcebkkefbblkdlajccehgiidfahkfblfjafgikaacjfddalheeelcjifafk...

output:

3028

result:

ok answer is '3028'

Test #12:

score: 0
Accepted
time: 2ms
memory: 7756kb

input:

xbqpbhaecvtkxghbvkmwarwpsrjwhgqnojrdskecifmlbcbctlolyjdswhhclojnnfcynqqfvcchkuehqxgbuaqsnwotkfskrnmkwoonkhcvwwmplrxlfjvaepipcegcekikifaxpqclhwmstfifhnawojfngbphtfftcewckdeseoxnfwdtymodyqlewkbcjwtyufrevupfapglxllumkvspbebirrytpcmodoncourbanwyylnwugxujjtdwgyjipayvmgucnqnrpwqplwpdsocasjykituacpagydmymp...

output:

1481

result:

ok answer is '1481'

Test #13:

score: 0
Accepted
time: 1ms
memory: 7752kb

input:

tobdfhlrhrypwivkkpiugptzudfkxlxkprusxvwlhwqinpfwdxelgpgrfkmkjfoovtwrinkdpehykvkksgswkikxbowttkqdpkvevjbrigecweqaehejnugxnukpqcueewuazbzfbijnvrqlimbipyeyxhszbdqeduibykofvyqbhgxecowsrrqzpboxzafxinkqtxgcavjiezzjoqweqtupcxgjtxgxxzanmwamwhpzyxqxgouhgnkvqglgunyqnawrwlqpxhtdscimoedcwpuwbqhiygbfoshwjkvquisd...

output:

1437

result:

ok answer is '1437'

Test #14:

score: 0
Accepted
time: 1ms
memory: 7752kb

input:

epkkjklkmnmgajmqaqfdepfdlhockegkcpekmdmfaphqmqpqopjhngpblcephamlqmekfnqjoknnkmbodonbfkmobeddbmplkallmeqipgdimpiqfeficqknaeapllechkpdamdpeoanqoghnlhfggaihfnppbmfdnjcokjfakladhdmdiejcecaheilbeoebgfgcfjlngiphlqeemgopopmonfcccpjhleijllfngdomcqhkfcidmkgqqgoqegikioaoodkokhaklaihlenckifchcjoibffdjqflgqfmdo...

output:

2190

result:

ok answer is '2190'

Test #15:

score: 0
Accepted
time: 1ms
memory: 9636kb

input:

acbabbcbaacacabcbabcaaacaabcaaabccbabcbcaaaabbcabaaabbacbcaaabcccbaaccbbcabbaaababccbbacacbabaaacbacbcabcbbcbabccccccbbaacacbcacacabbbbbbcbcaaacbcbacccaabbbabbbcabccbabaabcbccbacccccbabbbbbbaaccaabbccccbabbcaccbaccaaababbcaaabcbaaacbbaccbbcbacbccacabbccacbbacbabbcabcbbaccaabbccbcbbcbccabcbccabbbabcb...

output:

15924

result:

ok answer is '15924'

Test #16:

score: 0
Accepted
time: 2ms
memory: 7928kb

input:

bhdxinplnrkvahvgamiwqnuqpgmivqfufihnsjcimgfdkjsrqxhqxwdxfocovgpasgnxrvioxpsolcxmfxuhfpeehmmfsgcggenvovhmqtvnohtrgdhkdoonojjdvlvelussuegcpkmfvtdpawqeowewbpxbipqmgckmrarknfkqqbfgvbmbsjtilnbpgwpsbwrfvlfqsdtnwsscwawwgtmunewtgjujwniavsjrcewocbxelgntqfmrfvblghjcdemxtvxmlupgxotjnxrnhemxwpjtghcokiibbujodawx...

output:

1548

result:

ok answer is '1548'

Test #17:

score: 0
Accepted
time: 2ms
memory: 9728kb

input:

hgroaoogpmsnobkfecoqlebndmblggaerscolcqerhgobfdmialndaaaqjisghbljjqefnklsoqeicimqcplfohjdajhpecehlgqilimkrksleroqqrqhoppcpsknnaaonspddgdpoqqhdifcqpfqrkljlokcgsibeqmrhagkkseaeapqaboeglocqpipambsjdhpslqajkmsinddrhcjmrhiiakopjqhginnhkreobjpdigloolkhkdjefbqpshpqcpearjapkqlerkllljefflqcrcgkcrchfndglonceg...

output:

1976

result:

ok answer is '1976'

Test #18:

score: 0
Accepted
time: 2ms
memory: 7928kb

input:

vbofyszrvwsdixyhngfqrunnmhivyilqiwxsdayfmdyovagfbeddpdwmpnfsunmtlxjvrizfzknqgrirtygwdmqdnqubzmryqxqjzfvrgmlebiverkcqaqpdiapbktwaixerxkewhtqfvgtlrtxuesxjhkdsbjdqnkuvivypgqlycjurldmfydcxictjwbjpdwqimbfxakzrljrekrxkestdeseewcetuaquqvbwxvqgacfvaeiycmmtyvxsxfmpdnvylkybngtoktxwforvxkhmludmkljxdoquhyvmmevk...

output:

1412

result:

ok answer is '1412'

Test #19:

score: 0
Accepted
time: 3ms
memory: 9900kb

input:

lldkkjfeihgcdkaeijblcggdmbabmejbmljljjeicleelhfjagckgkflfggemmalgjeekdlhmjeghcibhgfmdemjljgjkmfjaidmiaeeeifeibdfmllhacickfgdfihajkfcemajmdfbmeefimfgbmlggfmgiecdedabakhkaafabijhagaihbcgllgfklbfemmecbagfabkdahakegdmgdmajhaeijglkbemhadmhfbaagbhialbkkdblfflcamieidichbhagbmgifijgjdjidbfejaaamjddbbabmbhag...

output:

2773

result:

ok answer is '2773'

Test #20:

score: 0
Accepted
time: 2ms
memory: 9736kb

input:

hheahpaoepdahfdeqliolckfaogjamlakobiahncibelepjbfgjpjofpnhnpgelaafcofkjlpcoaejbmemjaigncdfioeeflqcpgjeehqehfnqnjpqoidomgbpeehiliaalokmpkfqbhdaggggdkoefkheljfhqlaqnjokafpgceqaohgipkncheacgdlooqjpqdioddcqjgpkbceipjnfflnmfqgbjkomlndbpqcmfploeeemcjjajnaapcmflbolocohbnckafgemghqffmpfaohdopnifjgikadnapdqa...

output:

2120

result:

ok answer is '2120'

Test #21:

score: 0
Accepted
time: 2ms
memory: 9908kb

input:

hrkmbslgoiahkuaanfkrthtriresittllrjptqidbokqisorhdmcnsamdkcbokuhhlcgfqihbcehbrfnggorroeqrnpcfltfrbmnksslngaemigpsckalephiuuqjkhjqmumntfdrtitudflftnasefhkotpfibanafjueadhkelkqkhteijueqtnobdqgjolnjiqeictqgubhufdneampstmckeddjpenuisdgdqelmpmlrfblemsojtracnsagfiopsfqnarqjsictamuljpuadattmeudqnfddapmtseo...

output:

1773

result:

ok answer is '1773'

Test #22:

score: 0
Accepted
time: 2ms
memory: 7784kb

input:

efbedhachhgdhbhchecbgbdedgbhddbhebccgegbfgcdgeghhehffhcfgafgeabdehbhehafbaagcfcbecadhagdebfdedcdfgbaffeffgabfdafccabhabhbehhbegdcfehadehabaacbgcfgehffdbhaaagggghedfhaefdhagbgeffahadbbcdcgdfgacaebgdheabahggeacfahgeedbgadgebhdahhgbebhgbgaghhaheeffgbbdcchddacdbbceeefccbeafgdgbagabdhggfgbhffefabcagdhahc...

output:

4464

result:

ok answer is '4464'

Test #23:

score: 0
Accepted
time: 2ms
memory: 7664kb

input:

ibjiwmcjcnneglnnkvqrsfnowvgrcqqcwuwgwbbntduorslqgfhfqowannwocthiwwuwuvohnvldknewuhkbkcbvqmfhmfpbvfwekmjsgbdbgvewebjnddgwbjcruphqedcsoiqgfrwampdaachuejdkjdsntvwgcasdwlspqmjshvamcgsmviwwghpbvdmccmccoclbfcntjtparjspjsqkbgumnfpvsqdqorhcjkfhwlkvdlmgdghibjkdwhilvkcjbsusenaedekbqsuwskqlrwvhnnraoiqmljaberum...

output:

1605

result:

ok answer is '1605'

Test #24:

score: 0
Accepted
time: 3ms
memory: 9620kb

input:

gywcydgphaftrvrgycaavbmagbwecbclapeytmcbsirkhkdtgehkqvvpdcrijochiatbfiseyacbyqykcxcllitvliopmxtbcybatlbaqlwliruoiqbadtkgbppvxcryxyycsdbmxywexbrssjrnppkwkucgkjbkdxcrdtnaynqrjjohwfyyciikfojscwedqqqprdpipvcomfdtevejwumquinswmjvofcefmjabxqvkirrsrphlfigxktufdgijaicbcfhsbnnnpuklkrbbfmjbwvoveunnkcfacvdkwgq...

output:

1487

result:

ok answer is '1487'

Test #25:

score: 0
Accepted
time: 3ms
memory: 9860kb

input:

cdeabecddaabdceecaeeecddbadddbaebebdabecebcbeecbcdebaadedaeebbeeacccdeeecdbdbadaedccdabddecdcdadddacbdbcabcacdbedaaebebcbbeeceacbdadbdabedcabddcdddbdddcdcaebaccddbabccbdaaeaddebebebcbcdaecedddecedcdacadeccccadddebcdebcbbddccbcaedecdededbbceeebdcaceecccbdacaaaaceacebbdecabaccbbcebebbbddbccedcccbcadbc...

output:

7073

result:

ok answer is '7073'

Test #26:

score: 0
Accepted
time: 2ms
memory: 7800kb

input:

cbbbacaaabcbababcbcabaccaaabaaccbccaccbaabacccbbaccaaccacabcccacabcabbcacbbacaacccabacbabbbccbcacbcbbababcbbaccbbbbbcacccacaaaabbbaaacbbccabcbaccbbcaaccccacacbcabcbacbbaaacbccaacacaaaccccabccbcacbbabbaacaabbcabbccccaabcbcabccbaccabacabcabaacccababcacabacbbbaacccacbcabbbacaaabcacabaabccaaabbbcbcaabac...

output:

15764

result:

ok answer is '15764'

Test #27:

score: 0
Accepted
time: 1ms
memory: 7752kb

input:

jeaaiibjbcagfeihgehccdcecadcaihecefiebheeigagghchaebaijfdbjfdabgggheggdigbcbebiibacbhichbghidcedebehhgafdaehgccbafhibgjahaefjcciabgdhaehjbgfccbibegchhfagejfcjjcjfbedcieegcafghacdhgagahejdddgbcgjdecchfffjcabaecbehgadcihhbcfajbfdgcddhjiaacaidgggbjifdedfbgcbgeaehbgfhadfdjjhhjgggehehjcdfcegffdjicgfidife...

output:

3583

result:

ok answer is '3583'

Test #28:

score: 0
Accepted
time: 1ms
memory: 9668kb

input:

bkogogclbdkgoddeopcqiimllehnkiokpjpcapheqeohhdngckljhekpnpgibmlhfrqirnhpkkkplgkggcfqingmdmdqbgffffqbllbjefqqerrekclhlkeclgcrclqankqgcnnrrmdmpqmldfbeolmeaafgrcfcbfgekilgfllrqqdnanpmfgqihjnicaanlkhpmqrldqonogqhjnebgglgjrkhbredoranhqgfgphdidbldmfqjeeebhrqjoenppiiejqljedlelppdhkoapgcdlihkiqmqgcmkikfpdio...

output:

2017

result:

ok answer is '2017'

Test #29:

score: 0
Accepted
time: 2ms
memory: 9952kb

input:

dmfdicakllkhjcbfpkmdaoimolgpnjncnijcnikhjodehgnifdbjpjjhlbaobkndlnbehefonknlfkjikdonddkadgbjehjbcnnceopnbgeaogpnafankjpmfnochbcnjcjlfokkcmchfeedaokdodknalochdmjdgnkihombaclfehgohehbikpheiccpmofebkijlldfdimfjaeffpkgfpbhccfldbkhpnbbgogofcjmkocgodnghendannpphbhcnacoeloheocpecafnjopkhlfigajcnenbmnjegegi...

output:

2249

result:

ok answer is '2249'

Test #30:

score: 0
Accepted
time: 2ms
memory: 9896kb

input:

jmbhlcmaoopgbpgoifibbekilhbbnkbbmfmcbfpoofkmlnojoencbbjgejibmdimlfpjabmopfdhmfmlichcjcjjlollgmpkjamlideggjjpkadhbagclealldnlnmhleenhkjkhoklkepddkccooijefkiaoamaahppkadbhccefdbbieoaaoogjjpbdeogjllccijgbnhpfanbljnakmpnhhfdjjefbkmpmmnkoggfmlflgldaefkdhidcmmfmnnnbpgajhmgdfkcaahbpmjgknocbpbemhcefdlbldhnk...

output:

2247

result:

ok answer is '2247'

Test #31:

score: 0
Accepted
time: 2ms
memory: 9764kb

input:

bdchdgiihadebebhifeadbbchccageichdhabgibbifeaaeiehchccidgeagdgafefadhabefabhfhefiifafghcbecbhfggdihfigbfeabbfhgegciehdbbggfidigcdahbeggafdiiggfedbfcbicehfbaaghciddgeaddfeibfhdcehfdafaichiiebcbgbgadefccafidabageagffhhfiihbiedfdebgacecdbhiadcgcifdfhfiaebdfgeiaacgceifiadiihbhifhgdhhhcbegdfgdhebbeaeegbc...

output:

3952

result:

ok answer is '3952'

Test #32:

score: 0
Accepted
time: 0ms
memory: 9956kb

input:

ddbgeicefegejhkdbbfeejjbgkjicchkbjkgkhckgdaicchhjjbfhbeikkjaedbaehjgafjcefdhfihecjjidcieecbegihabfighgbkbghcchbkefcfgkaekkgkjjdhdhfhefkbgdbajcbibjkgiebciibaejdeiahakddehdeibiagighjckcebhckdgdckkigadckdgkkfeghebjkjcddfaceijghdicdchgahajkaaedffkcfbhfajgdffijakchkkkfbhdahihhijkeekbghjfakhfhicdciffchkch...

output:

3248

result:

ok answer is '3248'

Test #33:

score: 0
Accepted
time: 0ms
memory: 9656kb

input:

gmlipprhnmgngbibehcerdjnccabfrcbkkjmligbacqcmqedopraaaqonmapprifimhrcilrjamonlkqiqmircjidoeqboogjcjdfrldnqncqdrapbqjmobgaoabiminjgdjngimhlomeeabrgponqgnroaijqpgkakinhldlekeaaclqabdmbmjnejqdaaaginaodnjnaeqfbaibjgjrkdhilddikocpnhrqognrffrnlpjbcpcbkioqlnrgharmhckookandnkfjhdajapbjfagljpbrriqqkercqnhrqd...

output:

2035

result:

ok answer is '2035'

Test #34:

score: 0
Accepted
time: 2ms
memory: 7596kb

input:

aegnnajjbnpkqajafainmbmcmrfnrmldjiqrlpaeerlqakgkbndegdlajofjprlkgdgrfdcrojldqlcqihnjfgamkhhhglffdropmlhljajdcrldrjneqlnnnggrrrmjcnggbenrjdboknrinpdrfakrbedcfhngqafbekqloggnmkmqlkcifrkgildfqgfjhqhbmkpheqqcfnrcldpjfnphkdheiblijiebkqkcmcmkmalhdjrafaohcrqfqeenmnrmalckggkdbloqakblbleheidbleodoiilgaapocng...

output:

2033

result:

ok answer is '2033'

Test #35:

score: 0
Accepted
time: 0ms
memory: 7748kb

input:

cdedbbbadbaebccbccbdddadabccedeaedeeaadbeeaeabcccbcbaeccdaaedabacbadeaddccededdebabbbeadcbbdeeecbbbbcdbcaabbbedddacdaccacdaeedcdeaceaaaabeebcdeecabdcbceebbecaaacccaeeecebbcdcdaeabddbaacabeabdadddabeccabbaecdaadaddbaaebbabbcedbcdebbebbaabadeaadadcebbddebeaccecacdaccbeeaadddeccaaadcadbbadbeacbdcdddbca...

output:

7056

result:

ok answer is '7056'

Test #36:

score: 0
Accepted
time: 3ms
memory: 9744kb

input:

ebknblltothuqdufqotatoulqgnmmhfjckaalshtvllkvmveaunlkkvsnpieenjdvckiblddejspgpemngqebqgcgkmrlbreutvuosjvlnrmspbeitlvaakfefverpjnlujsqrocbchpclamnhvdadusaktnbdhndhotojojmandnvqkifinbvtcemcbcvogtbjllhajttittjsfvqovhfsmpkujcfkdlbrrhqucqicdldtllcljhjegrebktfovcldoshvsrnhlqlgmqkifmbakgmuftrcolhgpcnbmqtlk...

output:

1667

result:

ok answer is '1667'

Test #37:

score: 0
Accepted
time: 1ms
memory: 9744kb

input:

grlhcvvnmcskprdrhjojiusojfkeaeqkjmnmsljdgjajqqfbkkqvnhvosdtoliiflfjaurdjahjeispsrlbpgannhvsqogmknujohhjohoshlshfdodisocpsvgomkdljummmalsidljfknsdeohtvqsphgtebatlkutpmdltdqgkroirboqjuufvkkacmorgumntbolgqjhrheicpjhkahiljhkqrfvmmvjosajqmgdaafkjitqudmieodmempkitesrdsfkfijgrbcbegkstutjqcbvhllnpjmkfhmarch...

output:

1653

result:

ok answer is '1653'

Test #38:

score: 0
Accepted
time: 2ms
memory: 7600kb

input:

checddgjigkdclhhgfeikhaijijdiibjbdahhidefdclhlfgfjifhgcekakfjcdhjlebchhekglbeeafigdjkdgikhbedlglgcegblhcafggcbabjidcdhakchiicdeiaakejikkabdecfclbkbafalagbgklcacidglkhaclcgefklddjaahihhlfhdejljfccdajjdecllfbafifcidkkjbikhlcjhejagbelldajbkeeecgacgghkfdlfbhdhllfdihhfciclhhkcllicbiidhgfgekhbfhfkdlgifcfb...

output:

2986

result:

ok answer is '2986'

Test #39:

score: 0
Accepted
time: 0ms
memory: 7656kb

input:

ggfffhigbhacggggegcddeigfebcidgicideafaaghfgebbabfdahaiiffedbagfheaffaehgahaahaidahagdhiaihabecbiidfhegcadchdhidbhiihhdefgffaieiefdeaiadbbgcfibcediecadfdhaidcfhgiffgfaddaiidcafefffbegiaabgdbgigcfbiiacccdghbaibdbicgdbhfcicheiidghgehagbfihheaaabhhifigifigegihedaecegcgcchdgbccafdiegbifibdifcbaafffcffei...

output:

3918

result:

ok answer is '3918'

Test #40:

score: 0
Accepted
time: 0ms
memory: 7652kb

input:

ummgfeaecrtgkapkpsmcmactitkugcrffhshjpudirlrqffrrindmemsqrkjhoiathjjjtpfhepfrncpbbpdgpnqrmqrfekmonjbrhjbturipgfltgaesdfamemqtmaepfbglmlclsmfkcuutchtmsjdhlmfjjglpejuqpocnljabloikkbeaqmdsubcjunqfiddnutaapegnbanurnuiafagmhudsrmgiegnutuncgbprbbpfqhjpcamhpjkgbuqfblospqlditeljglgqclqihhtqdeesurpqefbhehjjo...

output:

1773

result:

ok answer is '1773'

Test #41:

score: 0
Accepted
time: 1ms
memory: 7740kb

input:

ldkfjidefefcdfhfmadbdcdajmlcihglmcgfbdjidbhlalclfgihgmchdmjeclkcglbcaflfhjamebdmcmljcdjammhldaeijekgigehhfbbibljjfemiilfehjdklcdaaigjfjdcblkecfggdchiamlifgdibjeffljlmcffajafafadcimlgcggmmeamejfileclkhihjcmhcfahfjffhdmkjcmicijldllghegihddebchcchejbklfealaijhbamabfedijjhiljjbgdagkfchaabiajhgackmgaeabg...

output:

2788

result:

ok answer is '2788'

Test #42:

score: 0
Accepted
time: 1ms
memory: 9672kb

input:

eudadvifjlpkmgchohotrddufliprbchvllqbmvllqkorvispiouqlfmutceufqijhecpssiagmacfufsgkncdgipfnmkbpertblvbkmmmgqkkapprjhbmccisilfcjciqvgmdvucovglbdcmqfhhucvhcbdhbbamrehrceadfavodqusggkakfirusaqpdbnlarhtofvtgmnecblfnddgclhdnevfmbemcbnkldmkdnggcpmuvnvcaonmqmafiehpcusiqqasoahugkmioscdbnkcuappfthjibopidjlqm...

output:

1683

result:

ok answer is '1683'

Test #43:

score: 0
Accepted
time: 2ms
memory: 7668kb

input:

adddcbdccbcbbbddbaacbbabbbbaccbdddadbbaaccabcdcbbdadcddcddbddcdcadddbcbcabddbbccbadbdacdcbcacdacbbcacbdcbdcdcadacbacdaadbdcaccbdccdbcacccbddccbbabaacbcdaccddddcabcdbbccbccaacadcacabdddddbbbacbccccadacbacdaaacbacadcbcddcaccccbcadadabbabbdcadabcacdaccaccbbabdacdadbcdabdbaaddaadaabddacbbbbaadcadacdabac...

output:

8968

result:

ok answer is '8968'

Test #44:

score: 0
Accepted
time: 2ms
memory: 7908kb

input:

gbgaddcgjjebdeicjajeafffffhagkejdhieaediajecbcejifchacfcghcjifdcgkbdeiehijakefbehdjicfgfbjahfjikkkjkdibgedjkjbbkejejekhchjiihejdhigjcgdfceefgdbfcdhjjkikfkdeebbjgbhkiefcaieihifdkbfggigaakkigdgkhkkgkedaeehedceagjgfjejkchhhccgejjijfhkekfbekjkkhaccdccghiidggedbidhdhhegkddgahgdjbekgiibccekcbhkkgahfkjbake...

output:

3254

result:

ok answer is '3254'

Test #45:

score: 0
Accepted
time: 1ms
memory: 9776kb

input:

clfigelkcgbhnmmlimcbeeamahehdcgnllakicheabimlbjkgaihledckhihamkkncjcbidiaccghlkabdanlclfncggdegajhbhfjlddkafkbinjeicfibklkacgjgafklihlhfihfhefighfabcjhfmnffbadgahcefgeendkjmeibngfeagefncnhjnfncilinciggklcmbhblgehbbmidnfbcagkedkdbfbgljadackjbjfffccldlmfelabhjhanlbffdllminghlgiejaajaammjeededldjimhbml...

output:

2565

result:

ok answer is '2565'

Test #46:

score: 0
Accepted
time: 2ms
memory: 7672kb

input:

acacabccbaccacacbaaaabbccbbbbbaccbaacaababaacbabbbcbbbabbabbccbbbbaabaccbacccbabacaacbaacacaccbaccccaaacbcabacaabaccacbcacbccabbbbacbbcabaccabbabaccaacbbcaabacbccbbbbacbabaacaacccbcaabbccbbcaabbabccbcaacccbcaacbaacbbccbbbcbabaabaababcbaccbabbaacbabbcccbabaccbcbccbcbaacccaaacacbbbcbbcccabacbbbccbaabc...

output:

15624

result:

ok answer is '15624'

Test #47:

score: 0
Accepted
time: 0ms
memory: 9672kb

input:

hlhbhfqigdhcbocaokqdimjqjmlebepagmdkmkqgfhgdaambfdjpceefailflmbeeeicoipbqladfjfloeqgelbqeiibdbighflhngajgeebiniffkcigleiiilgnchlhjjmkmlngqbpchbjnlamjqcddebgiikoajpnkelcmcenipfecdcfjiikigfhjpodkialpgqodhaloookdanjdqikmgimfglqqgdnneohdghqlplcaaqlglafhpfagcemeingdomloagnjdllqhalkdniijhcalildbfgcincqgjn...

output:

2150

result:

ok answer is '2150'

Test #48:

score: 0
Accepted
time: 0ms
memory: 9760kb

input:

ceaeabfaefccdbcabfeafafaccbbebadffebaafbcfcafbcbefdcdbdeaebdaffadefbecffacfedfabdabdeccfafaecfcafbeeeabfadbdcaedeaaacdfabeabddbffaebbaceddbcdcbaaffeafbededfcecbeefbcadeeecadbceaacfdbbcdacffcbecbfdccebaebbbaacbaadafbaeddcbbdfaddfbedefcbffeafbaebedbaefcabefcbcaaebbffacecedbedcbfaaddefdbccaafdacdceffcd...

output:

5932

result:

ok answer is '5932'

Test #49:

score: 0
Accepted
time: 2ms
memory: 7948kb

input:

nirhbekjkmnjlridmghnoafphtqsptgakctalqibnsbtditcgaalqggmjmmrtdmttroqgtongmggedatjejbkjckmpqjgjkaienpmqefppsbhackarncrcrlenpmjmjcmiieiltotoiahsctbnnilpgakpnpmdobrqgsclonmlrkaeddbpdcaqetjhosjsohgodtestmmqklltoddlcdmcmkkkklgffpgjcgdktgrtgfdmnjdnmroemodhqsbaonpboblthacfslbebfhqsktreijheadhdbptjheojmlhjk...

output:

1822

result:

ok answer is '1822'

Test #50:

score: 0
Accepted
time: 1ms
memory: 13384kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

6352396311852

result:

ok answer is '6352396311852'

Test #51:

score: 0
Accepted
time: 1ms
memory: 9604kb

input:

aaaaaaaaaaaaaaaazvbgpaaaaaaaaaaaaaaaazvbgpanxxdbraaaaaaaaaaaaaaaazvbgpaaaaaaaaaaaaaaaazvbgpanxxdbraaaaaaaaaaaaaaaazvbgpaaaaaaaaaaaaaaaazvbgpanxxdbraaaaaaaaaaaaaaaazvbgpaaaaaaaaaaaaaaaazvbgpanxxdbraaaaaaaaaaaaaaaazvbgpaaaaaaaaaaaaaaaazvbgpanxxdbraaaaaaaaaaaaaaaazvbgpaaaaaaaaaaaaaaaazvbgpanxxdbraaaaaa...

output:

975744

result:

ok answer is '975744'

Test #52:

score: 0
Accepted
time: 3ms
memory: 7596kb

input:

aaaaaaaakwxaaaaaaaakwxaaaaaaaakwxaaaaaaaakwxaaaaaaaakwxaaaaaaaakwxaaaaaaaakwxaaaaaaaakwxjhztxxrfahaaaaaaaakwxaaaaaaaakwxaaaaaaaakwxaaaaaaaakwxaaaaaaaakwxaaaaaaaakwxaaaaaaaakwxaaaaaaaakwxjhztxxrfahaaaaaaaakwxaaaaaaaakwxaaaaaaaakwxaaaaaaaakwxaaaaaaaakwxaaaaaaaakwxaaaaaaaakwxaaaaaaaakwxjhztxxrfahaaaaaa...

output:

280584

result:

ok answer is '280584'

Test #53:

score: 0
Accepted
time: 1ms
memory: 9604kb

input:

aaaaaaaawsdaaaaaaaawsdaaaaaaaawsdaaaaaaaawsdaaaaaaaawsdaaaaaaaawsdaaaaaaaawsdaaaaaaaawsdjsjonbnqgjaaaaaaaawsdaaaaaaaawsdaaaaaaaawsdaaaaaaaawsdaaaaaaaawsdaaaaaaaawsdaaaaaaaawsdaaaaaaaawsdjsjonbnqgjaaaaaaaawsdaaaaaaaawsdaaaaaaaawsdaaaaaaaawsdaaaaaaaawsdaaaaaaaawsdaaaaaaaawsdaaaaaaaawsdjsjonbnqgjaaaaaa...

output:

291276

result:

ok answer is '291276'

Test #54:

score: 0
Accepted
time: 1ms
memory: 7680kb

input:

aaaaaaaaxqbaaaaaaaaxqbaaaaaaaaxqbaaaaaaaaxqbwscstuuaaaaaaaaxqbaaaaaaaaxqbaaaaaaaaxqbaaaaaaaaxqbwscstuuaaaaaaaaxqbaaaaaaaaxqbaaaaaaaaxqbaaaaaaaaxqbwscstuuaaaaaaaaxqbaaaaaaaaxqbaaaaaaaaxqbaaaaaaaaxqbwscstuuaaaaaaaaxqbaaaaaaaaxqbaaaaaaaaxqbaaaaaaaaxqbwscstuuaaaaaaaaxqbaaaaaaaaxqbaaaaaaaaxqbaaaaaaaaxqbw...

output:

283176

result:

ok answer is '283176'

Test #55:

score: 0
Accepted
time: 2ms
memory: 7892kb

input:

aaaatliaaaatliaaaatliaaaatliaaaatliaaaatliaaaatliaaaatlimrabqxqgaaaatliaaaatliaaaatliaaaatliaaaatliaaaatliaaaatliaaaatlimrabqxqgaaaatliaaaatliaaaatliaaaatliaaaatliaaaatliaaaatliaaaatlimrabqxqgaaaatliaaaatliaaaatliaaaatliaaaatliaaaatliaaaatliaaaatlimrabqxqgaaaatliaaaatliaaaatliaaaatliaaaatliaaaatliaa...

output:

73287

result:

ok answer is '73287'

Test #56:

score: 0
Accepted
time: 2ms
memory: 7720kb

input:

aaaaaaaaynjaaaaaaaaynjaaaaaaaaynjaaaaaaaaynjaaaaaaaaynjaaaaaaaaynjaaaaaaaaynjaaaaaaaaynjrjkpgvkkxwaaaaaaaaynjaaaaaaaaynjaaaaaaaaynjaaaaaaaaynjaaaaaaaaynjaaaaaaaaynjaaaaaaaaynjaaaaaaaaynjrjkpgvkkxwtukjbkptwztgszvaaaaaaaaynjaaaaaaaaynjaaaaaaaaynjaaaaaaaaynjaaaaaaaaynjaaaaaaaaynjaaaaaaaaynjaaaaaaaaynjr...

output:

276480

result:

ok answer is '276480'

Test #57:

score: 0
Accepted
time: 0ms
memory: 7696kb

input:

aaaaaaaaaaaaaaaautlubaaaaaaaaaaaaaaaautlubaaaaaaaaaaaaaaaautlubaaaaaaaaaaaaaaaautlubaaaaaaaaaaaaaaaautlubaaaaaaaaaaaaaaaautlubaaaaaaaaaaaaaaaautlubaaaaaaaaaaaaaaaautlubghpnrgkzzfhvsaaaaaaaaaaaaaaaautlubaaaaaaaaaaaaaaaautlubaaaaaaaaaaaaaaaautlubaaaaaaaaaaaaaaaautlubaaaaaaaaaaaaaaaautlubaaaaaaaaaaaaaa...

output:

1076053

result:

ok answer is '1076053'

Test #58:

score: 0
Accepted
time: 2ms
memory: 7688kb

input:

aaaaaaaaaaaaaaaarqhlyaaaaaaaaaaaaaaaarqhlyaaaaaaaaaaaaaaaarqhlyaaaaaaaaaaaaaaaarqhlyfomoymogmsaaaaaaaaaaaaaaaarqhlyaaaaaaaaaaaaaaaarqhlyaaaaaaaaaaaaaaaarqhlyaaaaaaaaaaaaaaaarqhlyfomoymogmsaaaaaaaaaaaaaaaarqhlyaaaaaaaaaaaaaaaarqhlyaaaaaaaaaaaaaaaarqhlyaaaaaaaaaaaaaaaarqhlyfomoymogmsaaaaaaaaaaaaaaaarq...

output:

1036728

result:

ok answer is '1036728'

Test #59:

score: 0
Accepted
time: 2ms
memory: 7744kb

input:

aaaayqwaaaayqwuxagaaaayqwaaaayqwuxagaaaayqwaaaayqwuxagaaaayqwaaaayqwuxagaaaayqwaaaayqwuxagaaaayqwaaaayqwuxagaaaayqwaaaayqwuxagaaaayqwaaaayqwuxagiesgepfslcyvcaaaayqwaaaayqwuxagaaaayqwaaaayqwuxagaaaayqwaaaayqwuxagaaaayqwaaaayqwuxagaaaayqwaaaayqwuxagaaaayqwaaaayqwuxagaaaayqwaaaayqwuxagaaaayqwaaaayqwuxa...

output:

62748

result:

ok answer is '62748'

Test #60:

score: 0
Accepted
time: 3ms
memory: 9904kb

input:

aaaaaaaanncaaaaaaaanncaaaaaaaanncaaaaaaaanncwzcabgcaaaaaaaanncaaaaaaaanncaaaaaaaanncaaaaaaaanncwzcabgcaaaaaaaanncaaaaaaaanncaaaaaaaanncaaaaaaaanncwzcabgcaaaaaaaanncaaaaaaaanncaaaaaaaanncaaaaaaaanncwzcabgcbdhtpppqmmzjbltaaaaaaaanncaaaaaaaanncaaaaaaaanncaaaaaaaanncwzcabgcaaaaaaaanncaaaaaaaanncaaaaaaaa...

output:

265356

result:

ok answer is '265356'

Test #61:

score: 0
Accepted
time: 2ms
memory: 7596kb

input:

aaaaaaaaaaaaaaaablbwoaaaaaaaaaaaaaaaablbwoaaaaaaaaaaaaaaaablbwoaaaaaaaaaaaaaaaablbwoaaaaaaaaaaaaaaaablbwoaaaaaaaaaaaaaaaablbwoaaaaaaaaaaaaaaaablbwoaaaaaaaaaaaaaaaablbwopjberhybpthqnaaaaaaaaaaaaaaaablbwoaaaaaaaaaaaaaaaablbwoaaaaaaaaaaaaaaaablbwoaaaaaaaaaaaaaaaablbwoaaaaaaaaaaaaaaaablbwoaaaaaaaaaaaaaa...

output:

1097349

result:

ok answer is '1097349'

Test #62:

score: 0
Accepted
time: 2ms
memory: 7652kb

input:

aalvaalvaalvaalvaalvaalvaalvaalvgqmnnxaalvaalvaalvaalvaalvaalvaalvaalvgqmnnxaalvaalvaalvaalvaalvaalvaalvaalvgqmnnxaalvaalvaalvaalvaalvaalvaalvaalvgqmnnxaalvaalvaalvaalvaalvaalvaalvaalvgqmnnxaalvaalvaalvaalvaalvaalvaalvaalvgqmnnxaalvaalvaalvaalvaalvaalvaalvaalvgqmnnxaalvaalvaalvaalvaalvaalvaalvaalvgq...

output:

26364

result:

ok answer is '26364'

Test #63:

score: 0
Accepted
time: 1ms
memory: 9844kb

input:

aaaaaaaaaaaaaaaawntataaaaaaaaaaaaaaaawntataaaaaaaaaaaaaaaawntataaaaaaaaaaaaaaaawntatucdtsmgjnpaaaaaaaaaaaaaaaawntataaaaaaaaaaaaaaaawntataaaaaaaaaaaaaaaawntataaaaaaaaaaaaaaaawntatucdtsmgjnpaaaaaaaaaaaaaaaawntataaaaaaaaaaaaaaaawntataaaaaaaaaaaaaaaawntataaaaaaaaaaaaaaaawntatucdtsmgjnpaaaaaaaaaaaaaaaawn...

output:

1022208

result:

ok answer is '1022208'

Test #64:

score: 0
Accepted
time: 4ms
memory: 11708kb

input:

aadxaadxaadxaadxaadxaadxaadxaadxyzynwxaadxaadxaadxaadxaadxaadxaadxaadxyzynwxaadxaadxaadxaadxaadxaadxaadxaadxyzynwxaadxaadxaadxaadxaadxaadxaadxaadxyzynwxaadxaadxaadxaadxaadxaadxaadxaadxyzynwxaadxaadxaadxaadxaadxaadxaadxaadxyzynwxaadxaadxaadxaadxaadxaadxaadxaadxyzynwxaadxaadxaadxaadxaadxaadxaadxaadxyz...

output:

26976

result:

ok answer is '26976'

Test #65:

score: 0
Accepted
time: 2ms
memory: 7788kb

input:

aaaaaaaalryaaaaaaaalryaaaaaaaalryaaaaaaaalryaaaaaaaalryaaaaaaaalryaaaaaaaalryaaaaaaaalryfwnoowhpuiaaaaaaaalryaaaaaaaalryaaaaaaaalryaaaaaaaalryaaaaaaaalryaaaaaaaalryaaaaaaaalryaaaaaaaalryfwnoowhpuiaaaaaaaalryaaaaaaaalryaaaaaaaalryaaaaaaaalryaaaaaaaalryaaaaaaaalryaaaaaaaalryaaaaaaaalryfwnoowhpuiaaaaaa...

output:

297648

result:

ok answer is '297648'

Test #66:

score: 0
Accepted
time: 1ms
memory: 9704kb

input:

aaaaaaaaehfaaaaaaaaehfaaaaaaaaehfaaaaaaaaehfaaaaaaaaehfaaaaaaaaehfaaaaaaaaehfaaaaaaaaehfhxxhdotjteaaaaaaaaehfaaaaaaaaehfaaaaaaaaehfaaaaaaaaehfaaaaaaaaehfaaaaaaaaehfaaaaaaaaehfaaaaaaaaehfhxxhdotjteaaaaaaaaehfaaaaaaaaehfaaaaaaaaehfaaaaaaaaehfaaaaaaaaehfaaaaaaaaehfaaaaaaaaehfaaaaaaaaehfhxxhdotjteaaaaaa...

output:

299808

result:

ok answer is '299808'

Test #67:

score: 0
Accepted
time: 0ms
memory: 9796kb

input:

aaaaaaaaaaaaaaaamciwnaaaaaaaaaaaaaaaamciwnaaaaaaaaaaaaaaaamciwnaaaaaaaaaaaaaaaamciwndqmdfcecdzaaaaaaaaaaaaaaaamciwnaaaaaaaaaaaaaaaamciwnaaaaaaaaaaaaaaaamciwnaaaaaaaaaaaaaaaamciwndqmdfcecdzaaaaaaaaaaaaaaaamciwnaaaaaaaaaaaaaaaamciwnaaaaaaaaaaaaaaaamciwnaaaaaaaaaaaaaaaamciwndqmdfcecdzaaaaaaaaaaaaaaaamc...

output:

1031525

result:

ok answer is '1031525'

Test #68:

score: 0
Accepted
time: 2ms
memory: 7752kb

input:

aaaaaaaasvraaaaaaaasvraaaaaaaasvraaaaaaaasvraaaaaaaasvraaaaaaaasvraaaaaaaasvraaaaaaaasvraaaaaaaasvraaaaaaaasvraaaaaaaasvraaaaaaaasvraaaaaaaasvraaaaaaaasvraaaaaaaasvraaaaaaaasvrojzjtgyzbbryzkaaaaaaaasvraaaaaaaasvraaaaaaaasvraaaaaaaasvraaaaaaaasvraaaaaaaasvraaaaaaaasvraaaaaaaasvraaaaaaaasvraaaaaaaasvr...

output:

303804

result:

ok answer is '303804'

Test #69:

score: 0
Accepted
time: 2ms
memory: 9560kb

input:

aaaajmxaaaajmxaaaajmxaaaajmxjnhbhjaaaajmxaaaajmxaaaajmxaaaajmxjnhbhjaaaajmxaaaajmxaaaajmxaaaajmxjnhbhjaaaajmxaaaajmxaaaajmxaaaajmxjnhbhjsvtbeefofzfmaaaajmxaaaajmxaaaajmxaaaajmxjnhbhjaaaajmxaaaajmxaaaajmxaaaajmxjnhbhjaaaajmxaaaajmxaaaajmxaaaajmxjnhbhjaaaajmxaaaajmxaaaajmxaaaajmxjnhbhjsvtbeefofzfmaaaa...

output:

64683

result:

ok answer is '64683'

Test #70:

score: 0
Accepted
time: 1ms
memory: 7840kb

input:

aaaaaaaaaaaaaaaajzyooaaaaaaaaaaaaaaaajzyooaaaaaaaaaaaaaaaajzyooaaaaaaaaaaaaaaaajzyooaaaaaaaaaaaaaaaajzyooaaaaaaaaaaaaaaaajzyooaaaaaaaaaaaaaaaajzyooaaaaaaaaaaaaaaaajzyoouhmfxwrcazcbbaaaaaaaaaaaaaaaajzyooaaaaaaaaaaaaaaaajzyooaaaaaaaaaaaaaaaajzyooaaaaaaaaaaaaaaaajzyooaaaaaaaaaaaaaaaajzyooaaaaaaaaaaaaaa...

output:

1089726

result:

ok answer is '1089726'

Test #71:

score: 0
Accepted
time: 2ms
memory: 7888kb

input:

xfenxxfenxfenxxfenxxfenxfenxxfenxfenxxfenxxfenxfenxxfenxxfenxfenxxfenxfenxxfenxxfenxfenxxfenxfenxxfenxxfenxfenxxfenxxfenxfenxxfenxfenxxfenxxfenxfenxxfenxxfenxfenxxfenxfenxxfenxxfenxfenxxfenxfenxxfenxxfenxfenxxfenxxfenxfenxxfenxfenxxfenxxfenxfenxxfenxfenxxfenxxfenxfenxxfenxxfenxfenxxfenxfenxxfenxxfen...

output:

18736

result:

ok answer is '18736'

Test #72:

score: 0
Accepted
time: 0ms
memory: 9700kb

input:

boxtiboboxtiboxtiboboxtiboboxtiboxtiboboxtiboxtiboboxtiboboxtiboxtiboboxtiboboxtiboxtiboboxtiboxtiboboxtiboboxtiboxtiboboxtiboxtiboboxtiboboxtiboxtiboboxtiboboxtiboxtiboboxtiboxtiboboxtiboboxtiboxtiboboxtiboboxtiboxtiboboxtiboxtiboboxtiboboxtiboxtiboboxtiboxtiboboxtiboboxtiboxtiboboxtiboboxtiboxtibo...

output:

31221

result:

ok answer is '31221'

Test #73:

score: 0
Accepted
time: 2ms
memory: 7608kb

input:

jpktgmjpkjpktgmjpktgmjpkjpktgmjpkjpktgmjpktgmjpkjpktgmjpktgmjpkjpktgmjpkjpktgmjpktgmjpkjpktgmjpkjpktgmjpktgmjpkjpktgmjpktgmjpkjpktgmjpkjpktgmjpktgmjpkjpktgmjpktgmjpkjpktgmjpkjpktgmjpktgmjpkjpktgmjpkjpktgmjpktgmjpkjpktgmjpktgmjpkjpktgmjpkjpktgmjpktgmjpkjpktgmjpkjpktgmjpktgmjpkjpktgmjpktgmjpkjpktgmjpk...

output:

7211

result:

ok answer is '7211'

Test #74:

score: 0
Accepted
time: 2ms
memory: 7688kb

input:

xjacixxjacixjacixxjacixxjacixjacixxjacixjacixxjacixxjacixjacixxjacixxjacixjacixxjacixjacixxjacixxjacixjacixxjacixjacixxjacixxjacixjacixxjacixxjacixjacixxjacixjacixxjacixxjacixjacixxjacixxjacixjacixxjacixjacixxjacixxjacixjacixxjacixjacixxjacixxjacixjacixxjacixxjacixjacixxjacixjacixxjacixxjacixjacixxj...

output:

15400

result:

ok answer is '15400'

Test #75:

score: 0
Accepted
time: 2ms
memory: 9820kb

input:

upyzjupyupyzjupyzjupyupyzjupyupyzjupyzjupyupyzjupyzjupyupyzjupyupyzjupyzjupyupyzjupyupyzjupyzjupyupyzjupyzjupyupyzjupyupyzjupyzjupyupyzjupyzjupyupyzjupyupyzjupyzjupyupyzjupyupyzjupyzjupyupyzjupyzjupyupyzjupyupyzjupyzjupyupyzjupyupyzjupyzjupyupyzjupyzjupyupyzjupyupyzjupyzjupyupyzjupyzjupyupyzjupyupyz...

output:

8263

result:

ok answer is '8263'

Test #76:

score: 0
Accepted
time: 1ms
memory: 7688kb

input:

gkktrlbigkkgkktrlbigkktrlbigkkgkktrlbigkkgkktrlbigkktrlbigkkgkktrlbigkktrlbigkkgkktrlbigkkgkktrlbigkktrlbigkkgkktrlbigkkgkktrlbigkktrlbigkkgkktrlbigkktrlbigkkgkktrlbigkkgkktrlbigkktrlbigkkgkktrlbigkktrlbigkkgkktrlbigkkgkktrlbigkktrlbigkkgkktrlbigkkgkktrlbigkktrlbigkkgkktrlbigkktrlbigkkgkktrlbigkkgkk...

output:

54875

result:

ok answer is '54875'

Test #77:

score: 0
Accepted
time: 1ms
memory: 7544kb

input:

xlqepxlxlqepxlqepxlxlqepxlxlqepxlqepxlxlqepxlqepxlxlqepxlxlqepxlqepxlxlqepxlxlqepxlqepxlxlqepxlqepxlxlqepxlxlqepxlqepxlxlqepxlqepxlxlqepxlxlqepxlqepxlxlqepxlxlqepxlqepxlxlqepxlqepxlxlqepxlxlqepxlqepxlxlqepxlxlqepxlqepxlxlqepxlqepxlxlqepxlxlqepxlqepxlxlqepxlqepxlxlqepxlxlqepxlqepxlxlqepxlxlqepxlqepxl...

output:

31221

result:

ok answer is '31221'

Test #78:

score: 0
Accepted
time: 1ms
memory: 7748kb

input:

xowxoxowxowxoxowxoxowxowxoxowxowxoxowxoxowxowxoxowxoxowxowxoxowxowxoxowxoxowxowxoxowxowxoxowxoxowxowxoxowxoxowxowxoxowxowxoxowxoxowxowxoxowxoxowxowxoxowxowxoxowxoxowxowxoxowxowxoxowxoxowxowxoxowxoxowxowxoxowxowxoxowxoxowxowxoxowxowxoxowxoxowxowxoxowxoxowxowxoxowxowxoxowxoxowxowxoxowxoxowxowxoxowxowx...

output:

45954

result:

ok answer is '45954'

Test #79:

score: 0
Accepted
time: 2ms
memory: 9612kb

input:

uidltsuiduidltsuidltsuiduidltsuiduidltsuidltsuiduidltsuidltsuiduidltsuiduidltsuidltsuiduidltsuiduidltsuidltsuiduidltsuidltsuiduidltsuiduidltsuidltsuiduidltsuidltsuiduidltsuiduidltsuidltsuiduidltsuiduidltsuidltsuiduidltsuidltsuiduidltsuiduidltsuidltsuiduidltsuiduidltsuidltsuiduidltsuidltsuiduidltsuid...

output:

7211

result:

ok answer is '7211'

Test #80:

score: 0
Accepted
time: 0ms
memory: 9840kb

input:

itekrlititekrlitekrlititekrlititekrlitekrlititekrlitekrlititekrlititekrlitekrlititekrlititekrlitekrlititekrlitekrlititekrlititekrlitekrlititekrlitekrlititekrlititekrlitekrlititekrlititekrlitekrlititekrlitekrlititekrlititekrlitekrlititekrlititekrlitekrlititekrlitekrlititekrlititekrlitekrlititekrlitek...

output:

26901

result:

ok answer is '26901'

Test #81:

score: 0
Accepted
time: 3ms
memory: 9596kb

input:

qvytgqvyqvytgqvytgqvyqvytgqvyqvytgqvytgqvyqvytgqvytgqvyqvytgqvyqvytgqvytgqvyqvytgqvyqvytgqvytgqvyqvytgqvytgqvyqvytgqvyqvytgqvytgqvyqvytgqvytgqvyqvytgqvyqvytgqvytgqvyqvytgqvyqvytgqvytgqvyqvytgqvytgqvyqvytgqvyqvytgqvytgqvyqvytgqvyqvytgqvytgqvyqvytgqvytgqvyqvytgqvyqvytgqvytgqvyqvytgqvytgqvyqvytgqvyqvyt...

output:

8263

result:

ok answer is '8263'

Test #82:

score: 0
Accepted
time: 0ms
memory: 7692kb

input:

exkeleexkelexkeleexkeleexkelexkeleexkelexkeleexkeleexkelexkeleexkeleexkelexkeleexkelexkeleexkeleexkelexkeleexkelexkeleexkeleexkelexkeleexkeleexkelexkeleexkelexkeleexkeleexkelexkeleexkeleexkelexkeleexkelexkeleexkeleexkelexkeleexkelexkeleexkeleexkelexkeleexkeleexkelexkeleexkelexkeleexkeleexkelexkeleex...

output:

56061

result:

ok answer is '56061'

Test #83:

score: 0
Accepted
time: 2ms
memory: 9788kb

input:

kepkekepkepkekepkekepkepkekepkepkekepkekepkepkekepkekepkepkekepkepkekepkekepkepkekepkepkekepkekepkepkekepkekepkepkekepkepkekepkekepkepkekepkekepkepkekepkepkekepkekepkepkekepkepkekepkekepkepkekepkekepkepkekepkepkekepkekepkepkekepkepkekepkekepkepkekepkekepkepkekepkepkekepkekepkepkekepkekepkepkekepkepk...

output:

45954

result:

ok answer is '45954'

Test #84:

score: 0
Accepted
time: 2ms
memory: 9556kb

input:

whdmiwhdwhdmiwhdmiwhdwhdmiwhdwhdmiwhdmiwhdwhdmiwhdmiwhdwhdmiwhdwhdmiwhdmiwhdwhdmiwhdwhdmiwhdmiwhdwhdmiwhdmiwhdwhdmiwhdwhdmiwhdmiwhdwhdmiwhdmiwhdwhdmiwhdwhdmiwhdmiwhdwhdmiwhdwhdmiwhdmiwhdwhdmiwhdmiwhdwhdmiwhdwhdmiwhdmiwhdwhdmiwhdwhdmiwhdmiwhdwhdmiwhdmiwhdwhdmiwhdwhdmiwhdmiwhdwhdmiwhdmiwhdwhdmiwhdwhdm...

output:

8263

result:

ok answer is '8263'

Test #85:

score: 0
Accepted
time: 0ms
memory: 9856kb

input:

dkbqtcddkbqtcdkbqtcddkbqtcddkbqtcdkbqtcddkbqtcdkbqtcddkbqtcddkbqtcdkbqtcddkbqtcddkbqtcdkbqtcddkbqtcdkbqtcddkbqtcddkbqtcdkbqtcddkbqtcdkbqtcddkbqtcddkbqtcdkbqtcddkbqtcddkbqtcdkbqtcddkbqtcdkbqtcddkbqtcddkbqtcdkbqtcddkbqtcddkbqtcdkbqtcddkbqtcdkbqtcddkbqtcddkbqtcdkbqtcddkbqtcdkbqtcddkbqtcddkbqtcdkbqtcddk...

output:

13072

result:

ok answer is '13072'

Test #86:

score: 0
Accepted
time: 2ms
memory: 9616kb

input:

zwjmwzwjzwjmwzwjmwzwjzwjmwzwjzwjmwzwjmwzwjzwjmwzwjmwzwjzwjmwzwjzwjmwzwjmwzwjzwjmwzwjzwjmwzwjmwzwjzwjmwzwjmwzwjzwjmwzwjzwjmwzwjmwzwjzwjmwzwjmwzwjzwjmwzwjzwjmwzwjmwzwjzwjmwzwjzwjmwzwjmwzwjzwjmwzwjmwzwjzwjmwzwjzwjmwzwjmwzwjzwjmwzwjzwjmwzwjmwzwjzwjmwzwjmwzwjzwjmwzwjzwjmwzwjmwzwjzwjmwzwjmwzwjzwjmwzwjzwjm...

output:

45954

result:

ok answer is '45954'

Test #87:

score: 0
Accepted
time: 1ms
memory: 9728kb

input:

pjllpjpjllpjllpjpjllpjpjllpjllpjpjllpjllpjpjllpjpjllpjllpjpjllpjpjllpjllpjpjllpjllpjpjllpjpjllpjllpjpjllpjllpjpjllpjpjllpjllpjpjllpjpjllpjllpjpjllpjllpjpjllpjpjllpjllpjpjllpjpjllpjllpjpjllpjllpjpjllpjpjllpjllpjpjllpjllpjpjllpjpjllpjllpjpjllpjpjllpjllpjpjllpjllpjpjllpjpjllpjllpjpjllpjllpjpjllpjpjllpj...

output:

37179

result:

ok answer is '37179'

Test #88:

score: 0
Accepted
time: 2ms
memory: 7544kb

input:

iwohroiwoiwohroiwohroiwoiwohroiwoiwohroiwohroiwoiwohroiwohroiwoiwohroiwoiwohroiwohroiwoiwohroiwoiwohroiwohroiwoiwohroiwohroiwoiwohroiwoiwohroiwohroiwoiwohroiwohroiwoiwohroiwoiwohroiwohroiwoiwohroiwoiwohroiwohroiwoiwohroiwohroiwoiwohroiwoiwohroiwohroiwoiwohroiwoiwohroiwohroiwoiwohroiwohroiwoiwohroiwo...

output:

11666

result:

ok answer is '11666'

Test #89:

score: 0
Accepted
time: 1ms
memory: 11292kb

input:

knksknknksknksknknksknknksknksknknksknksknknksknknksknksknknksknknksknksknknksknksknknksknknksknksknknksknksknknksknknksknksknknksknknksknksknknksknksknknksknknksknksknknksknknksknksknknksknksknknksknknksknksknknksknksknknksknknksknksknknksknknksknksknknksknksknknksknknksknksknknksknksknknksknknkskn...

output:

1195845561

result:

ok answer is '1195845561'

Test #90:

score: 0
Accepted
time: 0ms
memory: 9684kb

input:

bzebzbzebzebzbzebzbzebzebzbzebzebzbzebzbzebzebzbzebzbzebzebzbzebzebzbzebzbzebzebzbzebzebzbzebzbzebzebzbzebzbzebzebzbzebzebzbzebzbzebzebzbzebzbzebzebzbzebzebzbzebzbzebzebzbzebzebzbzebzbzebzebzbzebzbzebzebzbzebzebzbzebzbzebzebzbzebzebzbzebzbzebzebzbzebzbzebzebzbzebzebzbzebzbzebzebzbzebzbzebzebzbzebzeb...

output:

45954

result:

ok answer is '45954'

Test #91:

score: 0
Accepted
time: 1ms
memory: 9844kb

input:

horqhhorqhorqhhorqhhorqhorqhhorqhorqhhorqhhorqhorqhhorqhhorqhorqhhorqhorqhhorqhhorqhorqhhorqhorqhhorqhhorqhorqhhorqhhorqhorqhhorqhorqhhorqhhorqhorqhhorqhhorqhorqhhorqhorqhhorqhhorqhorqhhorqhorqhhorqhhorqhorqhhorqhhorqhorqhhorqhorqhhorqhhorqhorqhhorqhorqhhorqhhorqhorqhhorqhhorqhorqhhorqhorqhhorqhhorq...

output:

18736

result:

ok answer is '18736'

Test #92:

score: 0
Accepted
time: 1ms
memory: 13584kb

input:

wuiuwuwuiuwuiuwuwuiuwuwuiuwuiuwuwuiuwuiuwuwuiuwuwuiuwuiuwuwuiuwuwuiuwuiuwuwuiuwuiuwuwuiuwuwuiuwuiuwuwuiuwuiuwuwuiuwuwuiuwuiuwuwuiuwuwuiuwuiuwuwuiuwuiuwuwuiuwuwuiuwuiuwuwuiuwuwuiuwuiuwuwuiuwuiuwuwuiuwuwuiuwuiuwuwuiuwuiuwuwuiuwuwuiuwuiuwuwuiuwuwuiuwuiuwuwuiuwuiuwuwuiuwuwuiuwuiuwuwuiuwuiuwuwuiuwuwuiuwu...

output:

1195983889

result:

ok answer is '1195983889'

Test #93:

score: 0
Accepted
time: 2ms
memory: 7596kb

input:

gbsssymgbsgbsssymgbsssymgbsgbsssymgbsgbsssymgbsssymgbsgbsssymgbsssymgbsgbsssymgbsgbsssymgbsssymgbsgbsssymgbsgbsssymgbsssymgbsgbsssymgbsssymgbsgbsssymgbsgbsssymgbsssymgbsgbsssymgbsssymgbsgbsssymgbsgbsssymgbsssymgbsgbsssymgbsgbsssymgbsssymgbsgbsssymgbsssymgbsgbsssymgbsgbsssymgbsssymgbsgbsssymgbsgbsssy...

output:

35577

result:

ok answer is '35577'

Test #94:

score: 0
Accepted
time: 2ms
memory: 7600kb

input:

iksikiksiksikiksikiksiksikiksiksikiksikiksiksikiksikiksiksikiksiksikiksikiksiksikiksiksikiksikiksiksikiksikiksiksikiksiksikiksikiksiksikiksikiksiksikiksiksikiksikiksiksikiksiksikiksikiksiksikiksikiksiksikiksiksikiksikiksiksikiksiksikiksikiksiksikiksikiksiksikiksiksikiksikiksiksikiksikiksiksikiksiksi...

output:

45954

result:

ok answer is '45954'

Test #95:

score: 0
Accepted
time: 2ms
memory: 7600kb

input:

dtgjddtgjdtgjddtgjddtgjdtgjddtgjdtgjddtgjddtgjdtgjddtgjddtgjdtgjddtgjdtgjddtgjddtgjdtgjddtgjdtgjddtgjddtgjdtgjddtgjddtgjdtgjddtgjdtgjddtgjddtgjdtgjddtgjddtgjdtgjddtgjdtgjddtgjddtgjdtgjddtgjdtgjddtgjddtgjdtgjddtgjddtgjdtgjddtgjdtgjddtgjddtgjdtgjddtgjdtgjddtgjddtgjdtgjddtgjddtgjdtgjddtgjdtgjddtgjddtgj...

output:

18736

result:

ok answer is '18736'

Test #96:

score: 0
Accepted
time: 0ms
memory: 7720kb

input:

lrtrmdablrtlrtrmdablrtrmdablrtlrtrmdablrtlrtrmdablrtrmdablrtlrtrmdablrtrmdablrtlrtrmdablrtlrtrmdablrtrmdablrtlrtrmdablrtlrtrmdablrtrmdablrtlrtrmdablrtrmdablrtlrtrmdablrtlrtrmdablrtrmdablrtlrtrmdablrtrmdablrtlrtrmdablrtlrtrmdablrtrmdablrtlrtrmdablrtlrtrmdablrtrmdablrtlrtrmdablrtrmdablrtlrtrmdablrtlrt...

output:

31968

result:

ok answer is '31968'

Test #97:

score: 0
Accepted
time: 2ms
memory: 7740kb

input:

omeuomomeuomeuomomeuomomeuomeuomomeuomeuomomeuomomeuomeuomomeuomomeuomeuomomeuomeuomomeuomomeuomeuomomeuomeuomomeuomomeuomeuomomeuomomeuomeuomomeuomeuomomeuomomeuomeuomomeuomomeuomeuomomeuomeuomomeuomomeuomeuomomeuomeuomomeuomomeuomeuomomeuomomeuomeuomomeuomeuomomeuomomeuomeuomomeuomeuomomeuomomeuom...

output:

37179

result:

ok answer is '37179'

Test #98:

score: 0
Accepted
time: 5ms
memory: 13560kb

input:

mimmimimmimmimimmimimmimmimimmimmimimmimimmimmimimmimimmimmimimmimmimimmimimmimmimimmimmimimmimimmimmimimmimimmimmimimmimmimimmimimmimmimimmimimmimmimimmimmimimmimimmimmimimmimmimimmimimmimmimimmimimmimmimimmimmimimmimimmimmimimmimmimimmimimmimmimimmimimmimmimimmimmimimmimimmimmimimmimimmimmimimmimm...

output:

853689483

result:

ok answer is '853689483'

Test #99:

score: 0
Accepted
time: 1ms
memory: 11232kb

input:

eleeeeleeeleeeeleeeeleeeleeeeleeeleeeeleeeeleeeleeeeleeeeleeeleeeeleeeleeeeleeeeleeeleeeeleeeleeeeleeeeleeeleeeeleeeeleeeleeeeleeeleeeeleeeeleeeleeeeleeeeleeeleeeeleeeleeeeleeeeleeeleeeeleeeleeeeleeeeleeeleeeeleeeeleeeleeeeleeeleeeeleeeeleeeleeeeleeeleeeeleeeeleeeleeeeleeeeleeeleeeeleeeleeeeleeeelee...

output:

975625225

result:

ok answer is '975625225'

Test #100:

score: 0
Accepted
time: 2ms
memory: 7852kb

input:

eedmeeeedmeedmeeeedmeeeedmeedmeeeedmeedmeeeedmeeeedmeedmeeeedmeeeedmeedmeeeedmeedmeeeedmeeeedmeedmeeeedmeedmeeeedmeeeedmeedmeeeedmeeeedmeedmeeeedmeedmeeeedmeeeedmeedmeeeedmeeeedmeedmeeeedmeedmeeeedmeeeedmeedmeeeedmeedmeeeedmeeeedmeedmeeeedmeeeedmeedmeeeedmeedmeeeedmeeeedmeedmeeeedmeedmeeeedmeeeedmee...

output:

74358

result:

ok answer is '74358'

Subtask #2:

score: 65
Accepted

Dependency #1:

100%
Accepted

Test #101:

score: 65
Accepted
time: 11ms
memory: 9644kb

input:

jwjhtmjwjjwjhtmjwjhtmjwjjwjhtmjwjjwjhtmjwjhtmjwjjwjhtmjwjhtmjwjjwjhtmjwjjwjhtmjwjhtmjwjjwjhtmjwjjwjhtmjwjhtmjwjjwjhtmjwjhtmjwjjwjhtmjwjjwjhtmjwjhtmjwjjwjhtmjwjhtmjwjjwjhtmjwjjwjhtmjwjhtmjwjjwjhtmjwjjwjhtmjwjhtmjwjjwjhtmjwjhtmjwjjwjhtmjwjjwjhtmjwjhtmjwjjwjhtmjwjjwjhtmjwjhtmjwjjwjhtmjwjhtmjwjjwjhtmjwj...

output:

2832804

result:

ok answer is '2832804'

Test #102:

score: 0
Accepted
time: 8ms
memory: 8716kb

input:

lrexllrexlrexllrexllrexlrexllrexlrexllrexllrexlrexllrexllrexlrexllrexlrexllrexllrexlrexllrexlrexllrexllrexlrexllrexllrexlrexllrexlrexllrexllrexlrexllrexllrexlrexllrexlrexllrexllrexlrexllrexlrexllrexllrexlrexllrexllrexlrexllrexlrexllrexllrexlrexllrexlrexllrexllrexlrexllrexllrexlrexllrexlrexllrexllrex...

output:

535320

result:

ok answer is '535320'

Test #103:

score: 0
Accepted
time: 15ms
memory: 117792kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

148148592592925926

result:

ok answer is '148148592592925926'

Test #104:

score: 0
Accepted
time: 12ms
memory: 11268kb

input:

abbbbabbabaaaaaabaabbabaabbabbbbbbaabababaabbbababbbababaaababaabbabbaabbabaabbbaabaabbbbbbbaaabbbbbbaaaababbaaabbabaababbbaababaabbaababbaaaabbaaabbabaaaaabbbbbaaabbaaaabaababbabaaabbabaabaabaabbbbbbbbbbabaabbabbabbaabbaaaaabbaabaaababbbaabbbababbbbababaaabababaabbabaabbbaabaaaaaabaababbbababbbabba...

output:

1128537

result:

ok answer is '1128537'

Test #105:

score: 0
Accepted
time: 11ms
memory: 9080kb

input:

cabaccaaacbbbbbbccccbbaccababcbacbcaacacbbcbccacbbccccaccabbaccbcbbaabbbaaabaaaaccbabccccbbacbcabcbabbabaccaaccacabacccabccccbacbcbcbaacbcccaaacbbbccacaacaccbbbacbaacabbcaacbacacccabbcbbcaccabbbabcabaaabcaaababcabacbabacbcabccbaccabacbcabccacbcbbaacbcacabbcaaaabcaaacbaaaacbacacaaabcbcccbbcccccaccabb...

output:

448552

result:

ok answer is '448552'

Test #106:

score: 0
Accepted
time: 7ms
memory: 11052kb

input:

bcadcacbcbbdbbbdcddbababdcacdcdccbadccddadadabdbbacdbbadbbccadacdcadbccdbcdabbacddadddbdaadddcaccdbbddaadadcacddcccdccdcccdcbbacaaadcabdadcabcabbadcdaddcccccaaddcdcabbdddbbaddaddcbabdcaddaddbbdcccbcccbcddbdacbcbaabacaaddbadbcdadbcddbdacaacdadbaccdbdcbababbbbcccbbbccacaccbabdbcbcaabbcabdcdccccbcccbdb...

output:

250704

result:

ok answer is '250704'

Test #107:

score: 0
Accepted
time: 12ms
memory: 9152kb

input:

cbcdbbbdadeddeebdeceebecbacbedbabccbdaedcbdabdbaeedddcaaeeeecdbedddebecbbceabbdeedeecceeeaaddebebcbdaabdcccbeeadeaeebabebcaccbebaaadddcccbbbbedacbbbeaaaaccdcebdbdddeabadcacabddaadbbcdadaadadedbeadbeaeebcdeceabbecaddaeaababbceddeeeecbebaeeaabbcbddedeaeeaaeaaaebaeaaaababababcdbaddbcbcbeabedacacddbddeb...

output:

200964

result:

ok answer is '200964'

Test #108:

score: 0
Accepted
time: 12ms
memory: 10840kb

input:

bdaeabeacfcceaaebdcdfabeaeadfbecaefbfbfacdceaaedfbbcfbfcbcebcbdbfdafcaaceecaaacdafdbfeeaadcdbdcedbcffcadacdfeeaecbfddffafbbdcbddafddeaeeebdcfccbbffddcddbffdedcbeaffdaddecfbbbbeadbaacbdeeabedbdffccabdacbacfdabccceffebcafccbbffebaeeeafbaccdeaddfdfdaffabeebbfafdfbfdaeeebdacbedbcefffcfafbcefacfdaddfacad...

output:

167202

result:

ok answer is '167202'

Test #109:

score: 0
Accepted
time: 7ms
memory: 10308kb

input:

bfbdebfgfbeabcgdgfgdbceacffcbbecfbegefaeceadebdfbgdfdcebdaeecfdfefffbafgceaggacdedfbbgccbgcefebfdddbfafbfcebdgefdddbeddbgdefffaagecgcdfbbabeedcebdcgbfeccebceacffdbbegbfbdcbdfdagcdfeeagdbcfecedebfddeacegdccfgdggdacfagbdccgfaffcaabfdgbcfgccgadfcegfdcagbcbddagfdcdegdagabbcegeccafccbcdacfddgebbgcfgfeeec...

output:

143591

result:

ok answer is '143591'

Test #110:

score: 0
Accepted
time: 15ms
memory: 10520kb

input:

cbcbfgccdfecaachfagfhageeabccaedhaaabcbbeebhaechgbdhbhbfddfhgbfdbhbccacdggfhdbffgecffdgbbfacdafdahcdaahfbhfadeaddchcgcgdgfcceegehehcddecbgcdhehfddhcaedhdhbfbfghgfgccddbdfdhbgdbbcbaaegbaahfdcdfhbhedfechhbdghhbfedeffcfggeefhcghacgghecfafcgefcccdebfegeffdhhdghfcefedecefdecfgdhcbeacfceagdceeghefagafbcdh...

output:

125609

result:

ok answer is '125609'

Test #111:

score: 0
Accepted
time: 15ms
memory: 10548kb

input:

iibhhicgiefababhcfdgdgfbhfaeieicebceadddeeidicbgfeideaaihidffhabebdghghhhcfifhfiheafebebfehcdciaeahfigehihefegedhbffbcfgabcdfddcdcdegdfhidcdgiehgfchcfciidhhcdeagiheadefhfegfcdchcifgbiihbeececdcciacacchfchchdceagabaedefbbiafafaedagegcdadihhcddhhagibeggcdaicgbffifegeeiehhedaafiafaahecigdhbbaciebbcihfd...

output:

111691

result:

ok answer is '111691'

Test #112:

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

input:

ghfjfffahhjcffibfijbffcdjieihcbfhdgiiihgaedbbbbejdgcadebbfgbjjdfjccjidedicdgchjbccaehejgcdhbhecbgadaigfigjdgfdcihiggdiadcfjdjjiccibcbdjhgcjcffagfjejgcdfghfiffbbchjaejaibbgbagaegiafcbeffdehegdbgdibbjcjdbigddbdjgfcfejgijgajdcbdjfdeieheeigidjegebbhggcjiccaajebdgchecbfhaabhighiebffhfiijabbbehchhdiagbfaf...

output:

100298

result:

ok answer is '100298'

Test #113:

score: 0
Accepted
time: 7ms
memory: 10456kb

input:

ebkffdechjeggikjcigikihiabjeabifdeicffjhagakhcchgfbfjeiiefgcgidgdcbfkgeechbcgiiecaaabgghebkkgfkjdgefhadkgbhdegbaigeeajbheajhhfjbjbdkibcjigigicichcibjbahecafkdeahjhcfgibfhacddjihkgcbjbakkhbhbajaddhbfhidcjkgdfechajgbheejdgffddjffccedaccedjighgkbacfhchjgbkhhcjjakbhhcegccbaidhifbkjhbgjhfekebakahbdifjeeg...

output:

91269

result:

ok answer is '91269'

Test #114:

score: 0
Accepted
time: 9ms
memory: 10620kb

input:

cblbfflebclliaaegihadfcidhchelhebfbffcjclicgledbggfficgahcakkbcbkjlbjgjeelkfiedklccjbifdjcjfkegkjadgkbidefikcjikbkfbkecdchcjejkhiebchhggdcdhbigikllbhhafeijkjfjabdgjbbjkkebfifecfciljgalffdaddflagfebfhccfbicegjlighlihbchkihgefdibhglbhbegdcflekafkclhihlhjbagljgaalklbelihelagjlhjfcjccafbfiaecgjikjeekacj...

output:

84019

result:

ok answer is '84019'

Test #115:

score: 0
Accepted
time: 14ms
memory: 10432kb

input:

ajkelheffflcgeibfjjmmamkfmbchgjmighddcjadjbheelifbkhjebgjkhigddbigagichblliilcbefmlbbjckamlafiiieichelkfdiajafiamlmjgfbhjmkchigjcdjgkhjamihebdbkdegbmmhdjjajceefhkimkdljlkbkhkhhilfimjkfeikcgdkgjehaddicgejmjbccaalailfmimekfimggigfigakfimmdbgcbaaigcldkmfcjfglaehaaaelmajjemfbfehdfcaiblhljhfffflekldfgdck...

output:

77483

result:

ok answer is '77483'

Test #116:

score: 0
Accepted
time: 14ms
memory: 8972kb

input:

celcfehjelgbmlighjecmblmllafdbhcmngkekhnaaigbklbegafgnhahnmgdciiglimjidnegnhballbiclbckjegikggmnhikelkcdnclacndmfaigagcklcejccfnhmibnkekkbbjmhblcfjjhajgfblincngdagibhemcdbfngjlgegkmaldmkleaemklklmcifmeaaicdmcjdbbfkcdacbalklkkmghbkelbjehnmfjgjkcgmnlnibiiinmlldikfecjgimhndgcgffnglmdfbihhginfhnnmdjngkj...

output:

71704

result:

ok answer is '71704'

Test #117:

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

input:

jkaacaeheeegbnhkfccaalbbmiggbmimbhmcagjgafifbclgkebboaibbdllehdjhlkojakajjbllgcmnojfedjbfbcfdcidhhbfilkhfkgnbncgoboeadbliflchakahklbhnhbflncjimbklbmegjokdhonoagcndooiclbihfhnbllbgfiheecfbmhfjkbbecghlddmikgnkdciihnannoedbjbemjakfegonnnibbfmekellalhbodhjmgbbhcjndcmmginhahdjlkdjajangllgehgblgonblacmnjh...

output:

67081

result:

ok answer is '67081'

Test #118:

score: 0
Accepted
time: 14ms
memory: 10904kb

input:

mnkinpdmfhgogdkjlacmlgjniagdfnbjiigjhldpcgeekibcjkfhpdojhmiaodecgincgkpmepcghbphmpincghlpjdpibnnomgggoodahmllcekideplbacihkjhpbmbhpfadcngkafonkhgeenkplpoapihnbocjeoonoekmemiocnigffegbmdkkaokphjfphacgncohjpeidodoajlfcbeiboflmoigganddimkfjifbcgegfopbjbpileacoidabnlokkaohoclhgpjboliofehnemmdkgednbloele...

output:

62928

result:

ok answer is '62928'

Test #119:

score: 0
Accepted
time: 14ms
memory: 8880kb

input:

edklplibffiapddpclkfkabqgmeidgbhqpoqmqpbbiikagnqjmjgclgimlhalnnpklgjofmknnplmkokqdpodjpcilndfnnmjafogqmdghnmqphajcqojfhfqnqdpcnkgckifjnfjimqgdbdojhclgicldhdioaldloinkjflddmakkmhqoancjagffeeijqneocqcbmaphcmoagglbdpqpqddkccigfghaakghookkjenadooodbpipfheomnqaghoegffcaqmpignckhcledfcdalliihmloildjccifcq...

output:

59153

result:

ok answer is '59153'

Test #120:

score: 0
Accepted
time: 14ms
memory: 10388kb

input:

pdpbmcmafradmbelqjkrnedekmdnamkafjnllnkgbiaglcfhmiladhkgqppeficrnaqngcdcojhdmdrcifnflbolgjkpncncjirqlargkrflceqkjrpromkgdhngngcfffnqnjaomckeigoqhhlncammjffbajrdkdhamaanebcpfdciroaagblmclgfhhffareggbjibdfeipmcgkdoebgddjdpaerfpkhjogprogjjkhpkkjbrkiofncalaliogrdeononlihaqhcaproofdplpapkjbolmprljgjmcomo...

output:

56181

result:

ok answer is '56181'

Test #121:

score: 0
Accepted
time: 8ms
memory: 8876kb

input:

fldrqrddichoqlkbeicnjbqdrgndpihnhjcrepgfkgrakqsadeirjerhslhqaqdjafrnnqflfqgadhoolpprksqrqohmjekdngaqqegsorbmmmicbdicnahaairlrriamfmpfogprdgbimbfgdbmgfdmeeipgsspnncrlglsnbnpponrkqsqfeigahomqojqbcemmbddidjcmomhsoackicflcsjhhdeenhijrosrkhkcrjdlamermnnlsjhfsahgscscbskfqrmicsceoqegcehlieobonlkikdqfbbbflo...

output:

53046

result:

ok answer is '53046'

Test #122:

score: 0
Accepted
time: 9ms
memory: 10848kb

input:

iigioepemfdendcjhoikjkbmqcpdsqdcbarqrcamenctecpajdmfbsabaqaarctmpnandfestgjnhdbsokksljcsnfaemlpegfhfcnbpoopfqqfsifaojpmdoalpekdcfhmgrfdpatcfrbmlsffrkokfctqqsgbsqhkkcnprlikrlesjmqhdmcrejnsedieqrtqdqkostgqqggrphasiegkgcljmrqoirggrfrcjsgantphbfblorcbkfgtbjnmnspaiftebtbpoaiastmlcsoasboidrddbciffhonardch...

output:

50258

result:

ok answer is '50258'

Test #123:

score: 0
Accepted
time: 13ms
memory: 10436kb

input:

tgukkbdtlcmqrbrmroimjfjfkgagipjhmcetnqbbepkcfejqdsuhbtjfuhcqgnssjhpdtgegojtekqfgqamjlcrblsfljegfdukqijrcmnacjqumebkhokemmeiqeshseohihjseubtjkmkseocoiupepghtbulkanjofpqmcogesgbghpptiokcgfhclofiegrtriokfoajdkaodcsnddteobpplnhoioimchlmkqkgulikdokcsbintfninlqocselojgguboktpshpcgaticgpjntqfugdrsanmmkagmc...

output:

48082

result:

ok answer is '48082'

Test #124:

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

input:

gofskatgavmqhopgdduitcokqavlvgiceglfokrtcalchjckqiljrtsjtddnvfqgjlgcetsjdbptruclgvipptgsrtascpvtpeftuieunijoedtendteegubfuirfrpnoecrhopbdvugrefqtmbiashkkurgktldpopeuoafhnooaihrglooubemmtscvroulvfkbgdssjiblpahfchhdudjpglnpghukcesplmrfpsfpqkoiljinqaqspbshcceacnafdolireckcibajtdljgjbaffkcdvvumudbsasujm...

output:

45842

result:

ok answer is '45842'

Test #125:

score: 0
Accepted
time: 14ms
memory: 10672kb

input:

revervthrvdkwauhhnromjooeoctnpbvvmilwdeewltbmtjntegeoekwwrstoelbhvjobpeplbshjvdihdlegjidqvihhaapqgdfogokjignpmerpietrudcbrqgesibiteosmlinddsmwogfhigojrqnjoebpevurolkknsmotvlrbrjsksiiklnpwhlunrbguerhjhjbhnguasfmvihuumwbfgorecjacdnlvlibohwbjkscshgrmuissdprobarmnqoftggibqscnagbrdogvjbvjmithdfhsgcarvsem...

output:

44052

result:

ok answer is '44052'

Test #126:

score: 0
Accepted
time: 3ms
memory: 8632kb

input:

aaaaaaaaaaaaaaaajievpaaaaaaaaaaaaaaaajievpaaaaaaaaaaaaaaaajievpaaaaaaaaaaaaaaaajievpaaaaaaaaaaaaaaaajievpaaaaaaaaaaaaaaaajievpaaaaaaaaaaaaaaaajievpaaaaaaaaaaaaaaaajievpdthegndqiehepaaaaaaaaaaaaaaaajievpaaaaaaaaaaaaaaaajievpaaaaaaaaaaaaaaaajievpaaaaaaaaaaaaaaaajievpaaaaaaaaaaaaaaaajievpaaaaaaaaaaaaaa...

output:

30840117

result:

ok answer is '30840117'

Test #127:

score: 0
Accepted
time: 6ms
memory: 8728kb

input:

aaaaaaaaiqgaaaaaaaaiqgaaaaaaaaiqgaaaaaaaaiqgsafybzvaaaaaaaaiqgaaaaaaaaiqgaaaaaaaaiqgaaaaaaaaiqgsafybzvslovwurdrsdaaaaaaaaiqgaaaaaaaaiqgaaaaaaaaiqgaaaaaaaaiqgsafybzvaaaaaaaaiqgaaaaaaaaiqgaaaaaaaaiqgaaaaaaaaiqgsafybzvslovwurdrsdaaaaaaaaiqgaaaaaaaaiqgaaaaaaaaiqgaaaaaaaaiqgsafybzvaaaaaaaaiqgaaaaaaaaiqga...

output:

7354368

result:

ok answer is '7354368'

Test #128:

score: 0
Accepted
time: 12ms
memory: 8660kb

input:

aaaaaaaaaaaaaaaapyiizaaaaaaaaaaaaaaaapyiizaaaaaaaaaaaaaaaapyiizaaaaaaaaaaaaaaaapyiizxwatnwjhzhaaaaaaaaaaaaaaaapyiizaaaaaaaaaaaaaaaapyiizaaaaaaaaaaaaaaaapyiizaaaaaaaaaaaaaaaapyiizxwatnwjhzhaaaaaaaaaaaaaaaapyiizaaaaaaaaaaaaaaaapyiizaaaaaaaaaaaaaaaapyiizaaaaaaaaaaaaaaaapyiizxwatnwjhzhaaaaaaaaaaaaaaaapy...

output:

29435670

result:

ok answer is '29435670'

Test #129:

score: 0
Accepted
time: 12ms
memory: 8772kb

input:

aaaaaaaahfvaaaaaaaahfvaaaaaaaahfvaaaaaaaahfvaaaaaaaahfvaaaaaaaahfvaaaaaaaahfvaaaaaaaahfvckufalnlyzaaaaaaaahfvaaaaaaaahfvaaaaaaaahfvaaaaaaaahfvaaaaaaaahfvaaaaaaaahfvaaaaaaaahfvaaaaaaaahfvckufalnlyzaaaaaaaahfvaaaaaaaahfvaaaaaaaahfvaaaaaaaahfvaaaaaaaahfvaaaaaaaahfvaaaaaaaahfvaaaaaaaahfvckufalnlyzaaaaaa...

output:

8396028

result:

ok answer is '8396028'

Test #130:

score: 0
Accepted
time: 5ms
memory: 8624kb

input:

aaaaaaaajbjaaaaaaaajbjaaaaaaaajbjaaaaaaaajbjaaaaaaaajbjaaaaaaaajbjaaaaaaaajbjaaaaaaaajbjfxnfcftnpfaaaaaaaajbjaaaaaaaajbjaaaaaaaajbjaaaaaaaajbjaaaaaaaajbjaaaaaaaajbjaaaaaaaajbjaaaaaaaajbjfxnfcftnpfaaaaaaaajbjaaaaaaaajbjaaaaaaaajbjaaaaaaaajbjaaaaaaaajbjaaaaaaaajbjaaaaaaaajbjaaaaaaaajbjfxnfcftnpfaaaaaa...

output:

112152033

result:

ok answer is '112152033'

Test #131:

score: 0
Accepted
time: 12ms
memory: 8668kb

input:

aaaabswaaaabswaaaabswaaaabswkkpaeeaaaabswaaaabswaaaabswaaaabswkkpaeeaaaabswaaaabswaaaabswaaaabswkkpaeeaaaabswaaaabswaaaabswaaaabswkkpaeeaaaabswaaaabswaaaabswaaaabswkkpaeeaaaabswaaaabswaaaabswaaaabswkkpaeeaaaabswaaaabswaaaabswaaaabswkkpaeeaaaabswaaaabswaaaabswaaaabswkkpaeeaaaabswaaaabswaaaabswaaaabsw...

output:

1965708

result:

ok answer is '1965708'

Test #132:

score: 0
Accepted
time: 6ms
memory: 10728kb

input:

aaaawzjaaaawzjaaaawzjaaaawzjaaaawzjaaaawzjaaaawzjaaaawzjaaaawzjaaaawzjaaaawzjaaaawzjaaaawzjaaaawzjaaaawzjaaaawzjqxcxqzjuhvzaaaawzjaaaawzjaaaawzjaaaawzjaaaawzjaaaawzjaaaawzjaaaawzjaaaawzjaaaawzjaaaawzjaaaawzjaaaawzjaaaawzjaaaawzjaaaawzjqxcxqzjuhvzaaaawzjaaaawzjaaaawzjaaaawzjaaaawzjaaaawzjaaaawzjaaaaw...

output:

2267928

result:

ok answer is '2267928'

Test #133:

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

input:

aaaahvkaaaahvkaaaahvkaaaahvkaaaahvkaaaahvkaaaahvkaaaahvkiuadbspfaaaahvkaaaahvkaaaahvkaaaahvkaaaahvkaaaahvkaaaahvkaaaahvkiuadbspfaaaahvkaaaahvkaaaahvkaaaahvkaaaahvkaaaahvkaaaahvkaaaahvkiuadbspfaaaahvkaaaahvkaaaahvkaaaahvkaaaahvkaaaahvkaaaahvkaaaahvkiuadbspfaaaahvkaaaahvkaaaahvkaaaahvkaaaahvkaaaahvkaa...

output:

2122308

result:

ok answer is '2122308'

Test #134:

score: 0
Accepted
time: 7ms
memory: 8668kb

input:

gffagfffdcfgegedfabgdggfedgbffggfeadbagecdeefffbebdggfedgbffbbeadcceggdfcegaaeecdcbbbcacgfbdggcffabbdcbbbcacgfebcgadeagbcedbebbgcebaffeadcgefdagaafeabbcddeaaeadeceadcdgbedccdaaadgdbbeadcceggafcdgdcfccgaebcdeddfeagecbeedgebcgadeagbdfcegaaeececeadcdgbefegfbafabgdcdddfagaeeffebcdbggefbdfcgebedggfedgbff...

output:

173974

result:

ok answer is '173974'

Test #135:

score: 0
Accepted
time: 9ms
memory: 8744kb

input:

deabafdbfcffddgcdffdccfdcgdeefefeadddfgbbabdcaedbgbadaadcbgbafcbbcafdcdbdfdgcbbebabdcaedbggafcbfadagccfdcgdeefcggccbgbcddbffbdfabecadceccdbcdfdacgfdabffddgcdffdacffdecbggegaacbeecabadaadcbgbccfdcgdeefgaebefbfbgafgdbgabcdbefdfefadaffddgcdffdgcfcgegdbgbgcdbbdggfafcbbcafdccadceccdbcfgdfbddfbeafgdbgabcd...

output:

171917

result:

ok answer is '171917'

Test #136:

score: 0
Accepted
time: 15ms
memory: 10160kb

input:

efaebfagebfeaadffcaagedcaddffcbdgaabdgbedfbcfbeeageffeffcbdfdacgebfeccffbggebefcegcgcdagdagegcdbbabbcfcdacgbcagegcdbbabbcfcdacgbcaggebbcddbaffaggdeccefdafgdcdeeeabfdebecbbgecbbaebaafbbddfgdbefaebfagebcbagagfdaafcagdabcefgedcaddffccfdccfggdbefgfebbfcaefaebfagebgaaeeaddeaagdacfcffffdafgdcdeeadgefaagce...

output:

168365

result:

ok answer is '168365'

Test #137:

score: 0
Accepted
time: 11ms
memory: 8744kb

input:

ddfcaccgddcfbgddcbgcbcgefadacdbaagaeecdgcdcdacbcfgfffgfaebbaaegebbaceegdbbdcbdddcfbgddcbgcbfbcgeeaabcfbgddcbgcedbffafbedececcgfabbbcgefadacdebfcedfadceadbcebecaaggfdggbfeeadbcebecafecgbgdddfacafffbddbddaegfaaafcdggbeggadabccddbgcfeegfcdfbdgcdbgagacccbabbagaegababcaaccebggcdcggabdcdcdacbcfgaedafgaceg...

output:

155588

result:

ok answer is '155588'

Test #138:

score: 0
Accepted
time: 7ms
memory: 8792kb

input:

beecffageffcbcbeaaceeffadaafedacdacdfgffegebffeggefefdbaaddfdbgbdabegagebacabaecgebffebdfbcgdgaffegegbccagfbacfbbcdbbebebecdecfaeacfdcbgbgggdbcegdebcfdagggbbffefcgccbegfbeadceeebfcdbcegdebcfccdgedfdfeddabecbedefcgcbafegcegegdfceafeffadaafeddddadagaedcfdcbgbgggcfaabefacafaabaeedeabfbcdgfdfbfcgccbegfb...

output:

170696

result:

ok answer is '170696'

Test #139:

score: 0
Accepted
time: 9ms
memory: 9924kb

input:

fbafeddecbgaebgfefddcbebgbbedeacgefcggdeeaafegacbbcbebgbbedeafcggcbfbgccgffgdffbcbecddeegdcageadbbbaggddfdbdacgbcefegbbbfgfdgcecafgbfgadeeggggafgdaddbeaafegacbbcdfgeeffdecdaebggcffegcbebabfabfagfebdcgdabfbfefcgabccbacbffdfcaacccefgeaffeegggabccbacbffbegegdagdbfdcbfaeaeaabeegbgcdaacaacfdbacccfgbgefef...

output:

168524

result:

ok answer is '168524'

Test #140:

score: 0
Accepted
time: 14ms
memory: 8560kb

input:

agdgfebgfbgbeabbffedaffcaagceeecdbaddbaeddadadfafdgagfabffdeddadadfafdgagfabffdecgcgcefbebgagfabffdefedcfdgbcgbffddedafabcgeabcdeeaegcebggfcbeddbagafcbebcggdfddafedcaadbeebffafecgbfbafcfagffeafgbafacadcbbdgdeeggagfabffdebeddbagafcgdbdfcecbggefacaaffbfcaacfegaccfbcdacfggbefgbddcabbgdacdgfadbbafgbfead...

output:

164232

result:

ok answer is '164232'

Extra Test:

score: 0
Extra Test Passed