QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#776204#7364. 回文Link_Cut_Y70 52ms54208kbC++144.4kb2024-11-23 17:53:332024-11-23 17:53:33

Judging History

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

  • [2024-11-23 17:53:33]
  • 评测
  • 测评结果:70
  • 用时:52ms
  • 内存:54208kb
  • [2024-11-23 17:53:33]
  • 提交

answer

#include <unordered_map>
#include <algorithm>
#include <iostream>
#include <cstring>
#include <cstdio>
#include <vector>
#include <bitset>
#include <cmath>
#include <queue>
#include <ctime>
#include <set>
#include <map>
#define int long long
#define rep(i, a, b) for (int i = (a); i <= (b); i ++ )
#define rop(i, a, b) for (int i = (a); i < (b); i ++ )
#define dep(i, a, b) for (int i = (a); i >= (b); i -- )
#define dop(i, a, b) for (int i = (a); i > (b); i -- )

#define Darr(a, L, R) cerr << #a "[" << L << " ~ " << R << "] = "; rep(x, L, R) cerr << a[x] << " "; cerr << '\n';
#define IOS ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define D(x) (cerr << #x << " = " << x << '\n')
#define vit vector<int>::iterator
#define all(x) x.begin(), x.end()
#define min(a, b) (a < b ? a : b)
#define max(a, b) (a > b ? a : b)
#define chkmin(a, b) (a = min(a, b))
#define chkmax(a, b) (a = max(a, b))
#define sit set<int>::iterator
#define lowbit(x) (x & -x)
#define eb emplace_back
#define lb lower_bound
#define ub upper_bound
#define pb push_back
#define pi acos(-1)
#define gc getchar
#define pc putchar
#define db double
#define y second
#define x first

using namespace std;

typedef long long LL;
typedef unsigned long long ULL;
typedef pair<int, int> PII;
typedef pair<db, db> PDD;
const int dx[] = {1, 0, -1, 0};
const int dy[] = {0, 1, 0, -1};
const int mod = 998244353;
const int eps = 1e-9;

const int N = 1000010; int T = 1;
void print(int x) { dep(i, 20, 0) pc(((x >> i) & 1) ? '1' : '0'); }
int qpow(int a, int b = mod - 2, int s = 1) { for (; b; b >>= 1, a = 1ll * a * a % mod) if (b & 1) s = 1ll * s * a % mod; return s; }
namespace IO {
	void read() { return; }
	void write(char ch) { pc(ch); return; }
	void write() { return; }
	template <typename T> void read(T &x) { x = 0; T w = 0; char ch = gc(); while (ch < '0' || ch > '9') w |= (ch == '-'), ch = gc(); while ('0' <= ch && ch <= '9') x = x * 10 + (ch ^ 48), ch = gc(); x = w ? -x : x; }
	template <typename T> void print(T x) { if (!x) return; print<T>(x / 10), pc((x % 10) ^ '0'); }
	template <typename T> void write(T x) { if (x > 0) print<T>(x); else if (x < 0) pc('-'), print<T>(-x); else pc('0'); }
	template <typename T> void write(T x, char en) { write<T>(x), pc(en); }
	template <typename T, typename ...T2> void read(T &s, T2 &...oth) { read(s); read(oth...); return; }
}; using namespace IO;

