QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#562130 | #176. Hidden Anagrams | PetroTarnavskyi# | AC ✓ | 2708ms | 136408kb | C++20 | 1.4kb | 2024-09-13 15:15:41 | 2024-09-13 15:15:47 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define RFOR(i, a, b) for(int i = (a) - 1; i >= (b); i--)
#define SZ(a) int(a.size())
#define ALL(a) a.begin(), a.end()
#define PB push_back
#define MP make_pair
#define F first
#define S second
typedef long long LL;
typedef vector<int> VI;
typedef vector<LL> VL;
typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;
typedef double db;
const LL mod1 = 1e9 + 7;
const LL mod2 = 1e9 + 9;
const LL mod = mod1 * mod2;
LL add(LL a, LL b)
{
return a + b < mod ? a + b : a + b - mod;
}
LL mult(LL a, LL b)
{
return (__int128)a * b % mod;
}
const int N = 26;
LL p = 47474747;
LL pw[N];
string s, t;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
pw[0] = 1;
FOR (i, 1, 26)
pw[i] = mult(pw[i - 1], p);
cin >> s >> t;
int n = SZ(s), m = SZ(t);
vector<pair<int, LL>> v;
FOR (l, 0, n)
{
LL h = pw[s[l] - 'a'];
FOR (r, l + 1, n + 1)
{
v.PB({r - l, h});
if (r != n)
h = add(h, pw[s[r] - 'a']);
}
}
int ans = 0;
sort(ALL(v));
FOR (l, 0, m)
{
LL h = pw[t[l] - 'a'];
FOR (r, l + 1, m + 1)
{
int len = r - l;
pair<int, LL> par = MP(len, h);
int j = lower_bound(ALL(v), par) - v.begin();
if (j < SZ(v) && v[j] == par)
ans = max(ans, len);
if (r != m)
h = add(h, pw[t[r] - 'a']);
}
}
cout << ans << '\n';
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3536kb
input:
xxjtxfjkfrxtkqeetkbkjkqewxftjsljrwsrbrrtftjkwwnetfnxekrqff cvudyzcyuhpcdhzvdoupyapamyiiiocvvdgazgddgoduiupmcdiyaozydzvdzdgoapuidgdopuouaddiziupia
output:
0
result:
ok single line: '0'
Test #2:
score: 0
Accepted
time: 1ms
memory: 3896kb
input:
xjdndenqegqqkwnogomtnknextlowtwojwejqexdoxtdmexqtxdwodlmgddowenj upvhhvvraizvapcpzuzyafrzcpiubhuzsizuyhsivcypbzivpaubfzfabiuvshicbscyfcuhrphaaacuvfbzcvbbbh
output:
0
result:
ok single line: '0'
Test #3:
score: 0
Accepted
time: 1ms
memory: 3660kb
input:
jvjfohxjhmujufluhahmuiimfazhxzlizchaamojojcxvhilvuuumjcfvxavahhvfxhj btpteyswdknebkbbdqkqtsqwpwdbrkgdndtpkbdqepptpqbbgtbrqkeqyqgwgkttd
output:
0
result:
ok single line: '0'
Test #4:
score: 0
Accepted
time: 1ms
memory: 3852kb
input:
nvymjjolivgyhnnjamihvvippaoylyaiviiiaiiosopmlpnnjnmlpmpjsysyjmasosoyaioplshosmmvvv fuztztbbuxqkedzuqkrterfccefkwcfzzzcdedfbzcrkecqtqxqeuuzwkxwqwzukcttcgfedqxededbxre
output:
1
result:
ok single line: '1'
Test #5:
score: 0
Accepted
time: 1ms
memory: 3568kb
input:
nwqnqdvcccnaeepdwcwedyyawwkyeonovqwdyckddpaeckckwwynwnpyycaaocqavkywnatpyeyaeyok mgmzlgzggmlfxjrmlsrbhsizbgsiuuijjgimblxjgsxstbmirguxrirzuxhbslxzrlslszlssuxhjfjj
output:
1
result:
ok single line: '1'
Test #6:
score: 0
Accepted
time: 1ms
memory: 3660kb
input:
wfoqjzjeoqazoemlqwpmepweofllzalmlooojmacojmfjoozepwwqjemwz bgrruvunibrtssyiucxknsvsgnkvbnurdnxyuxnvrxvdbrkngrdvnkxrvg
output:
1
result:
ok single line: '1'
Test #7:
score: 0
Accepted
time: 1ms
memory: 3712kb
input:
gnrutbrtqeniipwjipgpltphkftyfxsworebqkqweuyzgktppkdeewihcurwbsfvdh fpxrjfcdkysghtohiiwsbiubkqneuhptgreieqpttrkrqwtezpwpbwvupenkglywdf
output:
66
result:
ok single line: '66'
Test #8:
score: 0
Accepted
time: 2ms
memory: 3656kb
input:
qipemwdxlcurlrrzxqvsatjoveecsevgpzykljfezmomdteijvvzutarauemxrdoayntvnilnmtobdpybuwwazbdseqqy lrizsulzpwhzthdrlfdybwknxlivuybtnnmljykozzsbzfytjeuwduozrtxjkrulaaayteexiddpaqrmidmvqclqolbyescvewnmaoqimtsoglevwverptzzdbnjyrmxvnpuvenhzbqxgwqwturchmyodsubmcrdupbqhyaajoixnfterw
output:
93
result:
ok single line: '93'
Test #9:
score: 0
Accepted
time: 2ms
memory: 3652kb
input:
lrizsulzpwhzthdrlfdybwknxlivuybtnnmljykozzsbzfytjeuwduozrtxjkrulaaayteexiddpaqrmidmvqclqolbyescvewnmaoqimtsoglevwverptzzdbnjyrmxvnpuvenhzbqxgwqwturchmyodsubmcrdupbqhyaajoixnfterw qipemwdxlcurlrrzxqvsatjoveecsevgpzykljfezmomdteijvvzutarauemxrdoayntvnilnmtobdpybuwwazbdseqqy
output:
93
result:
ok single line: '93'
Test #10:
score: 0
Accepted
time: 0ms
memory: 3828kb
input:
yruoqznrfwmwmzgpileisifyxtcxlkeiiilmisoaeeihgczsrtgrnwhseromwgcucezvba epbaiyxuuwtzvnooiirsgemesqahmscroelyngrkzgizmlicccigwsftzimefxhewilwrr
output:
70
result:
ok single line: '70'
Test #11:
score: 0
Accepted
time: 2ms
memory: 3708kb
input:
gmxrkhdcvxbnogftqgqmqlghlvsyyckbobtfejpbsqcsmcmzqsujmilpbrpanjsxkzetsrictzzylnmqzassdbsqadkk lyrbulscpucrokqzrafklgesesdmkqnlkitkrahsggtzrmgcncctbgqlmmjqsvzsbbeoicfsnylsjqayxpmskhyxdcpqmqtknlrpdjfosksdsqamtlxbqzeiubbzvkzhpqlkmucgtfgvtjsntplapadvusvtnwskkcungw
output:
92
result:
ok single line: '92'
Test #12:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
lyrbulscpucrokqzrafklgesesdmkqnlkitkrahsggtzrmgcncctbgqlmmjqsvzsbbeoicfsnylsjqayxpmskhyxdcpqmqtknlrpdjfosksdsqamtlxbqzeiubbzvkzhpqlkmucgtfgvtjsntplapadvusvtnwskkcungw gmxrkhdcvxbnogftqgqmqlghlvsyyckbobtfejpbsqcsmcmzqsujmilpbrpanjsxkzetsrictzzylnmqzassdbsqadkk
output:
92
result:
ok single line: '92'
Test #13:
score: 0
Accepted
time: 0ms
memory: 3524kb
input:
d d
output:
1
result:
ok single line: '1'
Test #14:
score: 0
Accepted
time: 0ms
memory: 3468kb
input:
x b
output:
0
result:
ok single line: '0'
Test #15:
score: 0
Accepted
time: 0ms
memory: 3460kb
input:
v v
output:
1
result:
ok single line: '1'
Test #16:
score: 0
Accepted
time: 0ms
memory: 3532kb
input:
r x
output:
0
result:
ok single line: '0'
Test #17:
score: 0
Accepted
time: 17ms
memory: 3480kb
input:
g wckdvuceywjntkhauwwfyyyqxsuljjmnqozcgnhtbthuhhwmmgtexjxxlawwvjopfvealnrkzqpktdsujzrvinajycupdqhtxuxinlzhbdtqqqfejbcgavbnxwacbabrkkzatargpgijsrqihfgmbhrwobkkndasfqucyfghfjzdbzkxecoehbxjlbscogzhvfdbgbxxdczzxhjwiqnhxbxiygklloyvtmvmcnhpkftudhcyznirjkylnollkmpqalejfjserwxefouueefctihlukfipjcnerlodevkcv...
output:
1
result:
ok single line: '1'
Test #18:
score: 0
Accepted
time: 716ms
memory: 134808kb
input:
ozsljwlxzkladmjibvyqpibpkwnxosrqhfqbmigkgxdtfnnsitxecihwisfonaejqeenboqxpqxbmdwzxjnodurnznaitbjikqaerbgkxdfjxnqyecqpqcnluezomtkvjprcqeaucgttwlpqeyfwenybcluxwzjvixlljnmpolktwnezewpiuwinsptbjqzplpeoeuwpehkycvrsslfznunjihtauplcipxmobnipqekegxmddzkepuqzoqepebgwmkuxipjbncgaskmzjhjnlokvxidvlbjgxsdtxiaikdm...
output:
1
result:
ok single line: '1'
Test #19:
score: 0
Accepted
time: 17ms
memory: 3456kb
input:
f wjccwgexcoyyilhefsyhnclqrfybyrvbiarxspngszdlwkqqsxtyvyifxsjzjpqkqutndbccjtnumlkscwersxoqnhrzixnkujfbdxdodxpywlidkmdfqxroxzqcpksdkdydrhphpkbfbanvkjrtxhlevyxycugybfyywlnvigfgmyqffhoettytyjskfvkrstjhzgfjbeeanblwoengfrlxfxcwilkbqjvextpubzouyntcaaybaayglgobwbhjgryfgsglrgxeswdkfrzuovparpcaoksllnewddovzk...
output:
1
result:
ok single line: '1'
Test #20:
score: 0
Accepted
time: 709ms
memory: 136408kb
input:
hxbxubqvguigdlpsydragglmdghtfzdohhsalalbfcpzgrjbivoathyfqenlsfyzupoktcydtystmbldgownnvgvbsmehlubxlkjgbkogjapbnblrjnjnqvibmugubxgddxbkxgjxnspbvykudcztsyazwlrlvybenfxdiywneagsnnjyknfyrwiwtdebbocwqrijtwrfphfawjridbsxfqalzurcttsstalqeqaqfnmyoanqccafzkqmjfwhaoaugyhqvesbctjgcjdkpcbtarznafuerrdjmefjxmfejkq...
output:
1
result:
ok single line: '1'
Test #21:
score: 0
Accepted
time: 2708ms
memory: 136172kb
input:
eizryfvqsfvuxhuaxyetixnhualrlekhcfompgnnjnyndlzhrdbpipysnwghfgufpvyxqptfcwmjrdnvoaixtzlhmaexrptbykzxnllzfzclycbbejufwggeyrymmkvqncsumleexudhkuoqmlyxhqeffijhhwpeyfleuswitojebijjzhdxskvxecuyjtzjixpkknoabwxjbmuneqjwdunpvmdpdyzvcsnojwuhrtixaiejyzoeujwuofnjwvwigfvhdmapseumjzhlefrnolerpjintzronketlzaqtjdk...
output:
9
result:
ok single line: '9'
Test #22:
score: 0
Accepted
time: 2707ms
memory: 135328kb
input:
nvrccpnrfxsubskjdhuywwakyfnhkzzjecwxxywensyxodzogfrbdbbpruxftedtttqxmqzmubsvtwmbjvvcmatktbuexxtcoxxhklevaqbufkuqjubfasppnandszgxgksvngvfceebzmzvxczprgrzaztoyaikkatuxtthohocygeujxblzwqqgnfdkbyucljrzzxbsseixoibimnkxavhypfbjizhgdbnyoflplskcffnipxzzfnjxhmtigmlvfjcpvmkuggaceijfdiygamspablbewnprgphxiwtrjf...
output:
8
result:
ok single line: '8'
Test #23:
score: 0
Accepted
time: 1ms
memory: 3832kb
input:
lwcnfvkljjomtjoyuayyaaugagaauaayguu zszszrzsrbrsbbszsrsbrbsbszbzbsbbrsbbrszsxnbmqqdzcqrlslbkogppsfcaghqmldzktgstsqdjujczsbosjmcaybqmyxfqvbvbpktssmizrhnzregyceltaxmkiknzssbsbrbszrrbsbrzbzbbbrbrsrrsbsrsrz
output:
2
result:
ok single line: '2'
Test #24:
score: 0
Accepted
time: 1ms
memory: 3596kb
input:
zszszrzsrbrsbbszsrsbrbsbszbzbsbbrsbbrszsxnbmqqdzcqrlslbkogppsfcaghqmldzktgstsqdjujczsbosjmcaybqmyxfqvbvbpktssmizrhnzregyceltaxmkiknzssbsbrbszrrbsbrzbzbbbrbrsrrsbsrsrz lwcnfvkljjomtjoyuayyaaugagaauaayguu
output:
2
result:
ok single line: '2'
Test #25:
score: 0
Accepted
time: 1ms
memory: 3896kb
input:
rtfefvtafjpiitaebidmqpjrmlevwvpjtpbtrbprdlvpfwgqbppefwgpwlvvadopdrqbeqwwboojfwdrlrbwuuizckczzkkcccckyykzcykkzkkkkyckcyyczkkzzkkcyy nnxxnxhnsnxnnsnnsnhsxaaanyculvyyaujawooklfagmgajyuuutgjahhxnsnsxssxnnxsshhhnxnss
output:
2
result:
ok single line: '2'
Test #26:
score: 0
Accepted
time: 1ms
memory: 3684kb
input:
nnxxnxhnsnxnnsnnsnhsxaaanyculvyyaujawooklfagmgajyuuutgjahhxnsnsxssxnnxsshhhnxnss rtfefvtafjpiitaebidmqpjrmlevwvpjtpbtrbprdlvpfwgqbppefwgpwlvvadopdrqbeqwwboojfwdrlrbwuuizckczzkkcccckyykzcykkzkkkkyckcyyczkkzzkkcyy
output:
2
result:
ok single line: '2'
Test #27:
score: 0
Accepted
time: 3ms
memory: 3740kb
input:
vlzvsaveyhxccwnwwgetvwzcvchsafactehffiibcgzaneeibijvhjxcxigcnhzwwnchcvzlstchwzcniewhgbetfzztztvjtyqddqqqooqqqqooqdodqddqdududodouudqdduuuoodooqdouduoqduudoquoquoqouooqdoddodqdo kkrrkpmmkrpppprrkmpkkmkrpkrpkpkmmpjrpcpbzlvboweaylkirbvcpwuwkkdkptjecytgzwzcwatfvzkrilrkquzgcecqybcdqkvdokycvoeqkwfeyzkyckp...
output:
3
result:
ok single line: '3'
Test #28:
score: 0
Accepted
time: 3ms
memory: 3852kb
input:
kkrrkpmmkrpppprrkmpkkmkrpkrpkpkmmpjrpcpbzlvboweaylkirbvcpwuwkkdkptjecytgzwzcwatfvzkrilrkquzgcecqybcdqkvdokycvoeqkwfeyzkyckpcrrpzkzacdfbjkjlkfritfpipkbtwyyvfdbwprmrmrpkrrrkr vlzvsaveyhxccwnwwgetvwzcvchsafactehffiibcgzaneeibijvhjxcxigcnhzwwnchcvzlstchwzcniewhgbetfzztztvjtyqddqqqooqqqqooqdodqddqdududod...
output:
3
result:
ok single line: '3'
Test #29:
score: 0
Accepted
time: 3ms
memory: 3584kb
input:
bggqggqqjqggbjbjbggjqjggggggjqjbqqqbjqqbgqgqjbjggggbgjjbjgbbjjggjqjjgbqgqbgggbbbbjjjimzuiueeepcvccesihlseomliavcupvnsnxuzziuxeufhxolpcp ttwwyyktykywkyytwwwyywyywktwykktwyktywttfccsqyudxodidquhtqhqqqdjbeohgzhfuwcdwcevovigwdqdesewwqwaoadboztdvduhudzbqqdzcjhoczqdqzddvwdouzqleyfglqovzecxccoqoooooquothfc...
output:
4
result:
ok single line: '4'
Test #30:
score: 0
Accepted
time: 3ms
memory: 3736kb
input:
ttwwyyktykywkyytwwwyywyywktwykktwyktywttfccsqyudxodidquhtqhqqqdjbeohgzhfuwcdwcevovigwdqdesewwqwaoadboztdvduhudzbqqdzcjhoczqdqzddvwdouzqleyfglqovzecxccoqoooooquothfcuwdodtincoaoooeunuohuttuciddztqjdiqnuuosnvnvagdqxvidtytkktkwtykyykwytwyyywkywwt bggqggqqjqggbjbjbggjqjggggggjqjbqqqbjqqbgqgqjbjggggbgjjb...
output:
4
result:
ok single line: '4'
Test #31:
score: 0
Accepted
time: 0ms
memory: 3536kb
input:
ggewwjjggeegjeeegewjwwjwgjjjjejeegwgjgwjwjgwggjwjeegwgeeewwwjegegwjgeewgjqsqyhzbksxsllbkqzvxnyxsltknatbszlhydzst prrrppcjggggggjvcbgcjbcqqbbjslgcggbqqjogzujpieqgejlgjqxbejgjbqggjeigsugbbvqspxbxgpbbjzghjqjqggglbnjqbmamjqbubbifveziiujgcquqhongugqjeggpjjqbjgccprppccmmprrmrcrrrpprmmmrp
output:
4
result:
ok single line: '4'
Test #32:
score: 0
Accepted
time: 2ms
memory: 3864kb
input:
prrrppcjggggggjvcbgcjbcqqbbjslgcggbqqjogzujpieqgejlgjqxbejgjbqggjeigsugbbvqspxbxgpbbjzghjqjqggglbnjqbmamjqbubbifveziiujgcquqhongugqjeggpjjqbjgccprppccmmprrmrcrrrpprmmmrp ggewwjjggeegjeeegewjwwjwgjjjjejeegwgjgwjwjgwggjwjeegwgeeewwwjegegwjgeewgjqsqyhzbksxsllbkqzvxnyxsltknatbszlhydzst
output:
4
result:
ok single line: '4'
Test #33:
score: 0
Accepted
time: 2ms
memory: 3708kb
input:
sdeededseedusssuueessduedesuddeddduusdsdduueuedesdeduueddduddsuuddsddsuuddsdxnqfggjzlnnqtzjcvqotjlbhtfpgjgjlotibcrhrzn wkaawmkaaawkagsjbwwjszbeeygegjgggzwbwggjneekwjjtgeqjeagkjlhwwwwjewwylsexlwjxggzhjzqeegjswesengkwjgevwjgxswjetjegyqedtggljjewemawkkww
output:
5
result:
ok single line: '5'
Test #34:
score: 0
Accepted
time: 2ms
memory: 3596kb
input:
wkaawmkaaawkagsjbwwjszbeeygegjgggzwbwggjneekwjjtgeqjeagkjlhwwwwjewwylsexlwjxggzhjzqeegjswesengkwjgevwjgxswjetjegyqedtggljjewemawkkww sdeededseedusssuueessduedesuddeddduusdsdduueuedesdeduueddduddsuuddsddsuuddsdxnqfggjzlnnqtzjcvqotjlbhtfpgjgjlotibcrhrzn
output:
5
result:
ok single line: '5'
Test #35:
score: 0
Accepted
time: 5ms
memory: 3652kb
input:
yytyyyyyuyttutuuttutttrruuurrurryrytyyuutyuyutuutfsnvpahsnnnqbhsbmjvinbiqxwfbnjafmgicgaeihmqvacgosgijpgmyyrrtyurtrtyrytyyuuurtyttyyttrruyttyuryrutruutrr llkdkzkdzzkdzkkkzkkdzllllldkkzzldzklllkkddllkzdkkdlkkkdzkzkdlklzddllzkdkzldzllddklldklkzkkdlzkkllzdzkdzkdddddkzdzdkkzkzlldklddkzzlzkdzlkkdlzkddzdlz...
output:
3
result:
ok single line: '3'
Test #36:
score: 0
Accepted
time: 3ms
memory: 4148kb
input:
llkdkzkdzzkdzkkkzkkdzllllldkkzzldzklllkkddllkzdkkdlkkkdzkzkdlklzddllzkdkzldzllddklldklkzkkdlzkkllzdzkdzkdddddkzdzdkkzkzlldklddkzzlzkdzlkkdlzkddzdlzkkdklzkzzkzkkkdkkldkzkzdkkdzdkkkdehdtsgsolpisqzzuejuseddbjzngdfsddsensexdsddusrdecueddnuftejusdtduggeuledddsudqdjldedunuretuesedducduhjoqdeduudssvdsbukkz...
output:
3
result:
ok single line: '3'
Test #37:
score: 0
Accepted
time: 3ms
memory: 3712kb
input:
ghhgpgpggpsvnffdnrmvbrtnsfanzdrjaadorjmstzjmzevarejtrudectdjoeonmjofrracnueikcfemtcuifmnixxxxhx ywlllwqyqwwywlyqqwqllwlwyywyqylqqqqlqwwwwwyqyqlwyywywyyywqqyywqlyywwwqlywwylylqlyqwqywywywllqwlyywqwyyrytvucnynfrtqhrttryjubyymtyfuttoutrtuegswrrrrirauuqrssxqhgmuttiuygsunyjnprtybubjttyiutyrrytuyuutuatvhy...
output:
3
result:
ok single line: '3'
Test #38:
score: 0
Accepted
time: 0ms
memory: 4128kb
input:
ywlllwqyqwwywlyqqwqllwlwyywyqylqqqqlqwwwwwyqyqlwyywywyyywqqyywqlyywwwqlywwylylqlyqwqywywywllqwlyywqwyyrytvucnynfrtqhrttryjubyymtyfuttoutrtuegswrrrrirauuqrssxqhgmuttiuygsunyjnprtybubjttyiutyrrytuyuutuatvhyturacgyitfyttnuturuayryyrivyumuptymrtryuunybtgyylwlyyyqqqqlwywllylqllyylllwqyllllwyyqlwwywyqlqy ...
output:
3
result:
ok single line: '3'
Test #39:
score: 0
Accepted
time: 1ms
memory: 3476kb
input:
vbveborjfrgzfglecceceevcbvebecce ttuuttuxtusxsuxtttxsxxusxuttsxusuutuxtsstsutuusssxsutsussstusuttxtxtutttuxusxrindejfcruemebmdnheftvorpnmoxrmkfauougjhgxxiidomtzzarsxrtgjjcfjafmnvenheajpftsrsgpdcnazgtvcnxdrtsxxtxuttttxtxtusssstsuutxtxxuusstutus
output:
2
result:
ok single line: '2'
Test #40:
score: 0
Accepted
time: 2ms
memory: 3708kb
input:
ttuuttuxtusxsuxtttxsxxusxuttsxusuutuxtsstsutuusssxsutsussstusuttxtxtutttuxusxrindejfcruemebmdnheftvorpnmoxrmkfauougjhgxxiidomtzzarsxrtgjjcfjafmnvenheajpftsrsgpdcnazgtvcnxdrtsxxtxuttttxtxtusssstsuutxtxxuusstutus vbveborjfrgzfglecceceevcbvebecce
output:
2
result:
ok single line: '2'
Test #41:
score: 0
Accepted
time: 2624ms
memory: 134880kb
input:
lbifgiulakleaedphrvnuzcrafhjynrhoslryhkpaotogeoemkiwhiotmbizbylymmxkdyryjisphoplmhscaraszvstywgfoewwpsunvjfmwuysitadsnnpwmvmdioaksimgimrmorwyrairrvbjwdbpwcfvzqgklzjzhiqfmjrtdpyfjrcgiurikennqboydybobhqiedwbdpqfzhrjyyhtylkkeazmyptqeymxgtsydqpoxhasztnlehbifaurewmbdjsvmovhjkltuwrtnpvhhynhcnbdghtrbrnxjkx...
output:
9
result:
ok single line: '9'
Test #42:
score: 0
Accepted
time: 2562ms
memory: 135488kb
input:
emozuxuquaglnfjrafjotgzemoycihpjaeooeuqopusvknuftwjudwxwzlzpvheqbcfqaunfrbkcxsnruiuteqarqbttlntqrnxhrofszconillsijaluerlagnpujlzhvqunytehbvwrihzurpfixvgbbnyhotcqibjfzbidujsdvboyoyoselgeapuxdwmxmvlqqliuymgdaezhtmmtcubpdzejprjxfntejvhddvipgjynrzsztryimvmlrdrpsgawgwrvidupazauomaojqsownimsqndkgglzoabkcn...
output:
8
result:
ok single line: '8'
Test #43:
score: 0
Accepted
time: 2645ms
memory: 134920kb
input:
uizwmpcbokltscsmbotcajhdvcorgghijmmxrelhsjhsplqyythrfnqmptcyrviqqfigdzxveyeawhacqupvudtbfakkqrxtbygjmtmyyoaieehxbordeaaoezdluyxcgscipvypgyhoycdljtxotoredmgxhfxwhnsapoagwnopncjoqnxanpyvvcddywkpscohrzpcekbganhvswmfdgwejraqgjzqwofqipzaawmbkhbwawfmsovmnoopargndqmaegubeobvfebxvvwtnqbhragjoootcnhotzraqxgr...
output:
8
result:
ok single line: '8'
Test #44:
score: 0
Accepted
time: 2601ms
memory: 134876kb
input:
yxvdqzvhhbjcakpucujpbjufwtpffxnkdzfpukdfmbzouzyodiuqimiomiesvvvhvftegyrfwottkejehjmtwuphgcwgnotwxloybhspqsxoexufnhddyzelfuogsxzeyxejokhuwqwzvjmdzgchqyuovjfibtponwdgesprsgttlemfwjrjzeqkiozgkzszcxqnbtkvavkekicgcderwhkqecxjfgfggrivmgujgjsgefguanwhsnozgdfwwrxptjewzwlweiuzvjixewkwzbgyojmkonvnszctzgknocib...
output:
8
result:
ok single line: '8'
Test #45:
score: 0
Accepted
time: 2618ms
memory: 136380kb
input:
jdvbrztzukojnzevatozgtiapossqrhpexvapsxxdcuhaorcgudfubbiskmrvrlohmfhhcjjoixenilbnqlwcjxlnwtnmqwpzsxfctssmtcjhhtfzorpxxnsgbttkfhzwajnxmdfrvloifxpyukkiwmeycoggncgyxqptzvqxyccuhaidjipvbjlqgblbuvrrxrrdjligxrmbzcfdeulvekazsenqnjwqyklaoeustbcjbuuudjfixutqiloznfqubbrulaoayvimkqurbvmlefvkbvgxgihumgzoianxotp...
output:
7
result:
ok single line: '7'
Test #46:
score: 0
Accepted
time: 2667ms
memory: 134608kb
input:
hsgsrprpadcncxngmbjosfbzsauckrzzcukmebybsfnvnekqunfufhbqztohoiztlfewprscbpcyalcerkfnscopfdimznidsgukqikvsdmmqnmsxebrrrsoysmoqhperrkqlekvjaigoalszzpmtsvemnbqqvodgfxohgemfktyoxjninvljjunhmrqetzxzjwypsgrlvayzeidwjzegnhzfptidrbtntlkfuikwqtllfuxjrhiosozekqggcbqhgfyjpvwapgifvvcsobslnarxkgeooxmnxltzzhfvfli...
output:
8
result:
ok single line: '8'
Test #47:
score: 0
Accepted
time: 2580ms
memory: 135064kb
input:
ysvqhhpbppyzatkiqvghnehdmwzkwdyhlfsqonqnhlaweulbpshhyubkptxgaoqqbdrfkmjvgrjzpzghopwiffdhvepccryynympwiuiowfmwksxghyexozipushmdokhkvdbcmlaovouflvkydofovyargqrzklcjofamdiykfdtoxufiqtoyamruthruimlqoijgpbxaqxiaprbdhxoxryihhakzxrfoxfewttutxlpxuhiirywtppfdbetrpfukooillmqfpmetquwbjcmfeeiywlxybevluwrvisgxfn...
output:
8
result:
ok single line: '8'
Test #48:
score: 0
Accepted
time: 2621ms
memory: 135268kb
input:
nvioxdptlkfufyxbvmlzagapmsmvvtlwmraetalydzsbqltfqdvhujpzymohrqfqhhezfulrdkhnivvgafbfjmonwkdfwyumbdwiqhtiygrzjstkbwklzuvztwgptqexhswchdguetdosbnqdtodxdfaddhwkdaaspgboppnusjpnmmulugtaiderrdhqsmqxrgrdbtxocqfddkxuepuhohcokniragqgdxfozrbfdybjztpomavlhpefeboxggcrfrnhpdgcffrfgoeiyakayrkybpvclgyebeuyxzdzenk...
output:
8
result:
ok single line: '8'
Test #49:
score: 0
Accepted
time: 2651ms
memory: 135316kb
input:
lhdneewmqfvflhqaxxtyenqshbqdcxgvxscclxupdrvttmymjlvhhnnphkrnfilscyefkhridbiosgddyslgclhpvpdsrannimrdjyxjzeuirjynoxwrytbyghkkzugiupyfmsyzkgfgbqkmczxufcasoggxqwgcikxggmnrbiyhaqoxchpwdtieubhyzesomevivxfajobemfsmtewfgdpgssrnfnamlvkgobqajagvpgpgrszqbckqgnuzbyanvqmhpwgpbzziiumalhgpikujrixvtlgbnwkyxczeuhra...
output:
8
result:
ok single line: '8'
Test #50:
score: 0
Accepted
time: 2667ms
memory: 135760kb
input:
wasuaurdndbrxwvfafqtulpvadygfeoaddpojvsbdqglxpjpwrgfdmgllkgjkihjmpnwywhyspzxghciuyspsvdlkqpivruuqltyhgdtdhqgdgmbdwwbcjlubpbmdoeuxzkevunzknoireceyavartlwvjegjmsuurpziibkrnekwgzylersqnuokmbtxfxwrqbcfhelmymayeclzuajhvrpidjzyjzubfpkcplkdyfhaewxheuvhoyrfblaslungaairmnhizazamskskcdnaplotculyxwppijlvdfzntz...
output:
11
result:
ok single line: '11'
Test #51:
score: 0
Accepted
time: 2029ms
memory: 136280kb
input:
azazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazaz...
output:
1
result:
ok single line: '1'
Test #52:
score: 0
Accepted
time: 2000ms
memory: 136068kb
input:
zazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazazaza...
output:
1
result:
ok single line: '1'
Test #53:
score: 0
Accepted
time: 10ms
memory: 5312kb
input:
soayerkzsygshliwdsitoditgdktnlwowfnzjtnwnnfraewzjpwyylkailedzjoyrqfwjltoirazayylzrmjfcrosawnkyrzbzzryrrxzdvainlzraorkeawarqkavrzrokhjsmqsjwnixpaltinjqzfyjdygaiyvswlrtqorzrrtzywjhiwhrxsryiwgqutfdehzqgglgnaogxiymlrruwwjsiiidpseqdapkokfwzndrhwcotftiyzzrngylovgwetwkzyqdhayynceykorzgngosxlqgrnazprtxggzns...
output:
5
result:
ok single line: '5'
Test #54:
score: 0
Accepted
time: 9ms
memory: 4112kb
input:
ehlkymtytklhthcmbjklrhrpuxhrdqwgphbzxqycmhqdjctxwozsedrgluohdsrhmttelstbnrmtnzrjlivdmyiwrorimjjrtsjmioizhzehrkrmostohprzxpzmchpcptdjmjspnimjjihrzipsrsyzrtrmcjohrhhocgtzxwyaehzzjmkhrhfxetdcsxidythhhzhtzzgredzskcezkiynhmjpnhzmyrnztcgspxujmmdgjmymcslsqawthiwyvyhskurbzdqhrjtylmzkcbyqhbhjpsijhhnbmtukcmoj...
output:
6
result:
ok single line: '6'
Test #55:
score: 0
Accepted
time: 16ms
memory: 5236kb
input:
erkgxnedjfquveezsxujnsqdpovoezqkxhcvsgomfpoxfsoextzkjrueevtnhhhuszthtsnfoqdmzujfizsxgitschvjrucnsesoeuhtzhxakjcxysuxslfffsxsesjztttapzhrhsuiievhthfznrsffsuhzlzhklznvioutdqzhusmosqhislfkfzipzmmmrrxotuzvsiosmsnloftxfjocnzhzcusoioinssnazfqeutlussegonffulrrqedosvcfhjsnchfogfizcuzgfspyxxerolxxbsuqyvuofus...
output:
5
result:
ok single line: '5'
Test #56:
score: 0
Accepted
time: 21ms
memory: 5224kb
input:
wwhhdhhjjhkjmevgmwxhkvoyyiwjbykbpdkuwkvywkdenmifiegiipukvuykiwxvfeikjkjudjbwhnilkyjhbpddrmwhjuvrwnohzrugnfrekvjuidwekowijuuewummfivvklremjrvywddedwwzjdewxzhekivighierpyrkkhuibrrxhebeyiyjihivhyiuhiwykeivhdesrjukvhdjwdkihyvseujjfvwiwwkeejwydjemmwkbiirweqehwdjjwtdhhiihuwuviybhqkuqgxiehkkwveehkeqhilebur...
output:
7
result:
ok single line: '7'
Test #57:
score: 0
Accepted
time: 15ms
memory: 5100kb
input:
ribfrljkptbqlcmxkoejirftfatzewztqpqstbzmfmmixqalzfxgifmjtckgcsxkokiefyizsjtgqgymlimcimsmtkjfsytjgckqlycdtzyxjqxxxmsfiefifzmikztlqsetltryiimlqtgtfcecxckjiraikxfezfqyzlkgkleeoecgxmkxmyeythicslkeosqmgczszhtqlatxdxyckseeolicibkqylccsmmmizcojklksgkmcslbekclmfzskzkjmszyzqcssdxhbrfkxtyqqeifxbfmllboisfafxsj...
output:
5
result:
ok single line: '5'
Test #58:
score: 0
Accepted
time: 7ms
memory: 4280kb
input:
guhztnqqeejkyjioabsmxpkcgfoqjeharcexqhbaheyezjauqquqqabguhpvcghpcunpvixdupzyxcicnrqxnhcgtiuqhhevkgcojqjetcpxlbqqbtqpxeugxvqryegyffrrtxicnaptcxqntaukhkmobuinhaykozvgakqacktkprlrcuvyhghkheyhlpgxdltrplpvthlpiahruphaxhtgavhnbuhxgvuxuumyefgpihlgiibhauohhmlbvlamhjkealpcvqccrbzbtezmpiyzprrotp aqnqajnhjgima...
output:
6
result:
ok single line: '6'
Test #59:
score: 0
Accepted
time: 24ms
memory: 5176kb
input:
dcznljponzzzvewnavzbxnjcbtaqqrzqppxmmbrvznjxeebnbhmveanpwxchjdzwjpiqqxynhbciowiraymgxexazbyxadciljcahxiatqfqcalhzzrwbvamnyhnzaejvlndgzxqjwcbzbzzhnxxpnpidleiiqijjczexbzagmxszjvaxxfcvxtqjaevzecexqiagtwxjmcrypaagmitmaevxibxjfxuevrnbjwjwewliuqjjterafzljfyrvoljtcpazyzfhvgbnmteppintiadzrljbrthhynzrhrycmjr...
output:
7
result:
ok single line: '7'
Test #60:
score: 0
Accepted
time: 8ms
memory: 4272kb
input:
cdjjhhonkmyyaslvpvgligaluppysxjskpirvlaynlyknvnpkmxpkacanyuevrhooqgmaxrvvnkofhvjrgmszrmdloexpufpqjkmarpgluxponvkoysagjxravnyljaqndujvmldmndrxxvhfajrmpauplpoznykpmnxkokjczdgaryrsgdjnxjrjqcxvvrcjxoplxjmrqljnbuyqgunqmjmsrdvrnoqnynvuydlvsmoamgngvdvvxkrlmkvvlivqngaivrjukzgklvoqqmbjlkvjpgdgmzogmkyzrzzapq ...
output:
5
result:
ok single line: '5'
Test #61:
score: 0
Accepted
time: 7ms
memory: 4132kb
input:
wjrrecpblxsdxlorigelfclvxixwvgcgvxbseoggghcbbugyhrgzhxsihfgmkxyycmdfkrrfezfpzrsgzysycbmsuleelbhgsglxekpifzokvwoxrlhuqrldjevvlbpgdekyvfrurcnxchuzyppkcnhreqvwsoebeetvvbjysvzlucboupjlfbruwwzhvdewgjkfovlxfkyzzocrazwdxxfdgmyhcfiotcikelbwoftrxokciguvgxcxrjboxdfwgzuumrvrdmsjrl myuivrvycjblcllxycqxmsyjeglkb...
output:
5
result:
ok single line: '5'
Test #62:
score: 0
Accepted
time: 4ms
memory: 3680kb
input:
gzvhpzstzpqvgztkjbspbbksbsuueghhzbosvgggqpzunibjrngrkinnbxhhzhnkbvznkwpszqpbsqesmstgjvubkywtqkibgzvhbhdpmszsrzxmezskpgurrgtjqvrurbqrkwysogpsimuhkimnqtibkqginhsgjkbsqgkihrhupgkkpobsibvhgmzsvgoiqurkvzpkziv skxiqpimisbvgpwdvwgoxgathimqkzbiydscdkrikjvvnqriboouuzuuktdvigivzruuzhjpnkzssijqriuttipdqkqkgogi...
output:
4
result:
ok single line: '4'