QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#545653#1242. Broken lineship2077AC ✓62ms5700kbC++14719b2024-09-03 15:56:362024-09-03 15:56:38

Judging History

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

  • [2024-09-03 15:56:38]
  • 评测
  • 测评结果:AC
  • 用时:62ms
  • 内存:5700kb
  • [2024-09-03 15:56:36]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
constexpr int M=3e5+5;
string str;vector<int>pos[17];
int n;long long ans,sum[17][17];
int main(){
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    cin>>str;n=str.length();
	for (int i=0;i<n;i++) pos[str[i]-'a'].emplace_back(i);
	for (int i=0;i<16;i++)
		for (int j=0;j<16;j++){
			if (i==j) continue;
			for (int k=0,p=0;k<pos[i].size();k++){
				while (p<pos[j].size()&&pos[j][p]<pos[i][k]) p++;
				sum[i][j]+=p;
			}
		}
	for (int sta=0;sta<1<<16;sta++){
		long long rec=0;
		for (int i=0;i<16;i++) if (sta>>i&1)
			for (int j=0;j<16;j++) if (~sta>>j&1)
				rec+=sum[i][j];
		ans=max(ans,rec);
	}
	printf("%lld\n",ans);
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 23ms
memory: 3848kb

input:

banan

output:

5

result:

ok answer is '5'

Test #2:

score: 0
Accepted
time: 23ms
memory: 3792kb

input:

abcdefghijklmnopaaaa

output:

90

result:

ok answer is '90'

Test #3:

score: 0
Accepted
time: 23ms
memory: 3848kb

input:

a

output:

0

result:

ok answer is '0'

Test #4:

score: 0
Accepted
time: 22ms
memory: 3852kb

input:

pp

output:

0

result:

ok answer is '0'

Test #5:

score: 0
Accepted
time: 23ms
memory: 3876kb

input:

pa

output:

1

result:

ok answer is '1'

Test #6:

score: 0
Accepted
time: 23ms
memory: 3780kb

input:

abc

output:

2

result:

ok answer is '2'

Test #7:

score: 0
Accepted
time: 20ms
memory: 3912kb

input:

ede

output:

1

result:

ok answer is '1'

Test #8:

score: 0
Accepted
time: 23ms
memory: 3864kb

input:

ooo

output:

0

result:

ok answer is '0'

Test #9:

score: 0
Accepted
time: 23ms
memory: 3836kb

input:

fnod

output:

4

result:

ok answer is '4'

Test #10:

score: 0
Accepted
time: 19ms
memory: 3852kb

input:

abbaa

output:

4

result:

ok answer is '4'

Test #11:

score: 0
Accepted
time: 23ms
memory: 3796kb

input:

baabbb

output:

6

result:

ok answer is '6'

Test #12:

score: 0
Accepted
time: 23ms
memory: 3816kb

input:

ccababa

output:

10

result:

ok answer is '10'

Test #13:

score: 0
Accepted
time: 23ms
memory: 3868kb

input:

bababbdaee

output:

20

result:

ok answer is '20'

Test #14:

score: 0
Accepted
time: 23ms
memory: 3844kb

input:

djbecjaiccfhdiihhjh

output:

76

result:

ok answer is '76'

Test #15:

score: 0
Accepted
time: 19ms
memory: 3852kb

input:

adaaaadddbcdadcdaddbcdccabbddcdbddabbbbb

output:

293

result:

ok answer is '293'

Test #16:

score: 0
Accepted
time: 23ms
memory: 3848kb

input:

blpeledhbcafdfeiecmcndheagipefkfconkjldniedkacllaknlpagklpemgfkmcjlfcdogkhnncooomefofhagndkccpmbcbj

output:

1679

result:

ok answer is '1679'

Test #17:

score: 0
Accepted
time: 19ms
memory: 3928kb

input:

bnnjcbgkebbmkagekignbbkifcnanekiocbngbnljnkciikjbobdcmmkpimbmgbjgkcbfbkkkoebhijemkgjecgenkaclpiliikamjkbjnpgmacejblkjkbbicicjiijmigkjpcjhkpkjicpbhekpkdijbbmpjjbkcmbojfapkcbcigijccfnbjibjjjjimkpinkccbjfjmikcmnceecnbkkcondmeikcbjnjmdiekdnokbhkkikmmjmimfbkicmbebcmcfkigbapbbcmbbiiickbkmgnbnilhihgkhpnbbc...

output:

139281

result:

ok answer is '139281'

Test #18:

score: 0
Accepted
time: 23ms
memory: 3832kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

0

result:

ok answer is '0'

Test #19:

score: 0
Accepted
time: 20ms
memory: 3888kb

input:

dgffadaaegfdbgdfgdgcdeeddfedaabgbaadfcbddbfeacgdebdabebeccfcbcfdcbcaefeedgcbgcbdeefgccdeadabddgdadcfffbeefdgfdadfbgbcefgbgabggbgfefffabdgefaegdfcfdfecggaaagaceefaeefddbggcffedbccdcdcaeddcdcccagbcebgacfecbagbgdagaacfedcaafcgeebdcccecdfceaeagdafcccadegadfgaadfccgcfcfaeaafgebaeegebgfababfbefeefadaggcbd...

output:

8032403

result:

ok answer is '8032403'

Test #20:

score: 0
Accepted
time: 24ms
memory: 3976kb

input:

boaleaaebaoieafmmjkakeodmnaabkeebjeooenibaaainieniieiedeoobbeoomieaoebiipmbekoeljjeooeloomeneaaoaeaenedjlaemeebmoemaebeaeeejajmjameieanemoaleeaneaeeimaoeeebneapembkbomejmmamjeeooipbaaoemnbmoneeloenbademalebiapimnanbeemnoabeaeeemieemmeemooaaeoanefllbkleeeoenbeaiaoieimeeoeieoideemmmajeonoenebmedgmeeoe...

output:

32621356

result:

ok answer is '32621356'

Test #21:

score: 0
Accepted
time: 29ms
memory: 4132kb

input:

coanjdmbapdmpbjhfnefggihaogjplakkghhhnmmnikckhjbfjdbfhleebooecoaenicldncacejlhekbmllngcliakoaljboomadacbbnbjghbefmhddleojdpmclmkkbidjgfbpcdlkebnnbiplackhojeejojjpajkedfoipihbfipnclmdeamdgfbcmoclbdobmbofmjfdkagngajmcmgnkkfampkhkkclmmdcifppmgakkgcjhonfbblldpfncgompacnedkkfeiicnmggfpfbellepibnglpideflb...

output:

316580550

result:

ok answer is '316580550'

Test #22:

score: 0
Accepted
time: 34ms
memory: 4404kb

input:

fhnknckfgnlgdgnicnijankanoccldcfmkhojcflhdngndeccnekdjldcdadoeegdjnmkicccafomhkabbhohofiamoekagnkdkbmnhablbhchlmicfkaldmjdicdoacakdbkjmmcdfknneamannfbnjciihnkflkbmgefhngkceeegdlmifnhbfgnkiljdkelkgoeiljjhdgblladjljbfodmmiagagledbfamnjlehanjjenimloiildjndmkfgdkfndgnhcmdnaahcfbeaikiaiaackkmemekemofgkdm...

output:

1911314433

result:

ok answer is '1911314433'

Test #23:

score: 0
Accepted
time: 48ms
memory: 4856kb

input:

facdcdnicaffdknehggbcmkopemnmnfnbdeembmclfkmcihcimodhiocaaenpdpmgddlnjimojkflopabianljiaipbjainhknmdjgibkajpohkckggjlpdlfeamppepcdnokcobcifhknjdmebfchmpkhooofoanocnlcdpbampgkbjidnllacgkinaeofjikohcbabgfkffepfneijhajhmggoplpngcidoakfgodlahcnmofkienkloiajcmblgjcihbbfajpgacoomhpobhjopemckombmioplnaiijh...

output:

5029120463

result:

ok answer is '5029120463'

Test #24:

score: 0
Accepted
time: 61ms
memory: 5628kb

input:

mkdiekeijohfoieakdljedbbplpeenlhdiipknpfegpheibiofhbgnaklmknnhleofmmhieggchpmkjcbcbbjipbdlbbhfinchdmdepoaddaonnnlohpboaiaipbneppmjoblnophfjljbocfhlemnpjkmpcddcclicddhpplcommmnlmhonpnenacoppfjahfkkfdbjfaahnlkbhmjiojpfhldedjekemjadgmpfcpgoegndnnfppggaeagkhkcmoknajdajfhplheoipdfmancgpblcmpimbdicmdjmjfc...

output:

11314522779

result:

ok answer is '11314522779'

Test #25:

score: 0
Accepted
time: 61ms
memory: 5512kb

input:

nblbejjbepcebeandgolnejlplfpehhdcdomhgbiemljbeeekjfppmbelmmnomkiekfobfibcbbjjfnbjcikhkbbmeocfedojmbolnjpmmpnedgpmdlaldbfbpfopjedndpfhofpkgnladamndhapaomohdkndakmafnkkiflcnenaplopnolfnckfidmnenaomihhligcopoibpahbjnoejfmndkidfaogikbkaohjmghpiiaidimnoepngkfajpajllnpbdbiejbcplonbkkmfbpmmopbnkcnfhfoafaal...

output:

11319558496

result:

ok answer is '11319558496'

Test #26:

score: 0
Accepted
time: 58ms
memory: 5552kb

input:

oijhpjpichaldjeidapjggeiapogapfffadlifnpcfoeedcemknhpohahekjjppnpjlakgodpphnbnffbnmgefjfofaicjenfnlaoophlamgcmpfbidikdiicobiihgmkpdepeabadnhkanmkdjppgnmonikeipkfbajlbokmnfdackbkppofpdhjbigbnpdablaplajjdkcilgndnpbjlhkbmghnlccnceaknaidaegocbnoacdnibpnhmolakmcmleophgnbhldfbkmkacmifcpkpiepbnjidnniogmkgo...

output:

11326125099

result:

ok answer is '11326125099'

Test #27:

score: 0
Accepted
time: 57ms
memory: 5536kb

input:

bkchbnkbknlnmmdlkeignliofkpplhkajomloddcloaonmocecmdhinlokldgcoodohdkdlompifebdnjfmnobdnhbhbafbnnjoackhghgoiekaefmpbhmhalahpcfcoofloffhmcdccehfooebnehjjkpibiojmijideoplbadhjneghbbbgepdkeganhkifoepbohjejlnfahicjlhbepbmcfckkeemfhpjmoadgnempkkiakeledgoaceelmnnnidedkpcfnbkjhkphakcjmmjcgkmffedcddmpdeddeh...

output:

11323224455

result:

ok answer is '11323224455'

Test #28:

score: 0
Accepted
time: 56ms
memory: 5280kb

input:

jaloijhcgekiahdifidgbjnecfolobgledafgncjfmlmmgbenchenccihiceomlfchnbeelnjkeleohcdhifjooehohekmeemdfhdeiecnlchaacjaegagbhelmleghhleicnbdkgajikgcnmmhclmdoenfojecaaldoehlifggcklicmefdhjimcihhehdbhfkcmemnojlohkgmeinhfhjbggengehfkaddjajgacdgehbelmdohhohechelmcglcddhkjinmddjlclaccfnlnfbjnlagieokiihfdainnk...

output:

11264990424

result:

ok answer is '11264990424'

Test #29:

score: 0
Accepted
time: 59ms
memory: 5276kb

input:

bginfiikbcehakamkicnomkabonleibjjnagenmkicgkegcfihmlccmgejjbbamgjbnegclcmmmjbiabiocegcfnffmlgjnlekbhialcdalnbilmhcgcojoeghcknlblollcdgdnjfmoifjfadidhadmnlkdmjlflllhikbaiecomocefechjgconbnbdblokennfhhelgbinadmlmdbaicfabgelddhneeaaomecemiagdlekdmjlelglmbobfkgejcbaiochlllggiadandembgjnfehfbhdkimdooeacf...

output:

11266209262

result:

ok answer is '11266209262'

Test #30:

score: 0
Accepted
time: 28ms
memory: 5700kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

0

result:

ok answer is '0'

Test #31:

score: 0
Accepted
time: 26ms
memory: 5032kb

input:

baaaabbaaababaaabaabbbaabbaababbaabaabbbabbabbaabbaaabaabbabbabbbbaaabaabbaaabbbabbbaababaabaabbaabbabaabbbbbbaaabaabbaaabbabbbababbabbabbbaaaabbbbbababbabaabbaabbabbaaaabbabaabbaabbaaabbbabbbbaabbbaaaabbbbbbbbbbbabaabbabaabbbabbbabbbabaababaaaaabaaaaaabbbabaaabbbbbbbbbaabbbbabaaaabbaababbbbbabbaaab...

output:

11283120735

result:

ok answer is '11283120735'

Test #32:

score: 0
Accepted
time: 28ms
memory: 4924kb

input:

bbcbabbccccabbacabbbcbcbbbbcbbababccaacaabcbcababbbbaabbbcbbaabababcabbabaabbabaacbbcbcbbccbbcbccabbaaabcacabcbbaccabcaabcccabbcabbbabbbcacbaccbabcbbaccbabcccaabcbaaaccaabcccaaaacbabccbbcbabaacbbcacbaabaabbccccaacbcccaccaacbaabcabbbccaaaaabbbacacbbccbbbcabaabacabaaabbccaababbbbcbabcccccababccbacbaaa...

output:

10035076517

result:

ok answer is '10035076517'

Test #33:

score: 0
Accepted
time: 34ms
memory: 5132kb

input:

cdacdababbbbbabdccbacbccccacbabcadcbbcddaaadadcbaadccdaadadccbdadbbacbdbadacaaacacdddbdbdcccdbcadacbdaabdcddbbdacdbabacbadcabbbcbbbbdacbbdabcbaccbaddcadacdcdbabdaaabbbddabbdaabadcddacccddbaabcacdabbdadddadddcacaccbbcaccacdabaadbcbdbdccaababbddddbdddbbdbdaadcdaacdccaacdabbacdbbcacbdbcddcadbbddcbaddca...

output:

11309284824

result:

ok answer is '11309284824'

Test #34:

score: 0
Accepted
time: 45ms
memory: 5276kb

input:

hchdocgchdchakfcfccllhcdhgfpaoclclmddccodcoclcamcmdgacdhianddcmgcefahcckchdcchcfbdgccmdcodddbdfdffdpkmhdcchddlgfdcphcahdjccdklcdcoahdchoccdmchdpahchchefnckhlmfapgdfdfoohlkdkocodgfhlddkhchhdhkhcddaokcfcodcfkkbkkcddlhhchahpccgdddahmoocdhfcffcdckdgghfccfhdkcccdchdhccaahdhdacpdcfdchpdhchcdchdcaaddkocoda...

output:

11291928107

result:

ok answer is '11291928107'

Test #35:

score: 0
Accepted
time: 48ms
memory: 5276kb

input:

igmmniaeodfgagafemlaggmigagolajoefoagoifloamagejhinaaoagbgibmolmlgmgaaalflaaloliogafefgalmanegabaijgglijmgoggonmafcalfaclaomffamiigfonafjaeoaaglleaamlmmagegfkomaoagaganggogmhcaabmgfmaaaaaiealabloleoggeflmgaafbaamiloloamemaaalomgfgegakagelgfgfindghlllahamclllnclmgegnloigalonaihloegololggioaamglmnoami...

output:

11322837231

result:

ok answer is '11322837231'

Test #36:

score: 0
Accepted
time: 42ms
memory: 5012kb

input:

aaaegkagaagekjaieoelbagalocaagacacaecogaagfcaaekkaleaeaegoaeaabbabkehhaecbaeehabokaadllaedfaeakeckeebaeadackgaaaedeaeejamaeleeachaafclhmjbkoegaaakehaemahalmaoafmbamgafaaaaahhggeheaageoeageahanaggbeggeaaabcgaljbkkaiakmagbhamdjgalakonaeaaefbmkcheebaeabalaabaaaabaebdlakhaaaaggmcacaaeeeeiageakkdbeaahaae...

output:

11299481719

result:

ok answer is '11299481719'

Test #37:

score: 0
Accepted
time: 49ms
memory: 5408kb

input:

jehpilphidkccdjdcicplmpcjamhidnejjijjiohppdadhpcfciclmpillccpcdacpahciciodchkmpmciicceepachlpckhhjlipicochhjhidcihljhajclfiidicecjhiccdjpehipijjhfecccdhccpcidpjiphepiddphllhaicjemhpeiicdmfpamfieihichihdphplilcicdpkodcilepjhcchchcpoilhjhlijjcpjclpccpfejhopidilpcpfjabdpolioolccidcihdhpddhcickihhpjddic...

output:

11311249285

result:

ok answer is '11311249285'

Test #38:

score: 0
Accepted
time: 50ms
memory: 5304kb

input:

iimkciihfiibdppildkcmkbbkpeiebifikbkimkidhiihiicebgpmgibpibcdihcdglmihjinjiikimgjjbhnikimkgpijdipkbpclminpbiggpipiniicgjbipcpeikbinipcdebhdgbbpimcdbidkdiigmnepegdmpmkdpjhiggiknikpicpipiekgnbppidinjmppheicdgeciipeimdcpighdhkmiikbijgjpmicieiniiidkmichhimhbpmikppgigjdiipndbpdojgdhkmjmmpmjgmlkndcgdbnmib...

output:

11289686938

result:

ok answer is '11289686938'

Test #39:

score: 0
Accepted
time: 48ms
memory: 5332kb

input:

mhhhhmhplljmdlacpmdlehhopahieebcjhcmmhnhmhkjhmhkmledmldheaghemhheehmmlhhldnhmaklbaechljnmhhhmhcmcpmmhbmckdhmhkabhmmplhcpchegahoegceohhhhheeckhcmabphhhemmhgkhdecmlmhhecehmemdeeeghcdphlcegmcpejmmdfphhchaemehjbemmjpgmhhphhedbllemdllhmlhmeemhhebfnpnemlmmhchhheelmemgchlljhlbahhklikpiemmmechdeldejhhnfkbpm...

output:

11310963550

result:

ok answer is '11310963550'

Test #40:

score: 0
Accepted
time: 49ms
memory: 5148kb

input:

kflgliijhkkglmolahmhhljennklolhhmlnflelllcdlhklldllgglhllnkeaeggikelhdlpnnhklkahjheifajephhkmekhieghjlheldhhlgkfkllekkghllhdlhlklihdhhekeihlllhenlhlmoklnmlajlkeallhlepgmglfjelejakeemhlhikeghldlldlepjflimellflhllekkklejcelelljknlhlkffclloigdlllkmeehmlehkpjljnmddfnmlhlfkfemeplalenmeeehfllaeaoakeelleee...

output:

11302371678

result:

ok answer is '11302371678'

Test #41:

score: 0
Accepted
time: 53ms
memory: 5376kb

input:

nfnnngnikeficfgljnnlefeneilleenaaglhanikalggnfoknddedookleneceojakecmeknkaelfnakbjlflagnnibeanbnlnnnhbakedeeinoknnflnboeblalanoffjmhfolebbfhhejnnkjkofhjnefhnngfefobkhaileoednjfineefdlhbmekeikfeeoioenlnncbelaenanfajhklabohndalnboekfknleegmfeklkhecnflfoegfneajnemlckelfjeefekekeenobnbghlnlfkelhbkbbhenh...

output:

11299605236

result:

ok answer is '11299605236'

Test #42:

score: 0
Accepted
time: 36ms
memory: 4960kb

input:

dabdecagccbddcffddcdfbgfgddcfcdcdcffeccfcdedcfdcecfcfcfddddgcbcffcccdddcfefgbcddfdgfgdddecdafdaddcefcdbccfdgdbfgfgccfefcacfcffcfcdcdafbfcbcfcccfcdddcacdcfddccgccddfcdcfcdadceccedcdfccdcdccfacefdddffdeadfecfcfefaffcccedfcfgcfcfcfgfdcddbcdffdceffccffefeffcdaedbadddabcecbabddbaccecbcdaccdccecfccccdfdfd...

output:

11266097504

result:

ok answer is '11266097504'

Test #43:

score: 0
Accepted
time: 37ms
memory: 4980kb

input:

dabdecagccbddcffddcdfbgfgddcfcdcdcffeccfcdedcfdcecfcfcfddddgcbcffcccdddcfefgbcddfdgfgdddecdafdaddcefcdbccfdgdbfgfgccfefcacfcffcfcdcdafbfcbcfcccfcdddcacdcfddccgccddfcdcfcdadceccedcdfccdcdccfacefdddffdeadfecfcfefaffcccedfcfgcfcfcfgfdcddbcdffdceffccffefeffcdaedbadddabcecbabddbaccecbcdaccdccecfccccdfdfd...

output:

11266097504

result:

ok answer is '11266097504'

Test #44:

score: 0
Accepted
time: 42ms
memory: 5344kb

input:

aaoanalallaagollalaacaodanaaaiaalcioaadacaakaaaaanfaoldaaldcoaooapdnaafaalapaidcaacaalgaacaloaaldancnnaalaaaaipapacoliaoalapalnagndaaalaiapccioiapaaaacaaaapdakafanadcaaaldldaaaakpafaocfdpckgaaaaaafgdlpaaadaaaaipaianafdadcaaoanppnnaacaapaaaagidpnlppglanpcaplflapcalpkaoalacnaplaoaipccaafaafagaaimnfdca...

output:

11298062553

result:

ok answer is '11298062553'

Test #45:

score: 0
Accepted
time: 39ms
memory: 5236kb

input:

hhpoakpomkmhghdfhhkhhkkhokhkehhmhbpkphkhhahhhkhkjahphhhnhkahkhhhchnahnmkoohhkhmhphkhmohmnahhekkhkehphiokhkkoahkhhoakihhoghhhihhhefphakmoahfhhhhhmhkkhhhhkhhkhhhhhphhkkhhdhhnpmhhphohnidkhehokdhlphhaaahekhhhighahhmhhhahhhkhlhkhhahnhhkhhhafhnmhhhlhhalbhkahhahhhhokhemhhhoohbhhfhhehhpkihnhhhhahhahnkphahhk...

output:

11262549508

result:

ok answer is '11262549508'

Test #46:

score: 0
Accepted
time: 41ms
memory: 5056kb

input:

pnpppklnpppppffkpppnppppppbifpppkiolpppdfpppmpppnpbpkppipbppnpbpkpppinepppkpkmpdooopgpnodphhpopppppbhnpppnpiipppknpphpppppmpgkigfbphkppmobgipehpkpfppppppilppfbnpnlbnpndkpkphppoobffppfpppbpppopppplfpgdpghbppnmpoppbfpppbpbifppplppfpofppkppbphponnodpbpppkpapbpfppfpppppnppnplnpippfpbpippppfipoknpebpepph...

output:

11148220295

result:

ok answer is '11148220295'

Test #47:

score: 0
Accepted
time: 31ms
memory: 5648kb

input:

eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeedeeeeeeeeeeeeemeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeepeeeeeeeeeeeeeeeeeeeeeeeeeeegeeeeeneedeeeejeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeeeeeeeeeeeeeeeeeeeeeeoeeebeeeeeeeeeeeeeoeeeeeeeeeeeeeeeeeeeeeeejeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee...

output:

2119569528

result:

ok answer is '2119569528'

Test #48:

score: 0
Accepted
time: 33ms
memory: 4916kb

input:

kppkpkdpkppppmkkppkppmkppjkppppfkpdekpppkpfpkpenpbkpkmfkmkkppkkkpkppncdcpkkpkkppkppknkpppppkpkkkkpfpkppekpmkkpmmkkkpkpfpkkkkmppkpfkfkkppkpkkkkkkpkkpepkpppefokppndpfkkphpkfpkkppekkkkkpkbkpkkekpkkpknkpkpnfkkkpkpkkkepfpkmkpkpkpjkkpockkkpkpekkfkpppkkkpkekkcpkpkmppkkppkphekpmkpppkpkjkkkkpkkkapkkpkkppkmpk...

output:

11320310199

result:

ok answer is '11320310199'

Test #49:

score: 0
Accepted
time: 21ms
memory: 4912kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

22400000000

result:

ok answer is '22400000000'

Test #50:

score: 0
Accepted
time: 21ms
memory: 4848kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

22500000000

result:

ok answer is '22500000000'

Test #51:

score: 0
Accepted
time: 58ms
memory: 5368kb

input:

lbggdafkplacpcpipoohgofcefinbgmjkacmgjcolhmaaniallcehbijjpdejdcaakchchicpcddgndggpdiogaejbkdbpkjppdeffhofehaicpkkeofiehbgceilhpadfcdimibjimiafdhelmcdlpcelnbcgkfakkfdioelmlgiapccjlpnibkjlhebbjjaejibebekkefjcnffjjdeaonligkgpenlmonaghfneobaimegjppakjijikdopdldolnfmjdfoanhefjhccaknljloolekkabimnelofkioo...

output:

11330265766

result:

ok answer is '11330265766'

Test #52:

score: 0
Accepted
time: 61ms
memory: 5400kb

input:

lbggdafkplacpcpipoohgofcefinbgmjkacmgjcolhmaaniallcehbijjpdejdcaakchchicpcddgndggpdiogaejbkdbpkjppdeffhofehaicpkkeofiehbgceilhpadfcdimibjimiafdhelmcdlpcelnbcgkfakkfdioelmlgiapccjlpnibkjlhebbjjaejibebekkefjcnffjjdeaonligkgpenlmonaghfneobaimegjppakjijikdopdldolnfmjdfoanhefjhccaknljloolekkabimnelofkioo...

output:

11330265767

result:

ok answer is '11330265767'

Test #53:

score: 0
Accepted
time: 62ms
memory: 5248kb

input:

leoahnpanophdibnldpiablmngaegpfipkifhmacjcnjddckpkdkjajldlnalimabnbbanolemiadccpafciafhghglmmemjfoliogggnlcmchjmbdcekoidaeijjnhpodamhmgomkfkkglhljipakpjfjkpcahfooegllepknnoigapjpcabojigonbifomogejfpgalnnpofebflomkcbmdkfapbpaidahjgppiiepboipcndjiejogajimngkfhkoghkhncceplddfmdcacliecbfgmdjbnilipagiklg...

output:

11314337725

result:

ok answer is '11314337725'

Test #54:

score: 0
Accepted
time: 61ms
memory: 5236kb

input:

leoahnpanophdibnldpiablmngaegpfipkifhmacjcnjddckpkdkjajldlnalimabnbbanolemiadccpafciafhghglmmemjfoliogggnlcmchjmbdcekoidaeijjnhpodamhmgomkfkkglhljipakpjfjkpcahfooegllepknnoigapjpcabojigonbifomogejfpgalnnpofebflomkcbmdkfapbpaidahjgppiiepboipcndjiejogajimngkfhkoghkhncceplddfmdcacliecbfgmdjbnilipagiklg...

output:

11314337725

result:

ok answer is '11314337725'

Test #55:

score: 0
Accepted
time: 57ms
memory: 5260kb

input:

libmbjmjdnkfmbagmcpnclojpaicphciihbmhggbeoclhbpbofiijgeflcpbfgefghcdlahdcdhgefihiihiflffneaoonloiodbalboidjcealgpjbeelnchdcekbkekempcchfgjcjagocoeealfpacplfnnnfjnbbohcbhnhgdjafhnfkabgdcnlnldhfefgoplpbabkmmemckfmedhfcljfihlbeegkelbcbphhkmmpbobhllajhhipbcdlfppfoajkgfahmmieaaodmjalobglhhglbbajmhoelepcd...

output:

11310856703

result:

ok answer is '11310856703'

Test #56:

score: 0
Accepted
time: 58ms
memory: 5276kb

input:

loomodkebhanlmmecjogmlailfphncdkfgmdehdjmllgmhogimanfbhhocjiinjpoidnfccikhogijennjfhlgjclnakhlijjalpneifhnlfnoghcfkggkhanpahnbgbihekkmlegfdglfkgmmafhmaedoadcnmebgpekbhkmmkohloflddoibkmnibgkmfgccohmilijgkmepgkggekonknehiemojlogmdhhplcbidadpilfmfjajdlalnacbmcelmebipmjngoniojhcofilkclmcmiagbeapbilflhbg...

output:

11312224011

result:

ok answer is '11312224011'

Test #57:

score: 0
Accepted
time: 50ms
memory: 5464kb

input:

nbkggpnocokiglglboefodkeegkdkkkkihlbeoodblnnbllkkledolleokkgbocfkfingpnloeekogpdonnlbonkkindggedflghhekkdfoledhknggenedpllnkigkoaokpkgglphlogngdikncopeoikndkegnlkoklidlefooocgkongkociinoogknilekdablklgggngaindgikjnlolggknkhgonllobgneefeidfiookgogololnkkilklbclcgdofooekikkggddnhpccloooddlggeedclnbkln...

output:

11299346703

result:

ok answer is '11299346703'

Test #58:

score: 0
Accepted
time: 51ms
memory: 5444kb

input:

nbkggpnocokiglglboefodkeegkdkkkkihlbeoodblnnbllkkledolleokkgbocfkfingpnloeekogpdonnlbonkkindggedflghhekkdfoledhknggenedpllnkigkoaokpkgglphlogngdikncopeoikndkegnlkoklidlefooocgkongkociinoogknilekdablklgggngaindgikjnlolggknkhgonllobgneefeidfiookgogololnkkilklbclcgdofooekikkggddnhpccloooddlggeedclnbkln...

output:

11299346706

result:

ok answer is '11299346706'

Test #59:

score: 0
Accepted
time: 56ms
memory: 5296kb

input:

fafmjefkajnafaekaeofaabeahldeclkdfhpcdigdjdbfgfgeehocgegfnhlddglhckddoghnfennfkablcifjlcochhdjdkafojgcchakcgjhcabdefcckojbajgjcffgdoejdokbofhkoeffnaneehbjhepjgeckdiaffdjkgdpkaebgafmnifppdeiajccebdagkokcfghbbcdggfeeepjinhfeancnbohpfmflbaaafoghanchajkdmdcciepdhhedpijefieoedgbkfpdcdjfcnpdfhnogfcefbfdkh...

output:

11300860242

result:

ok answer is '11300860242'

Test #60:

score: 0
Accepted
time: 55ms
memory: 5336kb

input:

fafmjefkajnafaekaeofaabeahldeclkdfhpcdigdjdbfgfgeehocgegfnhlddglhckddoghnfennfkablcifjlcochhdjdkafojgcchakcgjhcabdefcckojbajgjcffgdoejdokbofhkoeffnaneehbjhepjgeckdiaffdjkgdpkaebgafmnifppdeiajccebdagkokcfghbbcdggfeeepjinhfeancnbohpfmflbaaafoghanchajkdmdcciepdhhedpijefieoedgbkfpdcdjfcnpdfhnogfcefbfdkh...

output:

11300860244

result:

ok answer is '11300860244'

Test #61:

score: 0
Accepted
time: 39ms
memory: 4964kb

input:

cockoocodimificcffkkcddgcccccoiofdndhgaobcomcccpcchonoikoooffcmfooofdocococbpoocoocmlooohicmchcobjokccccophddmmohpcohocodichockcdkcfcfakohoaococcicoocmnacocfddpcmfnioihmccfcooofmpfcmpbpihomooococmkcooaomcicbdoodccdhcooooccocicmojkkmofidfkofnchkcocckcfoofoicoomcmmoccocbdmhiccokmifcohfcfocadokoihcjoco...

output:

11287058063

result:

ok answer is '11287058063'

Test #62:

score: 0
Accepted
time: 43ms
memory: 5020kb

input:

cockoocodimificcffkkcddgcccccoiofdndhgaobcomcccpcchonoikoooffcmfooofdocococbpoocoocmlooohicmchcobjokccccophddmmohpcohocodichockcdkcfcfakohoaococcicoocmnacocfddpcmfnioihmccfcooofmpfcmpbpihomooococmkcooaomcicbdoodccdhcooooccocicmojkkmofidfkofnchkcocckcfoofoicoomcmmoccocbdmhiccokmifcohfcfocadokoihcjoco...

output:

11287058061

result:

ok answer is '11287058061'

Test #63:

score: 0
Accepted
time: 53ms
memory: 5484kb

input:

agppccnlpacacdjpplilbopichdpaobecolphonnodhacbadlnpnbecaolledagbjhccoacpliihpadnljdcelhdhohaiolhcclpoohollllelhpdbodpllacpdaciaeoihodhhgghjpajnpncpgddcdhogbdoachhplcoinpejjhaconcdajdlpocjlolopgiipepncgcleapldnckcjdillokhljbopaoogonlomkccihhnaocnlcgnhipdkmihoimccljolahppehbhlckhhkdoknpjplejoohdecojol...

output:

11337287002

result:

ok answer is '11337287002'

Test #64:

score: 0
Accepted
time: 48ms
memory: 5304kb

input:

eiieofkhilioaidkldoidcbhddfebchlobiiihobdohmcibldmdbeihhilcebifeicodohiohimmlilialeoliiiimeppeilhhideifdfhlihohbaplahilbdcchpiedihiemahehdliondlcbcliiedhcmhehfiopipbhohdghdibaoidohhelcdbdndoidaedeelddcbiihoihlibdacilhchmlifeicnoecidicchddliiohifhifiloihmadeihieiedileeilicialhelipmchodilchimbdegdhhdc...

output:

11310158723

result:

ok answer is '11310158723'

Test #65:

score: 0
Accepted
time: 58ms
memory: 5580kb

input:

egbelbigmkgpbmcdahjfobeejhfcnppdifkncbjfebbnjacknncdfeikcmnmbaafpfbillejdlgohjnopcobogonmdgfnkpiiakajpfbnakbmcglfnkoopieplkcfgibkhnjogfmhiahgogabkijeipmanlaigkpkelddiglagambmaklmofpmlgnalbenkimjpbembkekmmcjapemnhlcciofjibamdligcblnkbfodmadfolngencnkcpdngdpkihgkgakamjlailkegfkfloflllmpldmikbgddfaddcg...

output:

11250000000

result:

ok answer is '11250000000'

Test #66:

score: 0
Accepted
time: 58ms
memory: 5472kb

input:

idjjgcpcmejokioochickjmimbacdmnhdcoidgjaknmacighlekfnojflabbbhaeejckmidehiacpbgkpigcnhcgdljaebehhnejppbebojblamnffmeiamdndmofgnpeelcbkbhjcmpjcgpoijglhcjnmkoadmdiklcjheoalbfnmejgakdcbkhieidkjfihcdeknhpjgcmdnhlkjllpjgjfppljgniljocgnphedlpdgiidpmejbhipnhfffnkpebblnbaneiblghgboanlojefbpanocihnpiimibcmco...

output:

11249925000

result:

ok answer is '11249925000'

Test #67:

score: 0
Accepted
time: 45ms
memory: 5072kb

input:

dabbkbbdbbbbdbdabbbbkbddbdbbmkbbeeabpbobbgkbigbbbgkegebiggobbkbbpbbmjpdjbiebfakbbbdddbmombbbbbbbbbobdiidbdbeoedibbbaibbekkepiddbobbakbbbabbbbbbbehgbgobpbbgdbodbldpbkbbmibfbgobbbbbbfbjokbbbbbbdobfkhbjdlaobgkbjikbdbbdmkbbdobfmbbbdbbobebdbobbpfiokdbdabodbjblmobobebkbigeefbbgdofbmmbdbkbabbbblbbmbbekdobb...

output:

11249999838

result:

ok answer is '11249999838'

Test #68:

score: 0
Accepted
time: 61ms
memory: 5264kb

input:

dehfpjfjjaeoekjpkolmfmjdjmmocefbpcfipfdiodmabblndifhjhimhhhaljeeegcephjncokglimggjhjeifnmecnjnnoeoddeioilhfohladknpbkbfnebbmmcnlldbkiokloipkdjgabnjepgfokfggmlkimlicceagegofdaggmlnmakpnmgcoiekdkjbnmbodjjgjhgikepfhlklkcoplhjdecdhpcjiofaokoimcfobkheldncpanalfejipfhfieaiaiddioojbhgjfojfimbbkbingnajjnakg...

output:

11268884332

result:

ok answer is '11268884332'

Test #69:

score: 0
Accepted
time: 61ms
memory: 5252kb

input:

fibfnpadfnnkmcbmclbbfghkbibkmhliaombkmpeafkokpogifknmflhogeejkhclocdkbkacepifikohomconocpdbbpkggjolopbbjoppodpeiopbjloegkijhhnmgagbampafobnaoaleifglbkejddkakkoaahibknlpbdkfjfbdmhmmklbeikhjdebdfolmgfnkhlllkdlcncdkcpbmcanoihmlgccakijpnfefchbkogfpboblhgoemohbbfdelclhkbbndejkonjgediebggmdcjicaaeagangepf...

output:

11280292785

result:

ok answer is '11280292785'

Test #70:

score: 0
Accepted
time: 62ms
memory: 5288kb

input:

ejjoaodmkngefceimmjgiekocinjcficnpbgeehkcmcgngmealdjhdjmmjhicfkgbhacjbldigllfnmhjincagepkhaoiobiopcfbaejlhfmhhpommonajigjooddmbafflcmhdjlkiigoobijegahogjkioiaiajigelfmgpgcebcahdbfgdddekdbolbokkllcjhggfnfghmgldobabffhghiolchfioimjkffmiecngpbjpbbmhcdikoilegomcghlbboialcjpiecagllaoeepngmnngipneghhbcepo...

output:

11250244268

result:

ok answer is '11250244268'

Test #71:

score: 0
Accepted
time: 61ms
memory: 5444kb

input:

kbnomlehcjpafeoohnbmpibdkflklefkmdmdeglndekaikkpaeghhcbedpophfgcjbjdalhibbmapfninacgpaoifeocoonopjpfaacocbopldgilhjogomhjoppnhafioomhnbfhapephdohnoiepeokegjmfnkopffnnhjlpfhgmleipflpnacgimjbjjgklcjpnojdfaehhdkjdaokcbnohgkpmaephnjfobejmpmjfpceinehebiadlglmkhakjfihjaflnlclalccjdbegfnnhaglbiihpipjlimfkh...

output:

11251130124

result:

ok answer is '11251130124'

Test #72:

score: 0
Accepted
time: 61ms
memory: 5240kb

input:

ghojngfpncpllmckaohdfekdpkomkgkpijdblkciaiijbcdbfkacdkjgkhgihnoaahkgjhemlnieedemkagoeheghcigjaehljinehpfpeagkohgknlgnidhhnnhamjocjbhfkibebfgdgobjeadmnjpkaacfoepopooepnaojibmiifbhbnhpfhgbmleccgggjkpaomjkeffeaakcpehnfkkeapmcgilagnfoiepofghmjgbmbpebfgfdhdjlanlihmcapigjdeggmoimkmfglhlifmmlnhdipdoeifbgem...

output:

11252676819

result:

ok answer is '11252676819'

Test #73:

score: 0
Accepted
time: 58ms
memory: 5320kb

input:

aeafipbhnfflkpnbklibgmcmihlgonepflbfipnelpfncihjpcgaokpicablcikjnpmlicnnldbkelchlnhimhcipenjdkbaeehcjjgabpjnnhipnidgagmhenlngcmghooidfnhaojbfhnibaedfpfejalgcpadkgdgaeplfnnahepnckepbbomfaocjpmnhjaahonbobabelafhdjoohpilecgchbcpcaaehomlkhigjgpahhhdjbgjjlkllplaejhclkaijmiehiikjamaodgfdfepokpnldenkcoggpo...

output:

11257886685

result:

ok answer is '11257886685'

Test #74:

score: 0
Accepted
time: 61ms
memory: 5656kb

input:

lbggdafkplacpcpipoohgofcefinbimjkacmgjcolhmaaniallcehbijjpdejdcaakchchicpcddgndggpdiogaejbkdbpkjppdeffhofehaicpkkeofiehbgceilhpadfcdimibjimilfdhelmcdlpomlnbcgkfakkfdooelmlgiapccjlpnibkjlhebbjjaejibebekkefjcnffjjdeaonligkgpenlmonaghfneobaimegjppakjijikdopdldolnfmjdfoanhefjhccaknljlooljkkabimnelofkioo...

output:

11250015594

result:

ok answer is '11250015594'

Test #75:

score: 0
Accepted
time: 61ms
memory: 5612kb

input:

lbggdafkplacpcpipoohgofcefinbimjkacmgjcolhmaaniallcehbijjpdejdcaakchchicpcddgndggpdiogaejbkdbpkjppdeffhofehaicpkkeofiehbgceilhpadfcdimibjimilfdhelmcdlpomlnbcgkfakkfdooelmlgiapccjlpnibkjlhebbjjaejibebekkefjcnffjjdeaonligkgpenlmonaghfneobaimegjppakjijikdopdldolnfmjdfoanhefjhccaknljlooljkkabimnelofkioo...

output:

11250015594

result:

ok answer is '11250015594'

Test #76:

score: 0
Accepted
time: 61ms
memory: 5528kb

input:

leoahnpanophdibnldpiablmngaegpfipkifhmacjcnjddckpkdkjajldlnalimabnbbanolemiadccpafciafhghgemmemjfoliogggclcmchjmbdcekoidaeijjnhpodamhmgomkfkkglhljipakpjfjkpcahfooegllepknnoigapjpcabojigonbifomogejfpgalnnpofebflomkcbmdkfapbpaidahjgppiiepboipcndjiejogajimngkfhkoghkhncceplddfmdcacliecbfgmdjbnilipagiklg...

output:

11250088803

result:

ok answer is '11250088803'