QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#483528#7364. 回文Eternatis0 289ms166488kbC++141.8kb2024-07-18 18:37:302024-07-18 18:37:31

Judging History

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

  • [2024-07-18 18:37:31]
  • 评测
  • 测评结果:0
  • 用时:289ms
  • 内存:166488kb
  • [2024-07-18 18:37:30]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define N 1000010
#define int long long
#define db long double
#define pii pair<int,int>
#define st first
#define ed second
#define mkp make_pair
#define pb push_back
#define eps 1e-9
#define mod 998244353
#define mod2 1000000007
#define bs 13131
#define bs2 131
#define INF 0x3f3f3f3f3f3f3f3f
#define il inline
#define vi vector<int>
#define ins insert
#define umap unordered_map
#define uset unordered_set
#define R(x) x.begin(),x.end()
#define B(x) x.begin()
#define E(x) x.end()
#define lb lower_bound
#define ub upper_bound
#define vi vector<int>
il int read(){
	int x=0,f=1;
	char ch=getchar();
	while(ch<'0'||ch>'9'){
		if(ch=='-')f=-1;
		ch=getchar();
	}
	while(ch>='0'&&ch<='9'){
		x=(x<<1)+(x<<3)+(ch^48);
		ch=getchar();
	}
	return x*f;
}
int T=1,n,m,q,k;
char c[N];
il void solve(){
	n=read();
}
int f[21][N];
int lg[N];
il int query(int l,int r){
	if(l>r)return -INF;
	int k=lg[r-l+1];
	return max(f[k][l],f[k][r-(1<<k)+1]);
}
signed main(){
	scanf("%s",c+1);
	n=strlen(c+1);
	for(int i=n;i>=1;i--)
		c[i<<1]=c[i],c[i<<1|1]='$';
	c[1]='$';
	n=n<<1|1;lg[0]=-1;
	for(int i=1,r=0,mid=0;i<=n;i++){
		lg[i]=lg[i>>1]+1;
		if(i<=r)f[0][i]=min(f[0][(mid<<1)-i],r-i+1);
		while(i+f[0][i]<=n&&i-f[0][i]>=1&&c[i-f[0][i]]==c[i+f[0][i]])f[0][i]++;
		if(i+f[0][i]>r)r=i+f[0][i]-1,mid=i;
	}
	for(int i=1;i<=n;i++)f[0][i]--;
	for(int k=1;k<=20;k++)for(int i=1;i+(1<<k)-1<=n;i++)
		f[k][i]=max(f[k-1][i],f[k-1][i+(1<<(k-1))]);
	q=read();
	while(q--){
		int l=read()<<1,r=read()<<1;
		l--,r++;
		int L=1,R=(r-l+1)>>1,ans=0;
		while(L<=R){
			int mid=(L+R)>>1;
			if(query(l+mid-1,r-mid+1)>=mid)ans=max(ans,mid),L=mid+1;
			else R=mid-1;
		}
		printf("%lld\n",ans-1);
	}
	return 0;
}

详细

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 24440kb

input:

kmojliclywcyevunhgfnumdzvncnmzbkxjsrkzlyguvjwqmyamvwvidqvfcwnkoolupcrjhynrnlmncqwntqaqtnwqcnmlnrnyhjrcpulooknwcfvqdivwvmaymqwjvugylzkrsmlabbmjltopjasklgawfdbosdlmwahaygutogtvoenkxddmehwokwybkpireouiqqlsfbuqslxjlusnwkzgadxtagewjlchtcezugeguzecthcljwegatxdagzkwnsuljxlsqwlkpvoajknflirxpqcxmyhcgimr
293
...

output:

100
75
83
63
2
1
100
2
2
2
39
2
0
41
2
23
1
0
62
45
1
62
31
0
100
83
2
41
13
62
62
3
1
1
2
0
1
0
0
2
1
62
23
15
15
100
1
31
62
71
100
49
37
1
100
100
2
71
0
62
2
31
85
0
1
62
100
1
2
2
62
2
63
65
62
2
100
62
41
2
2
3
73
7
0
25
62
37
29
17
0
2
2
1
2
100
0
100
0
3
2
62
0
0
31
77
100
89
31
41
100
15
59...

result:

wrong answer 1st lines differ - expected: '101', found: '100'

Test #2:

score: 0
Wrong Answer
time: 0ms
memory: 24368kb

input:

vesjaxxsumewkbahmdfohuzggavsskdplrjqgonwnvtqhqdvxwdvbbvdwxtostthmmzqckepyglcysblxcbcxlbsyclgylyqtthedcqvuoghiyfekmaycoiiumirusuzosmaijqpgrwgcnxtojzyxpnjzyzjnpxyzjotxncgwrgpqjiamsozusurimuiiocyamkefyihgouvpxqdkybihtpmfqfzlwzylmtpgzvzhcrygruvzztttbofobtttzzvurgyrchzvzgptmlyzwlzfqfmpthibykdqxpegpbglnzk...

output:

81
100
71
49
41
59
100
81
86
100
2
20
100
20
100
100
43
100
59
63
23
19
13
100
25
100
20
75
100
27
2
55
100
27
9
23
87
20
23
39
67
0
2
20
100
20
100
3
2
0
55
9
51
7
100
20
35
1
61
41
15
77
20
9
100
89
100
100
0
4
100
2
100
1
100
100
100
47
2
0
2
100
2
59
2
23
100
0
20
100
100
100
0
19
100
0
2
100
53...

result:

wrong answer 2nd lines differ - expected: '101', found: '100'

Test #3:

score: 0
Wrong Answer
time: 0ms
memory: 34824kb

input:

anuahqplebjsacgumhxqolpgrxqcqzlhxrdthilfysevwdukoaksysixdggqzfjifopilugpdlrihgriaedgcjljuzdyqnyplpovdlvsitjcizogkcjkipzwnbdugpkkcghcpcioksqbnvfeggpzdfcxddppanaqnjdrtczcurvgdhnhuuxmktusuykwqrpjgauznlzcgxahiumnbeendsvdoflmuqaylnmsxgfdelfljnvlkeftwsvqhrxpnyjfwohdomcrqcxhvfvksfkjaihqiksfwdlopmwyhagelhju...

output:

4
1271
594
117
4
4
1665
4
1665
956
1665
4
1438
1665
1665
3
544
258
928
1665
2
4
2
668
4
1665
2
796
1665
3
1665
4
1665
2
1271
1665
746
1271
1665
862
436
590
289
1665
764
576
3
1506
4
1271
1326
638
4
1665
1271
4
2
1665
1064
606
164
752
1271
4
3
1665
804
1665
4
1271
2
4
1665
2
1665
80
4
3
4
1271
298
16...

result:

wrong answer 1st lines differ - expected: '5', found: '4'

Test #4:

score: 0
Wrong Answer
time: 0ms
memory: 32600kb

input:

mfvckuykhckfuqmontrmfcfttxsqnaenocsvdxafpwkpftcwtqwgtsihvaquaudwebxmdijlcrenvivcwbwccmjyxmgmuhdkesgmkcbasghbbwlutayipathsvawcdkkmbdkdiurfsytgjasgsrebgtyjlclkycanipjqlpvxtusmetaxpkwvgilcqnspilinqanxofgxjwqzphraildqdewozyndxbekdknrvbdjgwwvulxfdaqpsziqmrtvlzcabcnouwilynyrbzktbfsfaepmyfjbwuuhvxihiyjicox...

output:

2
1193
697
128
857
2
697
903
4
1664
697
697
93
389
697
624
697
2
2
1664
3
2
1239
435
765
1664
76
537
1664
4
697
4
2
178
624
697
393
697
697
697
2
106
316
1033
651
624
713
1664
697
401
697
1305
1031
4
1097
2
1351
624
119
1393
697
2
624
4
194
697
697
697
321
624
2
421
697
2
697
697
747
1664
885
4
27
6...

result:

wrong answer 1st lines differ - expected: '3', found: '2'

Test #5:

score: 0
Wrong Answer
time: 2ms
memory: 30744kb

input:

piliegnejflgljiidtifmgpcwttkfqexweatzcfecoyuyzpyayapbnenfvjbimyuttkjimtuzpoyhfugdivlxyebblrvgkwowzftkjxjopepbcdkcrioyjjscqnvycmaicuijcdkzizgtyskrkgyflmfvtntfnuikjqyblajyhygopbgpmxruwkkkuqszuuxhorfzsyzgpnxcuifrlvieeeavsrrgthetamjemxekupmclxitasqoqrokhtvomrjlksomhagdxyarqqoqhzuiqlhinhizujhkziqnabxnguz...

output:

3
95
1666
2
1666
0
790
790
603
2
2
1407
95
2
3
1666
583
3
319
757
1666
1319
790
563
725
1666
790
901
1666
1221
790
181
1666
1666
1666
1563
4
290
95
179
119
2
1045
3
1249
845
1666
1666
1666
753
95
9
1666
181
290
95
181
790
205
95
181
263
1666
1666
527
290
1445
1666
1666
1666
0
1666
790
281
290
1666
7...

result:

wrong answer 1st lines differ - expected: '4', found: '3'

Test #6:

score: 0
Wrong Answer
time: 2ms
memory: 30548kb

input:

syucmgkigdlpevdxsshewqirqqcdljqjgaugkvzplmidhvwxeuhuzmzscczopnaviqlgnavpezpquyupilccvjsqfxjmpcsefwerqlgfitezkaffvdwlyhilzflbjecsikzvyecgpjkucqukkrauolgzffotznjxmbvcmsuzrwstehxgqzygfjfybzmyuoxvshelxlpzfxwalgxzlwvhsbaikzsgjkzvzjmlbhgubzcunksleqdgulmysfjashpwjymspmtoxiwaiimcbdqbbudlwbptrusyumtszzwbpmgg...

output:

494
494
2
6
740
740
1540
1540
494
740
1231
187
6
4
740
4
740
1221
740
551
494
1540
494
740
1540
1051
740
494
1229
740
494
1540
1081
689
1540
277
1259
3
385
3
494
3
494
740
3
805
6
1093
547
740
3
843
740
740
740
6
1403
6
4
451
6
6
494
740
740
371
3
6
399
740
740
281
494
494
2
1540
3
2
3
740
577
3
2
1...

result:

wrong answer 1st lines differ - expected: '495', found: '494'

Test #7:

score: 0
Wrong Answer
time: 7ms
memory: 50412kb

input:

acfojkhxkvgskemxswoddjrxylgurlpfkpkhssmaqavonpjkhozprsffoslcluvabbpmynaucitshgbfrhilbxuyvdeilculqepksnsosdruqnzkrismdmpypuwigcwmlrynryysiazxaikbsvsxhwobtxuriupwxfmotimszqrfqqcfcukzmghijkeibpndndbodgzpuzqyznrjpzykhzmgrcxhexbsjmanfybqvojzbwpyttmrneejcpdncuzcjdmgxevqmbltpkotcywnfglumjpldxytuaahbgdcnges...

output:

5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
5769
...

result:

wrong answer 1001st lines differ - expected: '4291', found: '4290'

Test #8:

score: 0
Wrong Answer
time: 16ms
memory: 50492kb

input:

aaxvxlcltrlilgqvklenrxdcqzouiizataquwymdxtkzyenpdefayzmwugrysrxpwznxpesvcglwqokoajclkeiadelfupalmwhpceexzuzethlcuidgwekhrzvacntvtfmlqptdszlphlewmmwzwcdmjwpefntdlcdrrhejjhakjpkglpbyooqkdhkzrswpmlseuqobyzrquhtdqlbfegkolncwaqoyxrmelvysykpsschwcghzecwneoklalscjqgxoqilbisabofjebktbbzomfupjqcupolpowbtazlq...

output:

3297
12040
4
6
11677
1437
12040
4
87
14909
139
4
8
12040
15139
1157
4
12040
14913
12743
16664
6
16664
12040
4
2
6
5401
6
16664
16664
12040
8959
12040
4
4
11759
12040
7313
16664
12040
16664
4495
2953
11105
16664
7855
8511
12040
2953
1351
14139
2953
12040
16664
4
6633
4971
13327
6
2953
16473
4
16664
1...

result:

wrong answer 2nd lines differ - expected: '12041', found: '12040'

Test #9:

score: 0
Wrong Answer
time: 15ms
memory: 50368kb

input:

bydjourdrgeaxhanforissxtcbtoqpcslsmsuipplgpyitlspqplflboqptqnahqwzchrjhifexlgnmbsehwkwjzojfwvhmmuatwkozdvqwxcorhmhirdgzkztmzegneseslmxuuoifnakuwsycrcgkzpnspyvvfrcbutiknycrvsqgglsvritrrmilxhhrtclxzslysblwsimexxkodgizphdapogypdudlssdispudgxhnfidsyivbvgamsujzzelovuilauyzmstgpgqipmhnbqskffrjjfnzhotbnlzk...

output:

10655
4
9091
5
16664
6
9295
12692
5
5
16664
16664
5
5009
2038
751
12692
12692
2187
7341
5
16664
8431
12692
3687
6
12692
16664
7471
6
6
9287
12692
12692
4785
4785
12692
16664
4785
16664
3185
16664
10381
5
4785
12692
12279
2475
6
4
12692
3923
12692
5
4785
887
5425
4
5
16664
12692
11703
4681
4785
16664...

result:

wrong answer 2nd lines differ - expected: '5', found: '4'

Test #10:

score: 0
Wrong Answer
time: 13ms
memory: 48552kb

input:

hsfcfbhlqerzkkwsyslalaslnahwpqqhkflavreluedfhcprzyfaipqyzaupdypfannefsdhimxnxoxbaqfktuqcgkjhskocyzeyyvbimybpixxgygccyqjcysqsylrhqrblfqrvheoolimkvqejywdjeuzbhhqdafuybfkarmacprqkqadbrfsrehhthtginqqhwdukdzjfrtgyepxmrnpmrokehpzxtnbigekjlvwkeofqrayiodxshtdbiisdyrboacqktisjtdkfuzmuzrmhgdqewukdcufjrqtskxjk...

output:

10616
8340
977
13844
6130
151
977
977
7182
6
9920
8061
4
151
12438
6
11894
4
977
151
5510
6384
4
7171
16663
4
1356
977
4
16663
13082
977
7867
6078
4
4
4
16663
151
11516
4
11356
16663
6
4
14120
13922
2550
2263
4
3863
977
8340
14292
6
1145
3
4
6340
8340
3
4
13622
4
16663
8340
151
16663
3186
977
4
4
11...

result:

wrong answer 2nd lines differ - expected: '8341', found: '8340'

Test #11:

score: 0
Wrong Answer
time: 16ms
memory: 54500kb

input:

uqgylihdxuhtoedyzgzsnwjfaxxdrbadecbkxhbwvzztggrcvorlbgdobvnlswamdnehzepqdqeajrhfwkavapzqvbivztnsqtqnjxjejpgokdyyfxrsuxblzpftwbdkxvrczcerpjadlkqxieyslegpwgwuvzixavdbbtzcvuvnyjpjqvzfzcdnypukljhlspedodczoamlqokdljxdwtonfavmwxemmwicpfbcxfriiqymwizfjghzskzsxyzpluyjwvwyjjzjdddhoflaizakyjzmjmucfxrowqmiiiqp...

output:

5370
5
5
2
10494
14090
2
4
9804
2462
4
17757
4
17757
17757
17757
6685
12530
17757
16620
4
4
13894
300
4
17757
17757
17757
12582
15746
6685
4
1634
17757
1262
12772
4
4
4
978
17757
3
4
17757
492
12486
17757
4
7246
4
4
17757
4
4
1786
4
4
4
2528
17757
4
2058
5724
388
4
840
17757
6685
4
4
4
17757
17757
1...

result:

wrong answer 2nd lines differ - expected: '6', found: '5'

Test #12:

score: 0
Wrong Answer
time: 14ms
memory: 50476kb

input:

senpfhuxjnjduvkehgshpecrhtmrsjqaeosajatkkrtdwodqmsfmvoxyipcqjddyxbrroqpkhujinzclqudwqhehxvbpsdqnxzhkjoipcqkqddetmordwjpsuqzoerllzmzbwuorrbmwbzjoycmpeyotbhcwdxygeeqgxbwcqlrywyruatywmmvgckvaowvjpeegwhzarnabqopxpkbtrkhyqauthnzkdmmfdxxfawxygtuzmmbdzhxhstkgtjgzaprjstmssfpczmyyqryfxycoimzobpbihnnmsocfegkc...

output:

4
6
8596
12104
4
6
6
4
6
4
13534
7568
2650
4
4
22962
6
3
4
8622
6
4
11326
4
4
6
4
3642
16368
4
6
7634
15868
6
10216
4
6
6
6
6
6
11442
4
384
23390
4
22920
24995
4
6
6482
8236
11560
4
6
6
5
6
6442
6
5
6
4
6
4280
6
4
684
13156
4
3002
4
6
6
6
14064
4
4
4
5418
4
14086
2900
4
4
6
7114
4
19688
8098
4
4
192...

result:

wrong answer 1st lines differ - expected: '5', found: '4'

Test #13:

score: 0
Wrong Answer
time: 16ms
memory: 50668kb

input:

nwsiebavjnlnjifvaylnhfzybafysczcmrzplqehpgkavzaddjbltazcotufbdzxetxrwhshlxgoqdvbwrkeqkhsbujudbcjhahwkbluvnvdvdxnwocvdkjilwcziqdivzvdlbfwzdenmqlienvoqveubtdoszndqutfsguooniomoyblyxteyhpwommzvnumpwmzqafvfgmnokjwwnkdofoikamvlrxrfkvmrxmsrknmojvaumkrsrlgnpriipbnsbqvglegyhjdefpjngwtbknuivlyftjlsxgffnsjvib...

output:

4
2501
5829
2501
10752
2501
10752
758
9947
3990
2501
2501
4987
2501
10752
3723
10752
3489
758
6
10752
4
5829
5829
6
4
5829
7517
6
5829
2501
4
2428
10752
10752
10752
2501
10752
10752
2501
833
7299
4
6371
2501
4
10752
10752
4
1
5829
4
10752
6891
10752
4
6
5829
10752
10752
5481
4
2501
3014
8619
2501
25...

result:

wrong answer 1st lines differ - expected: '5', found: '4'

Test #14:

score: 0
Wrong Answer
time: 13ms
memory: 48440kb

input:

uoqxubtwiuvrweemnisntsggdzuataqgegovblspuctnszgscxridxjlgibfbtdetqrhkfzzvbkbufeisycazjudefsyvgraenfjynszhdjtzidepogsvltustouvnviyrdsncubobnlkruzcsxsabwayfldakyslzfprixpbgpzlfneokxjtnmgtwipkddbmmeahowhndbnuymxryrkgolobkenugcpyfcelqpnpwwphnufpjcxwjyxlcsutfogqlepvyfcjohvhqivjefwtkwubjgtlsabqnpdpixgnrvw...

output:

4
4
1762
4
5270
1429
103
6190
3086
3086
6146
4
3086
3086
3086
4421
3086
1613
4
4
4
3
4
3086
3086
6265
5270
5270
3086
5270
3257
103
4
103
1365
4
3086
3086
4
3086
6
3086
4404
2087
16
3086
3086
3086
4
5270
6124
4
4
5270
3086
3086
3086
5270
4
3
5270
4
5270
3086
3086
4669
3
3086
1739
3
103
2087
3721
3086...

result:

wrong answer 1st lines differ - expected: '5', found: '4'

Test #15:

score: 0
Wrong Answer
time: 275ms
memory: 166056kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaakkeiauuzvxheynhjstrlmdjuyadlukikotjzhqkfxlyabcfwkdyqkgsrkeqcpingbwuhlvlqcwrnotohwdcteumlrepoccfdfznrdltjbjkjzqkdiglyqxwbukxvlivpbhdtzdxsiaqyoqsykspneectkcrlupikmvnqqtbvicmjgwzonahfpytentjnwqunjlpalkwpcskwlqcarzzlktnklalcmplozonpmfpysuyqviwslsfhnzcbplzhyhs...

output:

6415
87365
63379
101787
32696
51103
112674
68003
32696
15239
112674
112674
113201
112674
32696
5
131990
112674
131990
131990
112674
81803
16620
112674
7921
32696
44195
8
23036
6
6
32292
68003
112674
68003
131990
131990
78275
131990
6
5
112674
53843
112674
112674
112674
32696
32696
89749
22391
131990...

result:

wrong answer 5th lines differ - expected: '32697', found: '32696'

Test #16:

score: 0
Wrong Answer
time: 285ms
memory: 165704kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaytvhrajhtxhttnnlmeqimzzsjscccivbyritmiznnvgksdehrtmiwacnbixkxnjytuzimzssogvxaemlcpkdtimzfxqreghsbnsqpkwcfepbisgnmispquhyzeqapvpjdfjelclvezqsdjxndhuwxloghiljexxirocvfcpgrilpxspmzjkvhyifkptzguxohzyyjuxqahbblayluiktzmrsgrhthdypkigvjqngfuwkchfepqfvhyuyunfrhluvcdyhvbpktdfoyy...

output:

1179
166666
37261
91052
161107
60811
26965
166666
91052
134751
4
6
92133
6
25522
5887
91052
91052
91052
9450
1809
7
7
138551
91052
6
9450
26965
109627
7
8170
91052
26965
7
139411
91052
26965
112669
26977
95389
4481
12706
6
6
166666
91052
91052
141687
6
136179
9450
6
6
15758
238
19319
1179
46693
1666...

result:

wrong answer 1st lines differ - expected: '1180', found: '1179'

Test #17:

score: 0
Wrong Answer
time: 281ms
memory: 166364kb

input:

aaaazkvsgnabokhungreeglngwrtynocgzehwlqgkiiiqdloxdezdcdbhriugyqfqhhaproemijuhymtacrerxmwdzzputjzucaygdskcwpvxdvuafnpfttarbksdowftsieylqlmpcvyrvhtdorechiduhgxkicaicbrcploefuuzmucorweejnscoepoijalirxzxrxbkksvuimwavmhxhhwndfkwocguaojzgtpxwtjmlrkbpbwvjtcilnyjjkmymvwaylhgmobosditopkpmmsawqlricifwcnwvxqac...

output:

6
108749
3
108749
25988
1743
45890
157571
102272
24332
29726
46690
84932
97701
69076
10620
24874
6
1743
6
88258
108749
7
12188
5
157571
65204
63344
20776
63340
81076
1743
33464
108749
8
118778
4650
7
7
133528
7
132560
66664
13254
108749
157571
6
137210
140694
117626
79788
77818
105378
97701
6
97701
...

result:

wrong answer 1st lines differ - expected: '7', found: '6'

Test #18:

score: 0
Wrong Answer
time: 275ms
memory: 166000kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaebhhrvkfkvewwgcwzupqagltrbvbpsmrzhqqrzpphdatdovtqcskottjjaijncilycjoqvhjbvaorrczwefumogmkipliwrjgjcmcksniyjpowbzpezlmkkiivhadolbahzjlelwurmdhfktndmcqndtbimufcsilykijsbmlqrxlfkimnzghkxgtqgznzgcgmrkygvzbdizbraghkncugpszudehqyuhkywdzdbitixbamapwgzbzknwypluul...

output:

166666
166666
6
34769
6
166666
24819
76849
166666
46449
48105
108561
4532
86703
46253
149297
6
6
68287
27049
166666
44128
166666
5
112091
64755
166666
6
6
162109
44128
6
32987
146665
166666
4
6
6
142777
6
4532
47363
6
6
6
163333
161803
6
52177
166666
73871
119293
166666
6
35455
6
22301
6
30599
67517...

result:

wrong answer 1st lines differ - expected: '166667', found: '166666'

Test #19:

score: 0
Wrong Answer
time: 289ms
memory: 166400kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalvgbspddxrtwkccxskalmiaahvuaaevjkzxskmumnesqsjfqlgkanmmdinkbiabnrmvocequrnicjqzdatwwdzpgyoumwymnsjnklvbjrswytpqejlgxcmoaqqvpihlghjrsyvcoxhvprkfusafjsdrgopnfufkoopyqetppxuciqcwjxldgtwcthdepfcxdvrrhxcxdmsjnukgpdgkknnwzwmtavzvynhsapujivwmjlsaybeuaftemhzpmuexavqmhvpfou...

output:

21967
106290
111778
7
132221
34380
30544
138937
30544
47965
61241
165947
63749
99508
13661
5
166666
30544
166666
6314
158617
6
151113
166666
132221
132221
6
96226
4
4
30544
132455
30978
132221
5
166666
28295
132541
86886
30544
7
6
46688
7
166666
30544
30544
113061
30544
166666
13697
6
6
132221
42146...

result:

wrong answer 4th lines differ - expected: '8', found: '7'

Test #20:

score: 0
Wrong Answer
time: 279ms
memory: 166488kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaairvzomrstpfklvpyiboqxtnqbjazhstswwhmrdgbzsstvkrtencmmeqjfclkztnlsrrghcfrfrivxfrrpnwehishsneqljlmqwkugitnkuotmncikpvxzvgxcvdppekdbomsvqupgpjdcowzqfoxcivupvucxstsjlrlylvlzmqcxtqdwztpxmzetubgxllckejlkwjytrvdwmimdencuffcdifrllsoihxnbhoyy...

output:

6
4
6
133040
6061
55836
133040
55836
6
55836
61641
53009
4
30553
133040
133040
115561
133040
132637
6
133040
55836
44821
1540
133040
133040
1551
5
1540
64617
33701
4
4013
132119
5
133040
1540
44821
44821
36611
55836
133040
90091
133040
1540
1540
1540
8
2511
133040
133040
82999
5
133040
6
55836
4
133...

result:

wrong answer 1st lines differ - expected: '7', found: '6'