QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#26682 | #1242. Broken line | Hakujitsu | AC ✓ | 72ms | 5720kb | C++ | 1.5kb | 2022-04-07 21:25:17 | 2022-04-29 04:13:12 |
Judging History
answer
#pragma GCC optimize(2)
#pragma GCC optimize(3)
#include <bits/stdc++.h>
using namespace std;
void debug_out() {cerr << endl;}
template <typename Head, typename... Tail> void debug_out(Head H, Tail... T)
{
cerr << " " << H;
debug_out(T...);
}
#ifndef ONLINE_JUDGE
#define debug(...) cerr << "{" << #__VA_ARGS__ << "}:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif
using ll = long long;
int main(){
ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
string s;
cin >> s;
vector<vector<ll> > cnt(16, vector<ll>(16));
vector<vector<int> > pos(16);
for (int i = 0; s[i]; i += 1) {
auto c = s[i];
pos[c - 'a'].emplace_back(i);
}
for (int i = 0; i < 16; i += 1) {
for (int j = 0; j < 16; j += 1) {
if(i == j) continue;
int ptr = 0;
for (auto x : pos[i]) {
while(ptr < pos[j].size() && pos[j][ptr] < x) {
ptr += 1;
}
cnt[i][j] += ptr;
}
}
}
ll res = 0;
for (int i = 0; i < (1 << 16); i += 1) {
ll sum = 0;
for (int j = 0; j < 16; j += 1) {
if(i >> j & 1) continue;
for (int k = 0; k < 16; k += 1) {
if(i >> k & 1) {
sum += cnt[j][k];
}
}
}
res = max(res, sum);
}
cout << res << "\n";
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 12ms
memory: 3744kb
input:
banan
output:
5
result:
ok answer is '5'
Test #2:
score: 0
Accepted
time: 15ms
memory: 3632kb
input:
abcdefghijklmnopaaaa
output:
90
result:
ok answer is '90'
Test #3:
score: 0
Accepted
time: 15ms
memory: 3572kb
input:
a
output:
0
result:
ok answer is '0'
Test #4:
score: 0
Accepted
time: 15ms
memory: 3672kb
input:
pp
output:
0
result:
ok answer is '0'
Test #5:
score: 0
Accepted
time: 14ms
memory: 3536kb
input:
pa
output:
1
result:
ok answer is '1'
Test #6:
score: 0
Accepted
time: 11ms
memory: 3572kb
input:
abc
output:
2
result:
ok answer is '2'
Test #7:
score: 0
Accepted
time: 16ms
memory: 3632kb
input:
ede
output:
1
result:
ok answer is '1'
Test #8:
score: 0
Accepted
time: 18ms
memory: 3508kb
input:
ooo
output:
0
result:
ok answer is '0'
Test #9:
score: 0
Accepted
time: 15ms
memory: 3704kb
input:
fnod
output:
4
result:
ok answer is '4'
Test #10:
score: 0
Accepted
time: 15ms
memory: 3536kb
input:
abbaa
output:
4
result:
ok answer is '4'
Test #11:
score: 0
Accepted
time: 15ms
memory: 3560kb
input:
baabbb
output:
6
result:
ok answer is '6'
Test #12:
score: 0
Accepted
time: 15ms
memory: 3568kb
input:
ccababa
output:
10
result:
ok answer is '10'
Test #13:
score: 0
Accepted
time: 15ms
memory: 3648kb
input:
bababbdaee
output:
20
result:
ok answer is '20'
Test #14:
score: 0
Accepted
time: 15ms
memory: 3656kb
input:
djbecjaiccfhdiihhjh
output:
76
result:
ok answer is '76'
Test #15:
score: 0
Accepted
time: 15ms
memory: 3536kb
input:
adaaaadddbcdadcdaddbcdccabbddcdbddabbbbb
output:
293
result:
ok answer is '293'
Test #16:
score: 0
Accepted
time: 11ms
memory: 3660kb
input:
blpeledhbcafdfeiecmcndheagipefkfconkjldniedkacllaknlpagklpemgfkmcjlfcdogkhnncooomefofhagndkccpmbcbj
output:
1679
result:
ok answer is '1679'
Test #17:
score: 0
Accepted
time: 15ms
memory: 3524kb
input:
bnnjcbgkebbmkagekignbbkifcnanekiocbngbnljnkciikjbobdcmmkpimbmgbjgkcbfbkkkoebhijemkgjecgenkaclpiliikamjkbjnpgmacejblkjkbbicicjiijmigkjpcjhkpkjicpbhekpkdijbbmpjjbkcmbojfapkcbcigijccfnbjibjjjjimkpinkccbjfjmikcmnceecnbkkcondmeikcbjnjmdiekdnokbhkkikmmjmimfbkicmbebcmcfkigbapbbcmbbiiickbkmgnbnilhihgkhpnbbc...
output:
139281
result:
ok answer is '139281'
Test #18:
score: 0
Accepted
time: 15ms
memory: 3668kb
input:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
0
result:
ok answer is '0'
Test #19:
score: 0
Accepted
time: 11ms
memory: 3656kb
input:
dgffadaaegfdbgdfgdgcdeeddfedaabgbaadfcbddbfeacgdebdabebeccfcbcfdcbcaefeedgcbgcbdeefgccdeadabddgdadcfffbeefdgfdadfbgbcefgbgabggbgfefffabdgefaegdfcfdfecggaaagaceefaeefddbggcffedbccdcdcaeddcdcccagbcebgacfecbagbgdagaacfedcaafcgeebdcccecdfceaeagdafcccadegadfgaadfccgcfcfaeaafgebaeegebgfababfbefeefadaggcbd...
output:
8032403
result:
ok answer is '8032403'
Test #20:
score: 0
Accepted
time: 17ms
memory: 3780kb
input:
boaleaaebaoieafmmjkakeodmnaabkeebjeooenibaaainieniieiedeoobbeoomieaoebiipmbekoeljjeooeloomeneaaoaeaenedjlaemeebmoemaebeaeeejajmjameieanemoaleeaneaeeimaoeeebneapembkbomejmmamjeeooipbaaoemnbmoneeloenbademalebiapimnanbeemnoabeaeeemieemmeemooaaeoanefllbkleeeoenbeaiaoieimeeoeieoideemmmajeonoenebmedgmeeoe...
output:
32621356
result:
ok answer is '32621356'
Test #21:
score: 0
Accepted
time: 17ms
memory: 3812kb
input:
coanjdmbapdmpbjhfnefggihaogjplakkghhhnmmnikckhjbfjdbfhleebooecoaenicldncacejlhekbmllngcliakoaljboomadacbbnbjghbefmhddleojdpmclmkkbidjgfbpcdlkebnnbiplackhojeejojjpajkedfoipihbfipnclmdeamdgfbcmoclbdobmbofmjfdkagngajmcmgnkkfampkhkkclmmdcifppmgakkgcjhonfbblldpfncgompacnedkkfeiicnmggfpfbellepibnglpideflb...
output:
316580550
result:
ok answer is '316580550'
Test #22:
score: 0
Accepted
time: 31ms
memory: 4380kb
input:
fhnknckfgnlgdgnicnijankanoccldcfmkhojcflhdngndeccnekdjldcdadoeegdjnmkicccafomhkabbhohofiamoekagnkdkbmnhablbhchlmicfkaldmjdicdoacakdbkjmmcdfknneamannfbnjciihnkflkbmgefhngkceeegdlmifnhbfgnkiljdkelkgoeiljjhdgblladjljbfodmmiagagledbfamnjlehanjjenimloiildjndmkfgdkfndgnhcmdnaahcfbeaikiaiaackkmemekemofgkdm...
output:
1911314433
result:
ok answer is '1911314433'
Test #23:
score: 0
Accepted
time: 42ms
memory: 4684kb
input:
facdcdnicaffdknehggbcmkopemnmnfnbdeembmclfkmcihcimodhiocaaenpdpmgddlnjimojkflopabianljiaipbjainhknmdjgibkajpohkckggjlpdlfeamppepcdnokcobcifhknjdmebfchmpkhooofoanocnlcdpbampgkbjidnllacgkinaeofjikohcbabgfkffepfneijhajhmggoplpngcidoakfgodlahcnmofkienkloiajcmblgjcihbbfajpgacoomhpobhjopemckombmioplnaiijh...
output:
5029120463
result:
ok answer is '5029120463'
Test #24:
score: 0
Accepted
time: 72ms
memory: 5456kb
input:
mkdiekeijohfoieakdljedbbplpeenlhdiipknpfegpheibiofhbgnaklmknnhleofmmhieggchpmkjcbcbbjipbdlbbhfinchdmdepoaddaonnnlohpboaiaipbneppmjoblnophfjljbocfhlemnpjkmpcddcclicddhpplcommmnlmhonpnenacoppfjahfkkfdbjfaahnlkbhmjiojpfhldedjekemjadgmpfcpgoegndnnfppggaeagkhkcmoknajdajfhplheoipdfmancgpblcmpimbdicmdjmjfc...
output:
11314522779
result:
ok answer is '11314522779'
Test #25:
score: 0
Accepted
time: 63ms
memory: 5228kb
input:
nblbejjbepcebeandgolnejlplfpehhdcdomhgbiemljbeeekjfppmbelmmnomkiekfobfibcbbjjfnbjcikhkbbmeocfedojmbolnjpmmpnedgpmdlaldbfbpfopjedndpfhofpkgnladamndhapaomohdkndakmafnkkiflcnenaplopnolfnckfidmnenaomihhligcopoibpahbjnoejfmndkidfaogikbkaohjmghpiiaidimnoepngkfajpajllnpbdbiejbcplonbkkmfbpmmopbnkcnfhfoafaal...
output:
11319558496
result:
ok answer is '11319558496'
Test #26:
score: 0
Accepted
time: 68ms
memory: 5632kb
input:
oijhpjpichaldjeidapjggeiapogapfffadlifnpcfoeedcemknhpohahekjjppnpjlakgodpphnbnffbnmgefjfofaicjenfnlaoophlamgcmpfbidikdiicobiihgmkpdepeabadnhkanmkdjppgnmonikeipkfbajlbokmnfdackbkppofpdhjbigbnpdablaplajjdkcilgndnpbjlhkbmghnlccnceaknaidaegocbnoacdnibpnhmolakmcmleophgnbhldfbkmkacmifcpkpiepbnjidnniogmkgo...
output:
11326125099
result:
ok answer is '11326125099'
Test #27:
score: 0
Accepted
time: 63ms
memory: 5436kb
input:
bkchbnkbknlnmmdlkeignliofkpplhkajomloddcloaonmocecmdhinlokldgcoodohdkdlompifebdnjfmnobdnhbhbafbnnjoackhghgoiekaefmpbhmhalahpcfcoofloffhmcdccehfooebnehjjkpibiojmijideoplbadhjneghbbbgepdkeganhkifoepbohjejlnfahicjlhbepbmcfckkeemfhpjmoadgnempkkiakeledgoaceelmnnnidedkpcfnbkjhkphakcjmmjcgkmffedcddmpdeddeh...
output:
11323224455
result:
ok answer is '11323224455'
Test #28:
score: 0
Accepted
time: 53ms
memory: 5272kb
input:
jaloijhcgekiahdifidgbjnecfolobgledafgncjfmlmmgbenchenccihiceomlfchnbeelnjkeleohcdhifjooehohekmeemdfhdeiecnlchaacjaegagbhelmleghhleicnbdkgajikgcnmmhclmdoenfojecaaldoehlifggcklicmefdhjimcihhehdbhfkcmemnojlohkgmeinhfhjbggengehfkaddjajgacdgehbelmdohhohechelmcglcddhkjinmddjlclaccfnlnfbjnlagieokiihfdainnk...
output:
11264990424
result:
ok answer is '11264990424'
Test #29:
score: 0
Accepted
time: 60ms
memory: 5224kb
input:
bginfiikbcehakamkicnomkabonleibjjnagenmkicgkegcfihmlccmgejjbbamgjbnegclcmmmjbiabiocegcfnffmlgjnlekbhialcdalnbilmhcgcojoeghcknlblollcdgdnjfmoifjfadidhadmnlkdmjlflllhikbaiecomocefechjgconbnbdblokennfhhelgbinadmlmdbaicfabgelddhneeaaomecemiagdlekdmjlelglmbobfkgejcbaiochlllggiadandembgjnfehfbhdkimdooeacf...
output:
11266209262
result:
ok answer is '11266209262'
Test #30:
score: 0
Accepted
time: 14ms
memory: 5720kb
input:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
0
result:
ok answer is '0'
Test #31:
score: 0
Accepted
time: 24ms
memory: 5056kb
input:
baaaabbaaababaaabaabbbaabbaababbaabaabbbabbabbaabbaaabaabbabbabbbbaaabaabbaaabbbabbbaababaabaabbaabbabaabbbbbbaaabaabbaaabbabbbababbabbabbbaaaabbbbbababbabaabbaabbabbaaaabbabaabbaabbaaabbbabbbbaabbbaaaabbbbbbbbbbbabaabbabaabbbabbbabbbabaababaaaaabaaaaaabbbabaaabbbbbbbbbaabbbbabaaaabbaababbbbbabbaaab...
output:
11283120735
result:
ok answer is '11283120735'
Test #32:
score: 0
Accepted
time: 27ms
memory: 5176kb
input:
bbcbabbccccabbacabbbcbcbbbbcbbababccaacaabcbcababbbbaabbbcbbaabababcabbabaabbabaacbbcbcbbccbbcbccabbaaabcacabcbbaccabcaabcccabbcabbbabbbcacbaccbabcbbaccbabcccaabcbaaaccaabcccaaaacbabccbbcbabaacbbcacbaabaabbccccaacbcccaccaacbaabcabbbccaaaaabbbacacbbccbbbcabaabacabaaabbccaababbbbcbabcccccababccbacbaaa...
output:
10035076517
result:
ok answer is '10035076517'
Test #33:
score: 0
Accepted
time: 27ms
memory: 5184kb
input:
cdacdababbbbbabdccbacbccccacbabcadcbbcddaaadadcbaadccdaadadccbdadbbacbdbadacaaacacdddbdbdcccdbcadacbdaabdcddbbdacdbabacbadcabbbcbbbbdacbbdabcbaccbaddcadacdcdbabdaaabbbddabbdaabadcddacccddbaabcacdabbdadddadddcacaccbbcaccacdabaadbcbdbdccaababbddddbdddbbdbdaadcdaacdccaacdabbacdbbcacbdbcddcadbbddcbaddca...
output:
11309284824
result:
ok answer is '11309284824'
Test #34:
score: 0
Accepted
time: 41ms
memory: 5356kb
input:
hchdocgchdchakfcfccllhcdhgfpaoclclmddccodcoclcamcmdgacdhianddcmgcefahcckchdcchcfbdgccmdcodddbdfdffdpkmhdcchddlgfdcphcahdjccdklcdcoahdchoccdmchdpahchchefnckhlmfapgdfdfoohlkdkocodgfhlddkhchhdhkhcddaokcfcodcfkkbkkcddlhhchahpccgdddahmoocdhfcffcdckdgghfccfhdkcccdchdhccaahdhdacpdcfdchpdhchcdchdcaaddkocoda...
output:
11291928107
result:
ok answer is '11291928107'
Test #35:
score: 0
Accepted
time: 48ms
memory: 5268kb
input:
igmmniaeodfgagafemlaggmigagolajoefoagoifloamagejhinaaoagbgibmolmlgmgaaalflaaloliogafefgalmanegabaijgglijmgoggonmafcalfaclaomffamiigfonafjaeoaaglleaamlmmagegfkomaoagaganggogmhcaabmgfmaaaaaiealabloleoggeflmgaafbaamiloloamemaaalomgfgegakagelgfgfindghlllahamclllnclmgegnloigalonaihloegololggioaamglmnoami...
output:
11322837231
result:
ok answer is '11322837231'
Test #36:
score: 0
Accepted
time: 37ms
memory: 4884kb
input:
aaaegkagaagekjaieoelbagalocaagacacaecogaagfcaaekkaleaeaegoaeaabbabkehhaecbaeehabokaadllaedfaeakeckeebaeadackgaaaedeaeejamaeleeachaafclhmjbkoegaaakehaemahalmaoafmbamgafaaaaahhggeheaageoeageahanaggbeggeaaabcgaljbkkaiakmagbhamdjgalakonaeaaefbmkcheebaeabalaabaaaabaebdlakhaaaaggmcacaaeeeeiageakkdbeaahaae...
output:
11299481719
result:
ok answer is '11299481719'
Test #37:
score: 0
Accepted
time: 53ms
memory: 5172kb
input:
jehpilphidkccdjdcicplmpcjamhidnejjijjiohppdadhpcfciclmpillccpcdacpahciciodchkmpmciicceepachlpckhhjlipicochhjhidcihljhajclfiidicecjhiccdjpehipijjhfecccdhccpcidpjiphepiddphllhaicjemhpeiicdmfpamfieihichihdphplilcicdpkodcilepjhcchchcpoilhjhlijjcpjclpccpfejhopidilpcpfjabdpolioolccidcihdhpddhcickihhpjddic...
output:
11311249285
result:
ok answer is '11311249285'
Test #38:
score: 0
Accepted
time: 50ms
memory: 5444kb
input:
iimkciihfiibdppildkcmkbbkpeiebifikbkimkidhiihiicebgpmgibpibcdihcdglmihjinjiikimgjjbhnikimkgpijdipkbpclminpbiggpipiniicgjbipcpeikbinipcdebhdgbbpimcdbidkdiigmnepegdmpmkdpjhiggiknikpicpipiekgnbppidinjmppheicdgeciipeimdcpighdhkmiikbijgjpmicieiniiidkmichhimhbpmikppgigjdiipndbpdojgdhkmjmmpmjgmlkndcgdbnmib...
output:
11289686938
result:
ok answer is '11289686938'
Test #39:
score: 0
Accepted
time: 43ms
memory: 5284kb
input:
mhhhhmhplljmdlacpmdlehhopahieebcjhcmmhnhmhkjhmhkmledmldheaghemhheehmmlhhldnhmaklbaechljnmhhhmhcmcpmmhbmckdhmhkabhmmplhcpchegahoegceohhhhheeckhcmabphhhemmhgkhdecmlmhhecehmemdeeeghcdphlcegmcpejmmdfphhchaemehjbemmjpgmhhphhedbllemdllhmlhmeemhhebfnpnemlmmhchhheelmemgchlljhlbahhklikpiemmmechdeldejhhnfkbpm...
output:
11310963550
result:
ok answer is '11310963550'
Test #40:
score: 0
Accepted
time: 44ms
memory: 5184kb
input:
kflgliijhkkglmolahmhhljennklolhhmlnflelllcdlhklldllgglhllnkeaeggikelhdlpnnhklkahjheifajephhkmekhieghjlheldhhlgkfkllekkghllhdlhlklihdhhekeihlllhenlhlmoklnmlajlkeallhlepgmglfjelejakeemhlhikeghldlldlepjflimellflhllekkklejcelelljknlhlkffclloigdlllkmeehmlehkpjljnmddfnmlhlfkfemeplalenmeeehfllaeaoakeelleee...
output:
11302371678
result:
ok answer is '11302371678'
Test #41:
score: 0
Accepted
time: 49ms
memory: 5356kb
input:
nfnnngnikeficfgljnnlefeneilleenaaglhanikalggnfoknddedookleneceojakecmeknkaelfnakbjlflagnnibeanbnlnnnhbakedeeinoknnflnboeblalanoffjmhfolebbfhhejnnkjkofhjnefhnngfefobkhaileoednjfineefdlhbmekeikfeeoioenlnncbelaenanfajhklabohndalnboekfknleegmfeklkhecnflfoegfneajnemlckelfjeefekekeenobnbghlnlfkelhbkbbhenh...
output:
11299605236
result:
ok answer is '11299605236'
Test #42:
score: 0
Accepted
time: 30ms
memory: 5056kb
input:
dabdecagccbddcffddcdfbgfgddcfcdcdcffeccfcdedcfdcecfcfcfddddgcbcffcccdddcfefgbcddfdgfgdddecdafdaddcefcdbccfdgdbfgfgccfefcacfcffcfcdcdafbfcbcfcccfcdddcacdcfddccgccddfcdcfcdadceccedcdfccdcdccfacefdddffdeadfecfcfefaffcccedfcfgcfcfcfgfdcddbcdffdceffccffefeffcdaedbadddabcecbabddbaccecbcdaccdccecfccccdfdfd...
output:
11266097504
result:
ok answer is '11266097504'
Test #43:
score: 0
Accepted
time: 34ms
memory: 5220kb
input:
dabdecagccbddcffddcdfbgfgddcfcdcdcffeccfcdedcfdcecfcfcfddddgcbcffcccdddcfefgbcddfdgfgdddecdafdaddcefcdbccfdgdbfgfgccfefcacfcffcfcdcdafbfcbcfcccfcdddcacdcfddccgccddfcdcfcdadceccedcdfccdcdccfacefdddffdeadfecfcfefaffcccedfcfgcfcfcfgfdcddbcdffdceffccffefeffcdaedbadddabcecbabddbaccecbcdaccdccecfccccdfdfd...
output:
11266097504
result:
ok answer is '11266097504'
Test #44:
score: 0
Accepted
time: 36ms
memory: 5588kb
input:
aaoanalallaagollalaacaodanaaaiaalcioaadacaakaaaaanfaoldaaldcoaooapdnaafaalapaidcaacaalgaacaloaaldancnnaalaaaaipapacoliaoalapalnagndaaalaiapccioiapaaaacaaaapdakafanadcaaaldldaaaakpafaocfdpckgaaaaaafgdlpaaadaaaaipaianafdadcaaoanppnnaacaapaaaagidpnlppglanpcaplflapcalpkaoalacnaplaoaipccaafaafagaaimnfdca...
output:
11298062553
result:
ok answer is '11298062553'
Test #45:
score: 0
Accepted
time: 38ms
memory: 5360kb
input:
hhpoakpomkmhghdfhhkhhkkhokhkehhmhbpkphkhhahhhkhkjahphhhnhkahkhhhchnahnmkoohhkhmhphkhmohmnahhekkhkehphiokhkkoahkhhoakihhoghhhihhhefphakmoahfhhhhhmhkkhhhhkhhkhhhhhphhkkhhdhhnpmhhphohnidkhehokdhlphhaaahekhhhighahhmhhhahhhkhlhkhhahnhhkhhhafhnmhhhlhhalbhkahhahhhhokhemhhhoohbhhfhhehhpkihnhhhhahhahnkphahhk...
output:
11262549508
result:
ok answer is '11262549508'
Test #46:
score: 0
Accepted
time: 36ms
memory: 5324kb
input:
pnpppklnpppppffkpppnppppppbifpppkiolpppdfpppmpppnpbpkppipbppnpbpkpppinepppkpkmpdooopgpnodphhpopppppbhnpppnpiipppknpphpppppmpgkigfbphkppmobgipehpkpfppppppilppfbnpnlbnpndkpkphppoobffppfpppbpppopppplfpgdpghbppnmpoppbfpppbpbifppplppfpofppkppbphponnodpbpppkpapbpfppfpppppnppnplnpippfpbpippppfipoknpebpepph...
output:
11148220295
result:
ok answer is '11148220295'
Test #47:
score: 0
Accepted
time: 25ms
memory: 5608kb
input:
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeedeeeeeeeeeeeeemeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeepeeeeeeeeeeeeeeeeeeeeeeeeeeegeeeeeneedeeeejeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeeeeeeeeeeeeeeeeeeeeeeoeeebeeeeeeeeeeeeeoeeeeeeeeeeeeeeeeeeeeeeejeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee...
output:
2119569528
result:
ok answer is '2119569528'
Test #48:
score: 0
Accepted
time: 32ms
memory: 4964kb
input:
kppkpkdpkppppmkkppkppmkppjkppppfkpdekpppkpfpkpenpbkpkmfkmkkppkkkpkppncdcpkkpkkppkppknkpppppkpkkkkpfpkppekpmkkpmmkkkpkpfpkkkkmppkpfkfkkppkpkkkkkkpkkpepkpppefokppndpfkkphpkfpkkppekkkkkpkbkpkkekpkkpknkpkpnfkkkpkpkkkepfpkmkpkpkpjkkpockkkpkpekkfkpppkkkpkekkcpkpkmppkkppkphekpmkpppkpkjkkkkpkkkapkkpkkppkmpk...
output:
11320310199
result:
ok answer is '11320310199'
Test #49:
score: 0
Accepted
time: 20ms
memory: 4912kb
input:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
22400000000
result:
ok answer is '22400000000'
Test #50:
score: 0
Accepted
time: 19ms
memory: 5020kb
input:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
22500000000
result:
ok answer is '22500000000'
Test #51:
score: 0
Accepted
time: 57ms
memory: 5364kb
input:
lbggdafkplacpcpipoohgofcefinbgmjkacmgjcolhmaaniallcehbijjpdejdcaakchchicpcddgndggpdiogaejbkdbpkjppdeffhofehaicpkkeofiehbgceilhpadfcdimibjimiafdhelmcdlpcelnbcgkfakkfdioelmlgiapccjlpnibkjlhebbjjaejibebekkefjcnffjjdeaonligkgpenlmonaghfneobaimegjppakjijikdopdldolnfmjdfoanhefjhccaknljloolekkabimnelofkioo...
output:
11330265766
result:
ok answer is '11330265766'
Test #52:
score: 0
Accepted
time: 68ms
memory: 5344kb
input:
lbggdafkplacpcpipoohgofcefinbgmjkacmgjcolhmaaniallcehbijjpdejdcaakchchicpcddgndggpdiogaejbkdbpkjppdeffhofehaicpkkeofiehbgceilhpadfcdimibjimiafdhelmcdlpcelnbcgkfakkfdioelmlgiapccjlpnibkjlhebbjjaejibebekkefjcnffjjdeaonligkgpenlmonaghfneobaimegjppakjijikdopdldolnfmjdfoanhefjhccaknljloolekkabimnelofkioo...
output:
11330265767
result:
ok answer is '11330265767'
Test #53:
score: 0
Accepted
time: 68ms
memory: 5224kb
input:
leoahnpanophdibnldpiablmngaegpfipkifhmacjcnjddckpkdkjajldlnalimabnbbanolemiadccpafciafhghglmmemjfoliogggnlcmchjmbdcekoidaeijjnhpodamhmgomkfkkglhljipakpjfjkpcahfooegllepknnoigapjpcabojigonbifomogejfpgalnnpofebflomkcbmdkfapbpaidahjgppiiepboipcndjiejogajimngkfhkoghkhncceplddfmdcacliecbfgmdjbnilipagiklg...
output:
11314337725
result:
ok answer is '11314337725'
Test #54:
score: 0
Accepted
time: 68ms
memory: 5276kb
input:
leoahnpanophdibnldpiablmngaegpfipkifhmacjcnjddckpkdkjajldlnalimabnbbanolemiadccpafciafhghglmmemjfoliogggnlcmchjmbdcekoidaeijjnhpodamhmgomkfkkglhljipakpjfjkpcahfooegllepknnoigapjpcabojigonbifomogejfpgalnnpofebflomkcbmdkfapbpaidahjgppiiepboipcndjiejogajimngkfhkoghkhncceplddfmdcacliecbfgmdjbnilipagiklg...
output:
11314337725
result:
ok answer is '11314337725'
Test #55:
score: 0
Accepted
time: 68ms
memory: 5232kb
input:
libmbjmjdnkfmbagmcpnclojpaicphciihbmhggbeoclhbpbofiijgeflcpbfgefghcdlahdcdhgefihiihiflffneaoonloiodbalboidjcealgpjbeelnchdcekbkekempcchfgjcjagocoeealfpacplfnnnfjnbbohcbhnhgdjafhnfkabgdcnlnldhfefgoplpbabkmmemckfmedhfcljfihlbeegkelbcbphhkmmpbobhllajhhipbcdlfppfoajkgfahmmieaaodmjalobglhhglbbajmhoelepcd...
output:
11310856703
result:
ok answer is '11310856703'
Test #56:
score: 0
Accepted
time: 63ms
memory: 5388kb
input:
loomodkebhanlmmecjogmlailfphncdkfgmdehdjmllgmhogimanfbhhocjiinjpoidnfccikhogijennjfhlgjclnakhlijjalpneifhnlfnoghcfkggkhanpahnbgbihekkmlegfdglfkgmmafhmaedoadcnmebgpekbhkmmkohloflddoibkmnibgkmfgccohmilijgkmepgkggekonknehiemojlogmdhhplcbidadpilfmfjajdlalnacbmcelmebipmjngoniojhcofilkclmcmiagbeapbilflhbg...
output:
11312224011
result:
ok answer is '11312224011'
Test #57:
score: 0
Accepted
time: 53ms
memory: 5348kb
input:
nbkggpnocokiglglboefodkeegkdkkkkihlbeoodblnnbllkkledolleokkgbocfkfingpnloeekogpdonnlbonkkindggedflghhekkdfoledhknggenedpllnkigkoaokpkgglphlogngdikncopeoikndkegnlkoklidlefooocgkongkociinoogknilekdablklgggngaindgikjnlolggknkhgonllobgneefeidfiookgogololnkkilklbclcgdofooekikkggddnhpccloooddlggeedclnbkln...
output:
11299346703
result:
ok answer is '11299346703'
Test #58:
score: 0
Accepted
time: 54ms
memory: 5348kb
input:
nbkggpnocokiglglboefodkeegkdkkkkihlbeoodblnnbllkkledolleokkgbocfkfingpnloeekogpdonnlbonkkindggedflghhekkdfoledhknggenedpllnkigkoaokpkgglphlogngdikncopeoikndkegnlkoklidlefooocgkongkociinoogknilekdablklgggngaindgikjnlolggknkhgonllobgneefeidfiookgogololnkkilklbclcgdofooekikkggddnhpccloooddlggeedclnbkln...
output:
11299346706
result:
ok answer is '11299346706'
Test #59:
score: 0
Accepted
time: 57ms
memory: 5312kb
input:
fafmjefkajnafaekaeofaabeahldeclkdfhpcdigdjdbfgfgeehocgegfnhlddglhckddoghnfennfkablcifjlcochhdjdkafojgcchakcgjhcabdefcckojbajgjcffgdoejdokbofhkoeffnaneehbjhepjgeckdiaffdjkgdpkaebgafmnifppdeiajccebdagkokcfghbbcdggfeeepjinhfeancnbohpfmflbaaafoghanchajkdmdcciepdhhedpijefieoedgbkfpdcdjfcnpdfhnogfcefbfdkh...
output:
11300860242
result:
ok answer is '11300860242'
Test #60:
score: 0
Accepted
time: 62ms
memory: 5224kb
input:
fafmjefkajnafaekaeofaabeahldeclkdfhpcdigdjdbfgfgeehocgegfnhlddglhckddoghnfennfkablcifjlcochhdjdkafojgcchakcgjhcabdefcckojbajgjcffgdoejdokbofhkoeffnaneehbjhepjgeckdiaffdjkgdpkaebgafmnifppdeiajccebdagkokcfghbbcdggfeeepjinhfeancnbohpfmflbaaafoghanchajkdmdcciepdhhedpijefieoedgbkfpdcdjfcnpdfhnogfcefbfdkh...
output:
11300860244
result:
ok answer is '11300860244'
Test #61:
score: 0
Accepted
time: 38ms
memory: 4948kb
input:
cockoocodimificcffkkcddgcccccoiofdndhgaobcomcccpcchonoikoooffcmfooofdocococbpoocoocmlooohicmchcobjokccccophddmmohpcohocodichockcdkcfcfakohoaococcicoocmnacocfddpcmfnioihmccfcooofmpfcmpbpihomooococmkcooaomcicbdoodccdhcooooccocicmojkkmofidfkofnchkcocckcfoofoicoomcmmoccocbdmhiccokmifcohfcfocadokoihcjoco...
output:
11287058063
result:
ok answer is '11287058063'
Test #62:
score: 0
Accepted
time: 49ms
memory: 4976kb
input:
cockoocodimificcffkkcddgcccccoiofdndhgaobcomcccpcchonoikoooffcmfooofdocococbpoocoocmlooohicmchcobjokccccophddmmohpcohocodichockcdkcfcfakohoaococcicoocmnacocfddpcmfnioihmccfcooofmpfcmpbpihomooococmkcooaomcicbdoodccdhcooooccocicmojkkmofidfkofnchkcocckcfoofoicoomcmmoccocbdmhiccokmifcohfcfocadokoihcjoco...
output:
11287058061
result:
ok answer is '11287058061'
Test #63:
score: 0
Accepted
time: 54ms
memory: 5312kb
input:
agppccnlpacacdjpplilbopichdpaobecolphonnodhacbadlnpnbecaolledagbjhccoacpliihpadnljdcelhdhohaiolhcclpoohollllelhpdbodpllacpdaciaeoihodhhgghjpajnpncpgddcdhogbdoachhplcoinpejjhaconcdajdlpocjlolopgiipepncgcleapldnckcjdillokhljbopaoogonlomkccihhnaocnlcgnhipdkmihoimccljolahppehbhlckhhkdoknpjplejoohdecojol...
output:
11337287002
result:
ok answer is '11337287002'
Test #64:
score: 0
Accepted
time: 47ms
memory: 5360kb
input:
eiieofkhilioaidkldoidcbhddfebchlobiiihobdohmcibldmdbeihhilcebifeicodohiohimmlilialeoliiiimeppeilhhideifdfhlihohbaplahilbdcchpiedihiemahehdliondlcbcliiedhcmhehfiopipbhohdghdibaoidohhelcdbdndoidaedeelddcbiihoihlibdacilhchmlifeicnoecidicchddliiohifhifiloihmadeihieiedileeilicialhelipmchodilchimbdegdhhdc...
output:
11310158723
result:
ok answer is '11310158723'
Test #65:
score: 0
Accepted
time: 63ms
memory: 5552kb
input:
egbelbigmkgpbmcdahjfobeejhfcnppdifkncbjfebbnjacknncdfeikcmnmbaafpfbillejdlgohjnopcobogonmdgfnkpiiakajpfbnakbmcglfnkoopieplkcfgibkhnjogfmhiahgogabkijeipmanlaigkpkelddiglagambmaklmofpmlgnalbenkimjpbembkekmmcjapemnhlcciofjibamdligcblnkbfodmadfolngencnkcpdngdpkihgkgakamjlailkegfkfloflllmpldmikbgddfaddcg...
output:
11250000000
result:
ok answer is '11250000000'
Test #66:
score: 0
Accepted
time: 60ms
memory: 5480kb
input:
idjjgcpcmejokioochickjmimbacdmnhdcoidgjaknmacighlekfnojflabbbhaeejckmidehiacpbgkpigcnhcgdljaebehhnejppbebojblamnffmeiamdndmofgnpeelcbkbhjcmpjcgpoijglhcjnmkoadmdiklcjheoalbfnmejgakdcbkhieidkjfihcdeknhpjgcmdnhlkjllpjgjfppljgniljocgnphedlpdgiidpmejbhipnhfffnkpebblnbaneiblghgboanlojefbpanocihnpiimibcmco...
output:
11249925000
result:
ok answer is '11249925000'
Test #67:
score: 0
Accepted
time: 44ms
memory: 4956kb
input:
dabbkbbdbbbbdbdabbbbkbddbdbbmkbbeeabpbobbgkbigbbbgkegebiggobbkbbpbbmjpdjbiebfakbbbdddbmombbbbbbbbbobdiidbdbeoedibbbaibbekkepiddbobbakbbbabbbbbbbehgbgobpbbgdbodbldpbkbbmibfbgobbbbbbfbjokbbbbbbdobfkhbjdlaobgkbjikbdbbdmkbbdobfmbbbdbbobebdbobbpfiokdbdabodbjblmobobebkbigeefbbgdofbmmbdbkbabbbblbbmbbekdobb...
output:
11249999838
result:
ok answer is '11249999838'
Test #68:
score: 0
Accepted
time: 64ms
memory: 5364kb
input:
dehfpjfjjaeoekjpkolmfmjdjmmocefbpcfipfdiodmabblndifhjhimhhhaljeeegcephjncokglimggjhjeifnmecnjnnoeoddeioilhfohladknpbkbfnebbmmcnlldbkiokloipkdjgabnjepgfokfggmlkimlicceagegofdaggmlnmakpnmgcoiekdkjbnmbodjjgjhgikepfhlklkcoplhjdecdhpcjiofaokoimcfobkheldncpanalfejipfhfieaiaiddioojbhgjfojfimbbkbingnajjnakg...
output:
11268884332
result:
ok answer is '11268884332'
Test #69:
score: 0
Accepted
time: 60ms
memory: 5364kb
input:
fibfnpadfnnkmcbmclbbfghkbibkmhliaombkmpeafkokpogifknmflhogeejkhclocdkbkacepifikohomconocpdbbpkggjolopbbjoppodpeiopbjloegkijhhnmgagbampafobnaoaleifglbkejddkakkoaahibknlpbdkfjfbdmhmmklbeikhjdebdfolmgfnkhlllkdlcncdkcpbmcanoihmlgccakijpnfefchbkogfpboblhgoemohbbfdelclhkbbndejkonjgediebggmdcjicaaeagangepf...
output:
11280292785
result:
ok answer is '11280292785'
Test #70:
score: 0
Accepted
time: 65ms
memory: 5364kb
input:
ejjoaodmkngefceimmjgiekocinjcficnpbgeehkcmcgngmealdjhdjmmjhicfkgbhacjbldigllfnmhjincagepkhaoiobiopcfbaejlhfmhhpommonajigjooddmbafflcmhdjlkiigoobijegahogjkioiaiajigelfmgpgcebcahdbfgdddekdbolbokkllcjhggfnfghmgldobabffhghiolchfioimjkffmiecngpbjpbbmhcdikoilegomcghlbboialcjpiecagllaoeepngmnngipneghhbcepo...
output:
11250244268
result:
ok answer is '11250244268'
Test #71:
score: 0
Accepted
time: 69ms
memory: 5224kb
input:
kbnomlehcjpafeoohnbmpibdkflklefkmdmdeglndekaikkpaeghhcbedpophfgcjbjdalhibbmapfninacgpaoifeocoonopjpfaacocbopldgilhjogomhjoppnhafioomhnbfhapephdohnoiepeokegjmfnkopffnnhjlpfhgmleipflpnacgimjbjjgklcjpnojdfaehhdkjdaokcbnohgkpmaephnjfobejmpmjfpceinehebiadlglmkhakjfihjaflnlclalccjdbegfnnhaglbiihpipjlimfkh...
output:
11251130124
result:
ok answer is '11251130124'
Test #72:
score: 0
Accepted
time: 70ms
memory: 5500kb
input:
ghojngfpncpllmckaohdfekdpkomkgkpijdblkciaiijbcdbfkacdkjgkhgihnoaahkgjhemlnieedemkagoeheghcigjaehljinehpfpeagkohgknlgnidhhnnhamjocjbhfkibebfgdgobjeadmnjpkaacfoepopooepnaojibmiifbhbnhpfhgbmleccgggjkpaomjkeffeaakcpehnfkkeapmcgilagnfoiepofghmjgbmbpebfgfdhdjlanlihmcapigjdeggmoimkmfglhlifmmlnhdipdoeifbgem...
output:
11252676819
result:
ok answer is '11252676819'
Test #73:
score: 0
Accepted
time: 70ms
memory: 5364kb
input:
aeafipbhnfflkpnbklibgmcmihlgonepflbfipnelpfncihjpcgaokpicablcikjnpmlicnnldbkelchlnhimhcipenjdkbaeehcjjgabpjnnhipnidgagmhenlngcmghooidfnhaojbfhnibaedfpfejalgcpadkgdgaeplfnnahepnckepbbomfaocjpmnhjaahonbobabelafhdjoohpilecgchbcpcaaehomlkhigjgpahhhdjbgjjlkllplaejhclkaijmiehiikjamaodgfdfepokpnldenkcoggpo...
output:
11257886685
result:
ok answer is '11257886685'
Test #74:
score: 0
Accepted
time: 65ms
memory: 5236kb
input:
lbggdafkplacpcpipoohgofcefinbimjkacmgjcolhmaaniallcehbijjpdejdcaakchchicpcddgndggpdiogaejbkdbpkjppdeffhofehaicpkkeofiehbgceilhpadfcdimibjimilfdhelmcdlpomlnbcgkfakkfdooelmlgiapccjlpnibkjlhebbjjaejibebekkefjcnffjjdeaonligkgpenlmonaghfneobaimegjppakjijikdopdldolnfmjdfoanhefjhccaknljlooljkkabimnelofkioo...
output:
11250015594
result:
ok answer is '11250015594'
Test #75:
score: 0
Accepted
time: 66ms
memory: 5364kb
input:
lbggdafkplacpcpipoohgofcefinbimjkacmgjcolhmaaniallcehbijjpdejdcaakchchicpcddgndggpdiogaejbkdbpkjppdeffhofehaicpkkeofiehbgceilhpadfcdimibjimilfdhelmcdlpomlnbcgkfakkfdooelmlgiapccjlpnibkjlhebbjjaejibebekkefjcnffjjdeaonligkgpenlmonaghfneobaimegjppakjijikdopdldolnfmjdfoanhefjhccaknljlooljkkabimnelofkioo...
output:
11250015594
result:
ok answer is '11250015594'
Test #76:
score: 0
Accepted
time: 69ms
memory: 5308kb
input:
leoahnpanophdibnldpiablmngaegpfipkifhmacjcnjddckpkdkjajldlnalimabnbbanolemiadccpafciafhghgemmemjfoliogggclcmchjmbdcekoidaeijjnhpodamhmgomkfkkglhljipakpjfjkpcahfooegllepknnoigapjpcabojigonbifomogejfpgalnnpofebflomkcbmdkfapbpaidahjgppiiepboipcndjiejogajimngkfhkoghkhncceplddfmdcacliecbfgmdjbnilipagiklg...
output:
11250088803
result:
ok answer is '11250088803'