const ULL P = 1331;
ULL p[N], h1[N], h2[N];
char str[N], s[N]; int st1[N][21], st2[N][21];
int n, q, len[N], lg[N];
ULL Hash1(int l, int r) { return 1ull * h1[r] - h1[l - 1] * p[r - l + 1]; }
ULL Hash2(int r, int l) { return 1ull * h2[l] - h2[r + 1] * p[r - l + 1]; }
void sub() {
	scanf("%s", str + 1);
	n = strlen(str + 1); rep(i, 1, n) s[i * 2] = str[i], s[i * 2 - 1] = '#';
	s[n * 2 + 1] = '#'; p[0] = 1ull; n = n * 2 + 1;
	rep(i, 1, n) h1[i] = 1ull * h1[i - 1] * P + 1ull * s[i];
	dep(i, n, 1) h2[i] = 1ull * h2[i + 1] * P + 1ull * s[i];
	rep(i, 1, n) p[i] = p[i - 1] * P;
//	cout << Hash1(1, 3) << ' ' << Hash2(3, 1) << endl; return;
	rep(i, 1, n) {
		int l = 0, r = min(i - 1, n - i);
		while (l < r) {
			int mid = l + r + 1 >> 1;
			if (Hash1(i - mid, i) == Hash2(i + mid, i)) l = mid;
			else r = mid - 1;
		} len[i] = l;
	} rep(i, 1, n) if (i & 1) st1[i][0] = len[i]; else st2[i][0] = len[i];
	rep(j, 1, 20) rep(i, 1, n) st1[i][j] = max(st1[i][j - 1], st1[i + (1 << j - 1)][j - 1]),
		st2[i][j] = max(st2[i][j - 1], st2[i + (1 << j - 1)][j - 1]);
	lg[1] = 0; rep(i, 2, n) lg[i] = lg[i >> 1] + 1;
	auto qmax1 = [&](int l, int r) -> int {
		if (l == r) return len[l]; int d = r - l + 1, o = lg[d];
		return max(st1[l][o], st1[r - (1 << o) + 1][o]);
	};
	auto qmax2 = [&](int l, int r) -> int {
		if (l == r) return len[l]; int d = r - l + 1, o = lg[d];
		return max(st2[l][o], st2[r - (1 << o) + 1][o]);
	};
	auto query = [&](int L, int R) -> int {
		int l = 0, r = (R - L + 1);
		while (l < r) {
//			int mid = 3;
			int mid = l + r + 1 >> 1;
			int _l = 2 * L + mid - 1, _r = 2 * R - mid + 1;
//			D(_l), D(_r), D(mid); exit(0);
//			cout << qmax1(_l, _r) << ' ' << qmax2(_l, _r) << '\n'; exit(0);
			if (_l > _r) r = mid - 1;
			else if (qmax1(_l, _r) >= mid or qmax2(_l, _r) >= mid) l = mid;
			else r = mid - 1;
		} return l;
	};
//	cout << query(1, 3) << '\n'; return;
	read(q); while (q -- ) {
		int L, R; read(L, R);
		printf("%lld\n", query(L, R));
	} return;
}
signed main() {
	while (T -- ) sub();
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Pretests


Final Tests

Test #1:

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

input:

kmojliclywcyevunhgfnumdzvncnmzbkxjsrkzlyguvjwqmyamvwvidqvfcwnkoolupcrjhynrnlmncqwntqaqtnwqcnmlnrnyhjrcpulooknwcfvqdivwvmaymqwjvugylzkrsmlabbmjltopjasklgawfdbosdlmwahaygutogtvoenkxddmehwokwybkpireouiqqlsfbuqslxjlusnwkzgadxtagewjlchtcezugeguzecthcljwegatxdagzkwnsuljxlsqwlkpvoajknflirxpqcxmyhcgimr
293
...

output:

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

result:

ok 293 lines

Test #2:

score: 5
Accepted
time: 2ms
memory: 16176kb

input:

vesjaxxsumewkbahmdfohuzggavsskdplrjqgonwnvtqhqdvxwdvbbvdwxtostthmmzqckepyglcysblxcbcxlbsyclgylyqtthedcqvuoghiyfekmaycoiiumirusuzosmaijqpgrwgcnxtojzyxpnjzyzjnpxyzjotxncgwrgpqjiamsozusurimuiiocyamkefyihgouvpxqdkybihtpmfqfzlwzylmtpgzvzhcrygruvzztttbofobtttzzvurgyrchzvzgptmlyzwlzfqfmpthibykdqxpegpbglnzk...

output:

81
101
71
49
41
59
101
81
87
101
3
21
101
21
101
101
43
101
59
63
23
19
13
101
25
101
21
75
101
27
3
55
101
27
10
23
87
21
23
39
67
1
3
21
101
21
101
3
3
1
55
10
51
7
101
21
35
2
61
41
15
77
21
10
101
89
101
101
1
4
101
3
101
2
101
101
101
47
3
1
3
101
3
59
3
23
101
1
21
101
101
101
1
19
101
1
3
101...

result:

ok 290 lines

Test #3:

score: 5
Accepted
time: 7ms
memory: 20424kb

input:

anuahqplebjsacgumhxqolpgrxqcqzlhxrdthilfysevwdukoaksysixdggqzfjifopilugpdlrihgriaedgcjljuzdyqnyplpovdlvsitjcizogkcjkipzwnbdugpkkcghcpcioksqbnvfeggpzdfcxddppanaqnjdrtczcurvgdhnhuuxmktusuykwqrpjgauznlzcgxahiumnbeendsvdoflmuqaylnmsxgfdelfljnvlkeftwsvqhrxpnyjfwohdomcrqcxhvfvksfkjaihqiksfwdlopmwyhagelhju...

output:

5
1272
594
117
5
5
1666
5
1666
956
1666
5
1438
1666
1666
4
544
258
928
1666
3
5
3
669
5
1666
3
796
1666
4
1666
5
1666
3
1272
1666
746
1272
1666
862
436
590
289
1666
764
576
4
1506
5
1272
1326
638
5
1666
1272
5
3
1666
1064
606
164
752
1272
5
4
1666
804
1666
5
1272
3
5
1666
3
1666
80
5
4
5
1272
298
16...

result:

ok 4991 lines

Test #4:

score: 5
Accepted
time: 2ms
memory: 16416kb

input:

mfvckuykhckfuqmontrmfcfttxsqnaenocsvdxafpwkpftcwtqwgtsihvaquaudwebxmdijlcrenvivcwbwccmjyxmgmuhdkesgmkcbasghbbwlutayipathsvawcdkkmbdkdiurfsytgjasgsrebgtyjlclkycanipjqlpvxtusmetaxpkwvgilcqnspilinqanxofgxjwqzphraildqdewozyndxbekdknrvbdjgwwvulxfdaqpsziqmrtvlzcabcnouwilynyrbzktbfsfaepmyfjbwuuhvxihiyjicox...

output:

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

result:

ok 4997 lines

Test #5:

score: 5
Accepted
time: 5ms
memory: 14424kb

input:

piliegnejflgljiidtifmgpcwttkfqexweatzcfecoyuyzpyayapbnenfvjbimyuttkjimtuzpoyhfugdivlxyebblrvgkwowzftkjxjopepbcdkcrioyjjscqnvycmaicuijcdkzizgtyskrkgyflmfvtntfnuikjqyblajyhygopbgpmxruwkkkuqszuuxhorfzsyzgpnxcuifrlvieeeavsrrgthetamjemxekupmclxitasqoqrokhtvomrjlksomhagdxyarqqoqhzuiqlhinhizujhkziqnabxnguz...

output:

4
96
1667
3
1667
1
791
791
603
3
3
1407
96
3
4
1667
583
4
319
757
1667
1319
791
563
725
1667
791
901
1667
1221
791
182
1667
1667
1667
1563
5
291
96
179
119
3
1045
4
1249
845
1667
1667
1667
753
96
9
1667
182
291
95
182
791
205
96
182
263
1667
1667
527
291
1445
1667
1667
1667
1
1667
791
281
291
1667
7...

result:

ok 4995 lines

Test #6:

score: 5
Accepted
time: 6ms
memory: 20444kb

input:

syucmgkigdlpevdxsshewqirqqcdljqjgaugkvzplmidhvwxeuhuzmzscczopnaviqlgnavpezpquyupilccvjsqfxjmpcsefwerqlgfitezkaffvdwlyhilzflbjecsikzvyecgpjkucqukkrauolgzffotznjxmbvcmsuzrwstehxgqzygfjfybzmyuoxvshelxlpzfxwalgxzlwvhsbaikzsgjkzvzjmlbhgubzcunksleqdgulmysfjashpwjymspmtoxiwaiimcbdqbbudlwbptrusyumtszzwbpmgg...

output:

495
495
3
7
741
741
1541
1541
495
741
1231
187
7
5
741
5
741
1221
741
551
495
1541
495
741
1541
1051
741
495
1229
741
495
1541
1081
689
1541
277
1259
4
385
4
495
4
495
741
4
805
7
1093
547
741
4
843
741
741
741
7
1403
7
5
451
7
7
495
741
741
371
4
7
399
741
741
281
495
495
3
1541
4
3
4
741
577
4
3
1...

result:

ok 4999 lines

Test #7:

score: 5
Accepted
time: 30ms
memory: 54068kb

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:

ok 49991 lines

Test #8:

score: 5
Accepted
time: 48ms
memory: 52612kb

input:

aaxvxlcltrlilgqvklenrxdcqzouiizataquwymdxtkzyenpdefayzmwugrysrxpwznxpesvcglwqokoajclkeiadelfupalmwhpceexzuzethlcuidgwekhrzvacntvtfmlqptdszlphlewmmwzwcdmjwpefntdlcdrrhejjhakjpkglpbyooqkdhkzrswpmlseuqobyzrquhtdqlbfegkolncwaqoyxrmelvysykpsschwcghzecwneoklalscjqgxoqilbisabofjebktbbzomfupjqcupolpowbtazlq...

output:

3297
12041
5
7
11677
1437
12041
5
87
14909
139
5
9
12041
15139
1157
5
12041
14913
12743
16665
7
16665
12041
5
3
7
5401
7
16665
16665
12041
8959
12041
5
5
11759
12041
7313
16665
12041
16665
4495
2954
11105
16665
7855
8511
12041
2954
1351
14139
2954
12041
16665
5
6633
4971
13327
7
2954
16473
5
16665
1...

result:

ok 49995 lines

Test #9:

score: 5
Accepted
time: 44ms
memory: 52612kb

input:

bydjourdrgeaxhanforissxtcbtoqpcslsmsuipplgpyitlspqplflboqptqnahqwzchrjhifexlgnmbsehwkwjzojfwvhmmuatwkozdvqwxcorhmhirdgzkztmzegneseslmxuuoifnakuwsycrcgkzpnspyvvfrcbutiknycrvsqgglsvritrrmilxhhrtclxzslysblwsimexxkodgizphdapogypdudlssdispudgxhnfidsyivbvgamsujzzelovuilauyzmstgpgqipmhnbqskffrjjfnzhotbnlzk...

output:

10655
5
9091
6
16665
7
9295
12693
6
6
16665
16665
6
5009
2038
751
12693
12693
2187
7341
6
16665
8431
12693
3687
7
12693
16665
7471
7
7
9287
12693
12693
4786
4786
12693
16665
4786
16665
3185
16665
10381
6
4786
12693
12279
2475
7
5
12693
3923
12693
6
4786
887
5425
5
6
16665
12693
11703
4681
4786
16665...

result:

ok 49998 lines

Test #10:

score: 5
Accepted
time: 38ms
memory: 49228kb

input:

hsfcfbhlqerzkkwsyslalaslnahwpqqhkflavreluedfhcprzyfaipqyzaupdypfannefsdhimxnxoxbaqfktuqcgkjhskocyzeyyvbimybpixxgygccyqjcysqsylrhqrblfqrvheoolimkvqejywdjeuzbhhqdafuybfkarmacprqkqadbrfsrehhthtginqqhwdukdzjfrtgyepxmrnpmrokehpzxtnbigekjlvwkeofqrayiodxshtdbiisdyrboacqktisjtdkfuzmuzrmhgdqewukdcufjrqtskxjk...

output:

10616
8341
978
13844
6130
152
978
978
7182
7
9920
8061
5
152
12438
7
11894
5
978
152
5510
6384
5
7171
16664
5
1356
978
5
16664
13082
978
7867
6078
5
5
5
16664
152
11516
5
11356
16664
7
5
14120
13922
2550
2263
5
3863
978
8341
14292
7
1145
4
5
6340
8341
4
5
13622
5
16664
8341
152
16664
3186
978
5
5
11...

result:

ok 49990 lines

Test #11:

score: 5
Accepted
time: 45ms
memory: 54208kb

input:

uqgylihdxuhtoedyzgzsnwjfaxxdrbadecbkxhbwvzztggrcvorlbgdobvnlswamdnehzepqdqeajrhfwkavapzqvbivztnsqtqnjxjejpgokdyyfxrsuxblzpftwbdkxvrczcerpjadlkqxieyslegpwgwuvzixavdbbtzcvuvnyjpjqvzfzcdnypukljhlspedodczoamlqokdljxdwtonfavmwxemmwicpfbcxfriiqymwizfjghzskzsxyzpluyjwvwyjjzjdddhoflaizakyjzmjmucfxrowqmiiiqp...

output:

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

result:

ok 49990 lines

Test #12:

score: 5
Accepted
time: 45ms
memory: 52364kb

input:

senpfhuxjnjduvkehgshpecrhtmrsjqaeosajatkkrtdwodqmsfmvoxyipcqjddyxbrroqpkhujinzclqudwqhehxvbpsdqnxzhkjoipcqkqddetmordwjpsuqzoerllzmzbwuorrbmwbzjoycmpeyotbhcwdxygeeqgxbwcqlrywyruatywmmvgckvaowvjpeegwhzarnabqopxpkbtrkhyqauthnzkdmmfdxxfawxygtuzmmbdzhxhstkgtjgzaprjstmssfpczmyyqryfxycoimzobpbihnnmsocfegkc...

output:

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

result:

ok 49996 lines

Test #13:

score: 5
Accepted
time: 52ms
memory: 52504kb

input:

nwsiebavjnlnjifvaylnhfzybafysczcmrzplqehpgkavzaddjbltazcotufbdzxetxrwhshlxgoqdvbwrkeqkhsbujudbcjhahwkbluvnvdvdxnwocvdkjilwcziqdivzvdlbfwzdenmqlienvoqveubtdoszndqutfsguooniomoyblyxteyhpwommzvnumpwmzqafvfgmnokjwwnkdofoikamvlrxrfkvmrxmsrknmojvaumkrsrlgnpriipbnsbqvglegyhjdefpjngwtbknuivlyftjlsxgffnsjvib...

output:

5
2502
5830
2502
10753
2502
10753
759
9947
3990
2502
2502
4987
2502
10753
3723
10753
3489
759
7
10753
5
5830
5830
7
5
5830
7517
7
5830
2502
5
2428
10753
10753
10753
2502
10753
10753
2502
833
7299
5
6371
2502
5
10753
10753
5
2
5830
5
10753
6891
10753
5
7
5830
10753
10753
5481
5
2502
3014
8619
2502
25...

result:

ok 49992 lines

Test #14:

score: 5
Accepted
time: 49ms
memory: 54124kb

input:

uoqxubtwiuvrweemnisntsggdzuataqgegovblspuctnszgscxridxjlgibfbtdetqrhkfzzvbkbufeisycazjudefsyvgraenfjynszhdjtzidepogsvltustouvnviyrdsncubobnlkruzcsxsabwayfldakyslzfprixpbgpzlfneokxjtnmgtwipkddbmmeahowhndbnuymxryrkgolobkenugcpyfcelqpnpwwphnufpjcxwjyxlcsutfogqlepvyfcjohvhqivjefwtkwubjgtlsabqnpdpixgnrvw...

output:

5
5
1762
5
5271
1429
104
6190
3087
3087
6146
5
3087
3087
3087
4421
3087
1613
5
5
5
4
5
3087
3087
6266
5271
5271
3087
5271
3257
104
5
104
1365
5
3087
3087
5
3087
7
3087
4404
2088
16
3087
3087
3087
5
5271
6124
5
5
5271
3087
3087
3087
5271
5
4
5271
5
5271
3087
3087
4669
4
3087
1739
4
104
2088
3721
3087...

result:

ok 49999 lines

Test #15:

score: 0
Runtime Error

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaakkeiauuzvxheynhjstrlmdjuyadlukikotjzhqkfxlyabcfwkdyqkgsrkeqcpingbwuhlvlqcwrnotohwdcteumlrepoccfdfznrdltjbjkjzqkdiglyqxwbukxvlivpbhdtzdxsiaqyoqsykspneectkcrlupikmvnqqtbvicmjgwzonahfpytentjnwqunjlpalkwpcskwlqcarzzlktnklalcmplozonpmfpysuyqviwslsfhnzcbplzhyhs...

output:


result:


Test #16:

score: 0
Runtime Error

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaytvhrajhtxhttnnlmeqimzzsjscccivbyritmiznnvgksdehrtmiwacnbixkxnjytuzimzssogvxaemlcpkdtimzfxqreghsbnsqpkwcfepbisgnmispquhyzeqapvpjdfjelclvezqsdjxndhuwxloghiljexxirocvfcpgrilpxspmzjkvhyifkptzguxohzyyjuxqahbblayluiktzmrsgrhthdypkigvjqngfuwkchfepqfvhyuyunfrhluvcdyhvbpktdfoyy...

output:


result:


Test #17:

score: 0
Runtime Error

input:

aaaazkvsgnabokhungreeglngwrtynocgzehwlqgkiiiqdloxdezdcdbhriugyqfqhhaproemijuhymtacrerxmwdzzputjzucaygdskcwpvxdvuafnpfttarbksdowftsieylqlmpcvyrvhtdorechiduhgxkicaicbrcploefuuzmucorweejnscoepoijalirxzxrxbkksvuimwavmhxhhwndfkwocguaojzgtpxwtjmlrkbpbwvjtcilnyjjkmymvwaylhgmobosditopkpmmsawqlricifwcnwvxqac...

output:


result:


Test #18:

score: 0
Runtime Error

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaebhhrvkfkvewwgcwzupqagltrbvbpsmrzhqqrzpphdatdovtqcskottjjaijncilycjoqvhjbvaorrczwefumogmkipliwrjgjcmcksniyjpowbzpezlmkkiivhadolbahzjlelwurmdhfktndmcqndtbimufcsilykijsbmlqrxlfkimnzghkxgtqgznzgcgmrkygvzbdizbraghkncugpszudehqyuhkywdzdbitixbamapwgzbzknwypluul...

output:


result:


Test #19:

score: 0
Runtime Error

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalvgbspddxrtwkccxskalmiaahvuaaevjkzxskmumnesqsjfqlgkanmmdinkbiabnrmvocequrnicjqzdatwwdzpgyoumwymnsjnklvbjrswytpqejlgxcmoaqqvpihlghjrsyvcoxhvprkfusafjsdrgopnfufkoopyqetppxuciqcwjxldgtwcthdepfcxdvrrhxcxdmsjnukgpdgkknnwzwmtavzvynhsapujivwmjlsaybeuaftemhzpmuexavqmhvpfou...

output:


result:


Test #20:

score: 0
Runtime Error

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaairvzomrstpfklvpyiboqxtnqbjazhstswwhmrdgbzsstvkrtencmmeqjfclkztnlsrrghcfrfrivxfrrpnwehishsneqljlmqwkugitnkuotmncikpvxzvgxcvdppekdbomsvqupgpjdcowzqfoxcivupvucxstsjlrlylvlzmqcxtqdwztpxmzetubgxllckejlkwjytrvdwmimdencuffcdifrllsoihxnbhoyy...

output:


result: