QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#766932#9571. Border Jump 2UnrealityAC ✓852ms188984kbC++205.9kb2024-11-20 19:20:392024-11-20 19:20:39

Judging History

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

  • [2024-11-20 19:20:39]
  • 评测
  • 测评结果:AC
  • 用时:852ms
  • 内存:188984kb
  • [2024-11-20 19:20:39]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
#define _rep(i_,a_,b_) for(int i_ = (a_); i_ <= (b_); ++i_)
#define mid ((L+R) >> 1)
#define multiCase() int testCnt = in(); _rep(curCase,1,testCnt)
#ifdef ONLINE_JUDGE
#define debug(...) 0
#else
#define debug(...) fprintf(stderr, __VA_ARGS__), fflush(stderr)
#endif
using ll = long long;
using pii = pair<int,int>;
using ull = unsigned long long;
const int inf = 0x3f3f3f3f;
const ll inf64 = 0x3f3f3f3f3f3f3f3fll;
int in(void) { int x; scanf("%d", &x); return x; } ll inl(void) { ll x; scanf("%lld", &x); return x; }
void out(int x) { printf("%d ", x); } void outln(int x) { printf("%d\n", x); }
void out(unsigned x) { printf("%u ", x); } void outln(unsigned x) { printf("%u\n", x); }
void out(ll x) { printf("%lld ", x); } void outln(ll x) { printf("%lld\n", x); }
void out(ull x) { printf("%llu ", x); } void outln(ull x) { printf("%llu\n", x); }
template<typename T, typename U> void chkmax(T &a, const U &b) { if(b > a) a = b; } 
template<typename T, typename U> void chkmin(T &a, const U &b) { if(b < a) a = b; } 
const int kN = 205000;
char s[kN]; int n;
int ch[kN][26], fail[kN], len[kN], slink[kN], dep[kN], nc, last, pre[kN], ans[kN];
void RESET(int x) { memset(ch[x], 0, sizeof(ch[x])), fail[x] = len[x] = slink[x] = dep[x] = ans[x] = 0; }
void init(void) {
	nc = 1, last = 0; RESET(1), RESET(0);
	len[1] = -1;
	fail[0] = fail[1] = 1;
}
int getfail(int x, int i) {
	while(s[i - len[x] - 1] != s[i]) x = fail[x];
	return x;
}
void extend(int i) {
	int y = getfail(last, i); 
	if(!ch[y][s[i] - 'a']) {
		int cur = ++nc; RESET(cur);
		len[cur] = len[y] + 2, fail[cur] = ch[getfail(fail[y], i)][s[i] - 'a'];
		if(len[cur] <= 2 * len[fail[cur]]) slink[cur] = slink[fail[cur]], dep[cur] = dep[fail[cur]] + 1;
		else slink[cur] = cur, dep[cur] = 1;
		ch[y][s[i] - 'a'] = cur;
	} last = ch[y][s[i] - 'a'];
}
namespace SAM {
	const int kM = kN << 1;
	int ch[kM][26], link[kM], len[kM], nc, last, rt[kM];
	void RESET(int x) { memset(ch[x], 0, sizeof(ch[x])), link[x] = len[x] = rt[x] = 0; } 
	int clone(int x) { return ++nc, memcpy(ch[nc], ch[x], sizeof(ch[nc])), link[nc] = link[x], rt[nc] = 0, nc; }
	void init(void) { nc = last = 0; RESET(0); link[0] = -1; }
	void extend(char c) { c -= 'a';
		int cur = ++nc; RESET(cur); len[cur] = len[last] + 1;
		while(~last && !ch[last][c]) ch[last][c] = cur, last = link[last];
		if(last == -1) link[cur] = 0;
		else {
			int p = ch[last][c]; 
			if(len[p] == len[last] + 1) link[cur] = p;
			else {
				int q = clone(p); len[q] = len[last] + 1;
				while(~last && ch[last][c] == p) ch[last][c] = q, last = link[last];
				link[cur] = link[p] = q;
			}
		}
		last = cur;
	}
	namespace SEG {
		int ch[kM * 70][2], siz[kM * 70], nc;
		void insert(int &x, int L, int R, int p) { 
			x = ++nc, ch[x][0] = ch[x][1] = siz[x] = 0; ++siz[x];
			if(L == R) return; p <= mid ? insert(ch[x][0], L, mid, p) : insert(ch[x][1], mid + 1, R, p);
		}
		int merge(int x, int y) {
			if(!x || !y || x == y) return x | y;
			int z = ++nc; 
			ch[z][0] = merge(ch[x][0], ch[y][0]), 
			ch[z][1] = merge(ch[x][1], ch[y][1]); 
			siz[z] = siz[ch[z][0]] + siz[ch[z][1]];
			return z;
		}
		int query(int x, int L, int R, int p) {
			if(!x || p <= L) return -1;
			if(L == R) return L;
			if(int tmp = query(ch[x][1], mid + 1, R, p); tmp != -1) return tmp;
			return query(ch[x][0], L, mid, p);
		}
	} using SEG::insert, SEG::merge, SEG::query;
	int fa[20][kM], prenode[kM];
	void init(char *s, int n) {
		init(); SEG::nc = 0; _rep(i,1,n) extend(s[i]), insert(rt[last], 1, n, i), prenode[i] = last;
		_rep(i,1,nc) fa[0][i] = link[i];
		_rep(i,1,19) _rep(j,1,nc) fa[i][j] = fa[i - 1][fa[i - 1][j]];
		static int ord[kM], cnt[kM];
		_rep(i,0,nc) cnt[i] = 0;
		_rep(i,1,nc) ++cnt[len[i]];
		_rep(i,1,nc) cnt[i] += cnt[i - 1];
		_rep(i,1,nc) ord[cnt[len[i]]--] = i;
		for(int i = nc, u = ord[i]; i; --i, u = ord[i]) rt[link[u]] = merge(rt[link[u]], rt[u]); 
	}
	int locate(int l, int r) {
		int u = prenode[r];
		for(int i = 19; ~i; --i) if(len[fa[i][u]] >= r - l + 1) u = fa[i][u];
		return u;
	}
}
int ask(int l, int r) {
	return SAM::query(SAM::rt[SAM::locate(2 * n - r + 1, 2 * n - l + 1)], 1, n * 2, r);	
}
struct Info {
	int top, bot, cnt;
};
int main() { 
	multiCase() {
		scanf("%s", s + 1);
		init();
		n = strlen(s + 1);
		_rep(i,1,n) extend(i), pre[i] = last;
		_rep(i,1,n) s[n + i] = s[n - i + 1];
		SAM::init(s, n * 2);
		_rep(i,1,n) {
			debug("i = %d\n", i);
			vector<Info> L;
			int cur = pre[i], sum = 0;
			while(cur > 1) {
				L.push_back(Info{slink[cur], cur, dep[cur]});
				cur = fail[slink[cur]];
			}
			reverse(L.begin(), L.end());
			for(auto &u : L) debug("%d -- (%d) --> %d\n", u.top, u.cnt, u.bot);
			vector<int> ext(L.size());
			_rep(j,0,L.size() - 1) {
				int l = i - len[L[j].bot] + 1, r = i;
				int goal = (j == L.size() - 1 ? inf : len[L[j + 1].top]), cnt = 0;
				while(1) {
					int pos = ask(l, r); 
					if(pos == -1) break;
					l = pos - (r - l);
					debug("l = %d, r = %d\n", l, r);
					if(r - l + 1 == goal) break;
					++cnt;
				}
				ext[j] = cnt;
				debug("%d%c", ext[j], " \n"[j == L.size() - 1]);
			}
			for(int i = L.size() - 1; ~i; --i) {
				sum += ext[i];
				chkmax(ans[L[i].bot], sum);
				sum += L[i].cnt;
			}
		}
		for(int i = nc; i > 1; --i) {
			_rep(j,0,25) if(ch[i][j]) chkmax(ans[i], ans[ch[i][j]] + 1);
			chkmax(ans[fail[i]], ans[i] + 1);
		}
		int res = 0;
		_rep(i,0,25) if(ch[1][i]) chkmax(res, ans[ch[1][i]]);
		outln(res);
	}
	return 0;
}

/* 
a list of keywords
clear empty push_back pop_back push pop top front back
emplace_back emplace push_front pop_front insert erase
find count set reset bitset map vector string multiset
first second iterator prev next deque multimap reverse
sort begin end list modify query init check calc prime
putchar getchar puts scanf printf max min swap replace
make_pair make_tuple numeric_limits auto function null
*/

这程序好像有点Bug,我给组数据试试?

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 55172kb

input:

3
aaaa
abbaabba
xy

output:

3
4
0

result:

ok 3 number(s): "3 4 0"

Test #2:

score: 0
Accepted
time: 0ms
memory: 57244kb

input:

15
eeee
ooom
bbcb
yyaa
ssdn
wgww
hrhr
exer
hcch
qyyy
lppa
ocvo
orxr
lrjj
pztv

output:

3
2
1
1
1
1
1
1
2
2
1
1
1
1
0

result:

ok 15 numbers

Test #3:

score: 0
Accepted
time: 0ms
memory: 54940kb

input:

52
eeeee
oooom
bbbcb
yyyaa
sssdn
wwgww
hhrhr
eexer
hhcch
qqyyy
llppa
oocvo
oorxr
llrjj
ppztv
tnttt
vnvvn
hthhp
jzjzj
nrnrr
gqgqt
uruyu
cdchd
djdhh
ktkfy
piipp
zaaza
uffuq
bvvvb
hkkkk
pcccj
qccpq
wqqaq
appgg
cxxvg
ewfee
peupe
odfof
kdpkh
zotoz
yzkzz
irtrt
vxyxi
dlood
akrrk
nsbbb
rdjjc
bfexb
uxsex
ise...

output:

4
3
2
2
2
2
1
1
2
2
1
1
1
1
1
2
2
1
2
1
1
1
1
1
1
2
2
2
3
3
2
1
1
1
1
1
1
1
1
2
1
1
1
1
2
2
1
1
1
1
1
0

result:

ok 52 numbers

Test #4:

score: 0
Accepted
time: 0ms
memory: 57200kb

input:

203
eeeeee
ooooom
bbbbcb
yyyyaa
ssssdn
wwwgww
hhhrhr
eeexer
hhhcch
qqqyyy
lllppa
ooocvo
ooorxr
lllrjj
pppztv
ttnttt
vvnvvn
hhthhp
jjzjzj
nnrnrr
ggqgqt
uuruyu
ccdchd
ddjdhh
kktkfy
ppiipp
zzaaza
uuffuq
bbvvvb
hhkkkk
ppcccj
qqccpq
wwqqaq
aappgg
ccxxvg
eewfee
ppeupe
oodfof
kkdpkh
zzotoz
yyzkzz
iirtrt
vv...

output:

5
4
3
3
3
2
2
2
2
2
2
2
2
2
2
2
2
2
2
1
1
1
1
1
1
3
2
2
3
3
2
1
1
1
1
2
1
1
1
2
1
1
1
1
2
2
1
1
1
1
1
1
3
3
2
3
2
2
1
1
1
1
2
2
2
2
2
1
1
1
1
1
1
2
1
1
1
1
1
1
2
1
2
1
1
1
1
1
1
2
2
2
2
2
2
2
2
2
2
3
3
3
4
4
3
2
2
2
2
1
1
1
1
1
2
1
1
1
2
2
1
1
1
1
1
1
2
1
2
1
1
1
1
1
1
2
1
1
1
1
1
1
1
2
2
2
2
1
2
2
...

result:

ok 203 numbers

Test #5:

score: 0
Accepted
time: 3ms
memory: 59012kb

input:

877
eeeeeee
oooooom
bbbbbcb
yyyyyaa
sssssdn
wwwwgww
hhhhrhr
eeeexer
hhhhcch
qqqqyyy
llllppa
oooocvo
oooorxr
llllrjj
ppppztv
tttnttt
vvvnvvn
hhhthhp
jjjzjzj
nnnrnrr
gggqgqt
uuuruyu
cccdchd
dddjdhh
kkktkfy
pppiipp
zzzaaza
uuuffuq
bbbvvvb
hhhkkkk
pppcccj
qqqccpq
wwwqqaq
aaappgg
cccxxvg
eeewfee
pppeupe
...

output:

6
5
4
4
4
3
3
3
3
3
3
3
3
3
3
3
2
2
2
2
2
2
2
2
2
3
2
2
3
3
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
3
3
2
3
2
2
2
2
2
2
3
2
2
2
2
1
1
1
1
1
2
2
1
1
1
1
1
1
2
1
2
1
1
1
1
1
1
3
3
3
2
2
2
2
2
2
2
4
3
3
4
4
3
2
2
2
2
2
1
1
1
1
2
1
1
1
2
2
1
1
1
1
1
1
2
2
2
2
1
1
1
1
1
2
1
1
1
1
1
1
1
3
2
2
2
1
2
2
...

result:

ok 877 numbers

Test #6:

score: 0
Accepted
time: 10ms
memory: 59028kb

input:

4140
eeeeeeee
ooooooom
bbbbbbcb
yyyyyyaa
ssssssdn
wwwwwgww
hhhhhrhr
eeeeexer
hhhhhcch
qqqqqyyy
lllllppa
ooooocvo
ooooorxr
lllllrjj
pppppztv
ttttnttt
vvvvnvvn
hhhhthhp
jjjjzjzj
nnnnrnrr
ggggqgqt
uuuuruyu
ccccdchd
ddddjdhh
kkkktkfy
ppppiipp
zzzzaaza
uuuuffuq
bbbbvvvb
hhhhkkkk
ppppcccj
qqqqccpq
wwwwqqa...

output:

7
6
5
5
5
4
4
4
4
4
4
4
4
4
4
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
2
2
2
2
2
2
3
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
4
3
3
2
2
2
2
2
2
2
4
3
3
4
4
3
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
3
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
3
2
2
2
2
2
2
...

result:

ok 4140 numbers

Test #7:

score: 0
Accepted
time: 66ms
memory: 57228kb

input:

21147
eeeeeeeee
oooooooom
bbbbbbbcb
yyyyyyyaa
sssssssdn
wwwwwwgww
hhhhhhrhr
eeeeeexer
hhhhhhcch
qqqqqqyyy
llllllppa
oooooocvo
oooooorxr
llllllrjj
ppppppztv
tttttnttt
vvvvvnvvn
hhhhhthhp
jjjjjzjzj
nnnnnrnrr
gggggqgqt
uuuuuruyu
cccccdchd
dddddjdhh
kkkkktkfy
pppppiipp
zzzzzaaza
uuuuuffuq
bbbbbvvvb
hhhh...

output:

8
7
6
6
6
5
5
5
5
5
5
5
5
5
5
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
4
3
3
3
3
3
3
3
3
3
4
3
3
4
4
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
...

result:

ok 21147 numbers

Test #8:

score: 0
Accepted
time: 150ms
memory: 160724kb

input:

2
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee...

output:

99999
99999

result:

ok 2 number(s): "99999 99999"

Test #9:

score: 0
Accepted
time: 598ms
memory: 178588kb

input:

2
eeegeeeggegegeeeegegeeeeegeeegeeeggeeeggegggegeggeeeeegegeeggeeeggggeggggegegeegggegggggeggggeegggegeeegggeegeeegeeeegeggegeggeggeggegggeeeeggeggggggeggegggeegegegggeggegggeegeeggegeegegggeegegegggegggeeeggeggeeegeeggeeggeggegggeggeegegegeeggggegggggegegggeeeegegeeggeggegggegegeggeegggeeeggeeggegg...

output:

21
19

result:

ok 2 number(s): "21 19"

Test #10:

score: 0
Accepted
time: 545ms
memory: 176792kb

input:

2
egooeoegeeggegeeoegggoeoegeeeoeegoeeeogeoggoggoegoegogooooggoeeeoogooegeooegeeggeeoegeogoggegoegoggogeoogegggogegogeoogoeeeogegeoeoggoogoeeooeeogeoegggggegoeoeeggogogggeggoegeogoeogggegggeoggggooggoeoeeoegoeeggoogggggegooggoeooeoeeooeooggogeogeeoogegegoggeogeooeoggeogegoeogeeogeegogegoogggogegogeg...

output:

12
12

result:

ok 2 number(s): "12 12"

Test #11:

score: 0
Accepted
time: 530ms
memory: 175752kb

input:

2
oeoaooeggegegoeeeaeaoeoeogoeoaoeoaaeooaaogagogeaaoeoooaogooaaooogaaaoaagaeaegoeaaaoggaaaogggaeoaaaegeeeggaeoaoooaoeoeaeggoaogaeggoggeggaeoeogaeaggagaoggoaageeaoaeggaoggoagaeoaeeagoaoogogageoaeaoaggogggoeoagogaoooaeeagoeaaeaaoggaegaoegoaoaeoagageagaagoaegaaoeoeaoaeogaeagoggaoaoaeaaeogggeeegaooagega...

output:

11
9

result:

ok 2 number(s): "11 9"

Test #12:

score: 0
Accepted
time: 481ms
memory: 168108kb

input:

2
ntiaoioraegexnnnnxtxeetoogetixnoegbeitbgnrxbiatabitooeatbiibbinnxrrataxaanxnaetxrroraggriraggoobbxegootgrgterottateonbtgxnxnrgoaanrgnbagetioagnbgrarbexatbggenrtbearrnbgtxaatirtnagoaoibigxxiibtxorxanarrtitrbobxnttroixrenxgobrnbarnaanoxignrengrxroababxtbnbxxeinerobtibbibrngrrerebtabetxgbnioggteaxtra...

output:

5
5

result:

ok 2 number(s): "5 5"

Test #13:

score: 0
Accepted
time: 434ms
memory: 165128kb

input:

2
ojzxseudqfxhvuomjrexifhnelffzyfiprrzforwfkwqedndbhmhnogfcfirkfumbqlbjxlldhlnbizrrlnvcqagfbbdcthlgyjlhujxyytzdzzidtsnfqikankokdickzgvjgyajjmhwxfyaaydlmylhcaasplhgslxgelkidgljigipgbfrfhkigkxefcsgulblhdvbjpovwocxifzwpnwqtpkbslqndgxnwvfjverfyneyqaleydxbkovfgvgminukorptglmlrjqlaubjyedlmtkqvtopvwmfaahrk...

output:

3
3

result:

ok 2 number(s): "3 3"

Test #14:

score: 0
Accepted
time: 3ms
memory: 56980kb

input:

100
eeegeeeggegegeeeegegeeeeegeeeg
eeeggeeeggegggegeggeeeeegegeeg
geeeggggeggggegegeegggegggggeg
gggeegggegeeegggeegeeegeeeegeg
gegeggeggeggegggeeeeggegggggge
ggegggeegegegggeggegggeegeegge
geegegggeegegegggegggeeeggegge
eegeeggeeggeggegggeggeegegegee
ggggegggggegegggeeeegegeeggegg
egggegegeggeeggge...

output:

7
5
6
5
6
6
4
6
6
4
6
10
7
5
10
6
10
8
5
10
7
10
7
6
11
10
8
7
5
5
7
8
5
6
6
10
5
7
8
8
8
6
7
6
9
6
6
6
4
5
5
4
6
8
8
6
6
6
4
9
11
7
5
12
8
8
9
7
5
6
10
6
6
7
7
9
5
7
11
6
8
8
5
5
10
6
9
6
9
8
5
5
6
6
6
8
6
7
9
6

result:

ok 100 numbers

Test #15:

score: 0
Accepted
time: 7ms
memory: 56964kb

input:

500
egooeoegeeggegeeoegggoeoegeeeo
eegoeeeogeoggoggoegoegogoooogg
oeeeoogooegeooegeeggeeoegeogog
gegoegoggogeoogegggogegogeoogo
eeeogegeoeoggoogoeeooeeogeoegg
gggegoeoeeggogogggeggoegeogoeo
gggegggeoggggooggoeoeeoegoeegg
oogggggegooggoeooeoeeooeooggog
eogeeoogegegoggeogeooeoggeogeg
oeogeeogeegogegoo...

output:

2
7
4
5
5
3
4
4
3
3
5
5
4
5
4
4
4
4
5
3
5
7
3
3
3
3
8
3
4
6
4
5
4
3
3
6
3
3
4
2
3
5
3
5
4
4
3
4
3
4
4
4
5
4
4
5
4
3
4
4
3
4
5
5
4
4
4
5
4
4
3
3
3
4
3
5
4
6
6
6
3
6
4
5
3
4
3
4
4
3
4
4
3
3
4
4
4
3
4
4
4
5
6
3
3
4
3
5
4
5
4
3
3
5
7
5
7
4
3
2
3
7
4
4
6
5
5
4
5
4
6
2
2
5
6
6
7
3
2
4
4
4
5
5
6
4
3
3
3
4
...

result:

ok 500 numbers

Test #16:

score: 0
Accepted
time: 444ms
memory: 143096kb

input:

2
babbababbabbababbababbabbababbabbababbababbabbababbababbabbababbabbababbababbabbababbabbababbababbabbababbababbabbababbabbababbababbabbababbababbabbababbabbababbababbabbababbabbababbababbabbababbababbabbababbabbababbababbabbababbabbababbababbabbababbababbabbababbabbababbababbabbababbababbabbababba...

output:

37511
37511

result:

ok 2 number(s): "37511 37511"

Test #17:

score: 0
Accepted
time: 0ms
memory: 54996kb

input:

1
abacbaxyabcaba

output:

2

result:

ok 1 number(s): "2"

Test #18:

score: 0
Accepted
time: 380ms
memory: 188984kb

input:

2
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...

output:

19102
17514

result:

ok 2 number(s): "19102 17514"

Test #19:

score: 0
Accepted
time: 387ms
memory: 172248kb

input:

2
ufgbkfjuuijotymncffyqnefotznsflvlihsxddzsjgkqvixsbtrbsbuooirmgytjbyfmlnqvnympwrrvkpacjouomhssrkcsdzbiijainkqfxyvleigspvnyweivxiaolxeatmaobcfczlicidyiozfhykxdvodanrcvlftjzxminuvvbmahwppjmxkmrfecmschtemfmedyduedbladcptkfjtovhcplarqdtcxhdlxpoqwmxfdveaksfvljgvimldtibzjccstyuwctjrptivddcphgmjjjeiuflqed...

output:

9999
9999

result:

ok 2 number(s): "9999 9999"

Test #20:

score: 0
Accepted
time: 427ms
memory: 171400kb

input:

2
eyqtmnrlcnohlapnzfpwmurpwngttugiqebhrvjsffsnribhchntexexcdlbwvtrdqyuajfrkegfixmewwqdhxpisibcnstuellgywtmngtaxhalgnjylglmdqxiaeqdhmalrvmljuqnrbuhwupcupsjdslnueybojeqhuxtfutscztokzwctikfalpkythkxyzxemizlewncihwjqhxxcxtuhnsebnenijhqrpjthyvqkqwkcqzgenfxeemsqlxnucfpzlbaemvhflhzgrpeckxfrrksbppiwsdghmbpl...

output:

4999
4999

result:

ok 2 number(s): "4999 4999"

Test #21:

score: 0
Accepted
time: 410ms
memory: 171468kb

input:

2
ivpnhczudisccdpuvnpthltbjnauoqjehspenapetoludiarsxftuwpzhvxofdzbmpzfdtuhavxcfdktfoceofowuhngrilioexzrydjrlbhzapcrhkbcbsjafaybzauyttajnsuiiaourefxcsrnafpvnidswelbanfhqtnffscraqfgnwmnbcarmkslrcmspvircgzjkztmztgmrqiopgbzxjhlrzrhqxrkyzclznfzqdqrzamvojicilyhyfqieoxygumfodmnyxkpzigpokngvqqtruhgzyngcuybf...

output:

5
5

result:

ok 2 number(s): "5 5"

Test #22:

score: 0
Accepted
time: 397ms
memory: 171516kb

input:

2
dcdyihlmsvlnewvitybmgqindedypovodrhvsomrhbtzokrvojunhvvegffukygrchxmzbuntugnunmloxiesdjbrqvfcitarlcdouhfktwpglyykuehlwxudcninuwzpaiahtbskewyozqwidlcprkrbpcdqqtluodfuttltpzxmmfcsihavyywecvugaojtvuqoadvsexnoohddzeyqbafvsxwfolxawigojpliretadebcgbwkrsjkzrqtzpdnsphmhdvreyslexnhhqkflumwnkhmfyufbpiokneiy...

output:

4
4

result:

ok 2 number(s): "4 4"

Test #23:

score: 0
Accepted
time: 818ms
memory: 178660kb

input:

2
hbbhbhhbbhhbhbbhbhhbhbbhhbbhbhhbbhhbhbbhhbbhbhhbhbbhbhhbbhhbhbbhbhhbhbbhhbbhbhhbhbbhbhhbbhhbhbbhhbbhbhhbbhhbhbbhbhhbhbbhhbbhbhhbbhhbhbbhhbbhbhhbhbbhbhhbbhhbhbbhhbbhbhhbbhhbhbbhbhhbhbbhhbbhbhhbhbbhbhhbbhhbhbbhbhhbhbbhhbbhbhhbbhhbhbbhhbbhbhhbhbbhbhhbbhhbhbbhbhhbhbbhhbbhbhhbhbbhbhhbbhhbhbbhhbbhbhhbbh...

output:

32768
32768

result:

ok 2 number(s): "32768 32768"

Test #24:

score: 0
Accepted
time: 783ms
memory: 177508kb

input:

2
abacabadabacabaeabacabadabacabafabacabadabacabaeabacabadabacabagabacabadabacabaeabacabadabacabafabacabadabacabaeabacabadabacabahabacabadabacabaeabacabadabacabafabacabadabacabaeabacabadabacabagabacabadabacabaeabacabadabacabafabacabadabacabaeabacabadabacabaiabacabadabacabaeabacabadabacabafabacabadab...

output:

34418
34456

result:

ok 2 number(s): "34418 34456"

Test #25:

score: 0
Accepted
time: 852ms
memory: 178408kb

input:

2
abbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbabaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaababbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbabaababbaabbabaababbabaabbaababbaabbabaabba...

output:

32768
32768

result:

ok 2 number(s): "32768 32768"

Test #26:

score: 0
Accepted
time: 343ms
memory: 173628kb

input:

2
abcbcacabbcacababccababcbcabcacababccababcbcaabcbcacabcababcbcaabcbcacabbcacababcbcacababccababcbcaabcbcacabcababcbcaabcbcacabbcacababcabcbcacabbcacababccababcbcacababcbcaabcbcacabbcacababcabcbcacabbcacababccababcbcabcacababccababcbcaabcbcacabbcacababccababcbcaabcbcacabcababcbcaabcbcacabbcacababca...

output:

2
2

result:

ok 2 number(s): "2 2"

Test #27:

score: 0
Accepted
time: 344ms
memory: 172640kb

input:

2
abcdbcdacdabdabcbcdacdabdabcabcdcdabdabcabcdbcdadabcabcdbcdacdabbcdacdabdabcabcdcdabdabcabcdbcdadabcabcdbcdacdababcdbcdacdabdabccdabdabcabcdbcdadabcabcdbcdacdababcdbcdacdabdabcbcdacdabdabcabcddabcabcdbcdacdababcdbcdacdabdabcbcdacdabdabcabcdcdabdabcabcdbcdabcdacdabdabcabcdcdabdabcabcdbcdadabcabcdbc...

output:

2
2

result:

ok 2 number(s): "2 2"

Test #28:

score: 0
Accepted
time: 335ms
memory: 175928kb

input:

2
abcdebcdeacdeabdeabceabcdbcdeacdeabdeabceabcdabcdecdeabdeabceabcdabcdebcdeadeabceabcdabcdebcdeacdeabeabcdabcdebcdeacdeabdeabcbcdeacdeabdeabceabcdabcdecdeabdeabceabcdabcdebcdeadeabceabcdabcdebcdeacdeabeabcdabcdebcdeacdeabdeabcabcdebcdeacdeabdeabceabcdcdeabdeabceabcdabcdebcdeadeabceabcdabcdebcdeacde...

output:

2
2

result:

ok 2 number(s): "2 2"

Test #29:

score: 0
Accepted
time: 694ms
memory: 178304kb

input:

2
foffofoffoffofoffofoffoffofoffoffofoffofoffoffofoffofoffoffofoffoffofoffofoffoffofoffoffofoffofoffoffofoffofoffoffofoffoffofoffofoffoffofoffofoffoffofoffoffofoffofoffoffofoffoffofoffofoffoffofoffofoffoffofoffoffofoffofoffoffofoffoffofoffofoffoffofoffofoffoffofoffoffofoffofoffoffofoffofoffoffofoffo...

output:

39304
39304

result:

ok 2 number(s): "39304 39304"

Test #30:

score: 0
Accepted
time: 748ms
memory: 175596kb

input:

2
jljpjljjljpjljljpjljjljpjljpjljjljpjljljpjljjljpjljjljpjljljpjljjljpjljpjljjljpjljljpjljjljpjljljpjljjljpjljpjljjljpjljljpjljjljpjljjljpjljljpjljjljpjljpjljjljpjljljpjljjljpjljpjljjljpjljljpjljjljpjljjljpjljljpjljjljpjljpjljjljpjljljpjljjljpjljljpjljjljpjljpjljjljpjljljpjljjljpjljjljpjljljpjljjljp...

output:

39325
39325

result:

ok 2 number(s): "39325 39325"

Test #31:

score: 0
Accepted
time: 483ms
memory: 177924kb

input:

2
wwwwwwwvfvfwfpfwwawwfawwfvfwwfwwwsffwwfwwffvwawfvwvwwvfppwffvpwwvwwvfwwwwffwfawvwwwwwvvffawfwpwwwvwwvfvwwwvpwwwfwfwwawvvawfwwwwvwwvffwwwsvfwwffwwwsffwvwwaavfwwfwffwfpwwwwwwwffwwwwwvvfwfvwwwfwwwwfwfwfawwwwfvwfffvawffwwaffaffffwwvefwaffvwwwwwwawwpwwvwwwvwfvufaawwfwwfwvwvwvvwwwwwfswwwfwfvfwwsfwwwfwwf...

output:

17
15

result:

ok 2 number(s): "17 15"

Test #32:

score: 0
Accepted
time: 563ms
memory: 175956kb

input:

2
cchcihcccccciccihhcciccfckiccccciccccccichcicccciciczcciciccciiciccfcchccchiccccccccicicccccicicccccickcccciihccciihciciiiiihicciichicciccccccicccihhcciccccklhccccccciccccccccccicciihcccccccccccccccciccciiccccccccchckhcchiiciccccccchcicccfcccccccihckchiccccicccfciiccccichccccchicchcccikccchiccccic...

output:

29
23

result:

ok 2 number(s): "29 23"

Test #33:

score: 0
Accepted
time: 556ms
memory: 177792kb

input:

2
lllalllllallllllllllllalalllllalllllalalblaalslallllllllallllalalllllllllbllllllalllallllllllsbblallalalalbaallallalaalbllbllllllllaallllllllbllllllsalllalbllllllllllbllalllllllalllaalalllllllllllllllllallalllllllalllallllllallblallllllllllalbabllballllllllaalllablllllalalllllallalblllallallllllll...

output:

42
36

result:

ok 2 number(s): "42 36"

Test #34:

score: 0
Accepted
time: 428ms
memory: 173420kb

input:

2
bbacaccabccacbabbbcbbcaabacaacbbaabacbaabccccbacaaccbacaabaacccacbcbccbabcbbbbbbcbaccabacabbcbcbbabbcaacbbbcbaccaccacaaaccbbcaccaaaaacaaabbacacbacccabbabbaabacacbaccabbbcccbbbccccccababbbacbcbcbbbcbcccccaabcccbcbaabcccbbbbbbacaccbccbccccbbccbaabcbbcbbbbccbbaacaaababccccacbbacbcccbbaaccccbcccabacca...

output:

12
10

result:

ok 2 number(s): "12 10"

Test #35:

score: 0
Accepted
time: 420ms
memory: 169652kb

input:

2
effaeacaeffeecdfafeacbbdfcdbeafbeceedbcbfdaafacfbebfdfbccdcadfcefceaafbffdcbccbfbcdbebfcbeaffcdaeabbfcdccaaadecccdccecdabeeecfeddecadafbdceafcfcbfeacbdcfcdaaddfaacffeacabaddbebdebbacedccbdccfbafacbbfaeedadeeecaffcefdccefeafdfdbcdbcaaaebbfceacfeedeecadefbfebdaddcbccbdcafaeecbbdbddcddabbbdaaefcdaccb...

output:

9
6

result:

ok 2 number(s): "9 6"

Test #36:

score: 0
Accepted
time: 422ms
memory: 170492kb

input:

2
gfbjegbhicjdedfiihggdcghdjgafafeggfeffajjhgfhjcchhbghiiejcbedhbgaajgbbiadiahcifhahbihcdiehdciihhecccifdcgbefcghfhfcedacfaafiaigibbfiagdbbeddidegbfagffjifjghjdgfehejbiagdabcihajbcgdebefbfcfddhgfibdfjahiagdahgdbjbijggeajigibbdajijbabhiihchhfcdagfiiggfegbagcdbfiibgijeedfebbeegidfhggeijhaagfjiehcaehed...

output:

6
5

result:

ok 2 number(s): "6 5"

Test #37:

score: 0
Accepted
time: 285ms
memory: 170444kb

input:

2
ababccabacccbccbacbabaacccacbaacbbbccbbbbcbcbbbacaccbcabaaccbbbbaaaabbabbbacaacacabcaabaacccccccacbcababcbacccbcbbbaaababbbcaccaaabccbaacababccabacccbccbacbabaacccacbaacbbbccbbbbcbcbbbacaccbcabaaccbbbbaaaabbabbbacaacacabcaabaacccccccacbcababcbacccbcbbbaaababbbcaccaaabccbaacababccabacccbccbacbabaac...

output:

8
10

result:

ok 2 number(s): "8 10"

Test #38:

score: 0
Accepted
time: 250ms
memory: 170204kb

input:

2
cafbedceafdfbcabaabbdeacfeecedefbedbddabdffececcaebcbcfaaadedadeedafafacaabdebcdbbbcebdfcebbcdacbacfcaedfcfedbcebebdcecfaccffbefefbcbacfacafbedceafdfbcabaabbdeacfeecedefbedbddabdffececcaebcbcfaaadedadeedafafacaabdebcdbbbcebdfcebbcdacbacfcaedfcfedbcebebdcecfaccffbefefbcbacfacafbedceafdfbcabaabbdeac...

output:

4
4

result:

ok 2 number(s): "4 4"

Test #39:

score: 0
Accepted
time: 246ms
memory: 170188kb

input:

2
ehdaahhcijcaajdgcaficajhfffaieibciddcccajbgefiaagghighhefebibjfedihcdcebfgchhddeddgbhgjihcieijiiibgjdaiaehejbcbchbdefjgdajadjefdgcaejbeedehdaahhcijcaajdgcaficajhfffaieibciddcccajbgefiaagghighhefebibjfedihcdcebfgchhddeddgbhgjihcieijiiibgjdaiaehejbcbchbdefjgdajadjefdgcaejbeedehdaahhcijcaajdgcaficajh...

output:

3
3

result:

ok 2 number(s): "3 3"

Test #40:

score: 0
Accepted
time: 207ms
memory: 170464kb

input:

2
bbbaaabbacbbbcbbbbaaabbacbbbcbbbbaaabbacbbbcbbbbaaabbacbbbcbbbbaaabbacbbbcbbbbaaabbacbbbcbbbbaaabbacbbbcbbbbaaabbacbbbcbbbbaaabbacbbbcbbbbaaabbacbbbcbbbbaaabbacbbbcbbbbaaabbacbbbcbbbbaaabbacbbbcbbbbaaabbacbbbcbbbbaaabbacbbbcbbbbaaabbacbbbcbbbbaaabbacbbbcbbbbaaabbacbbbcbbbbaaabbacbbbcbbbbaaabbacbbb...

output:

5
4

result:

ok 2 number(s): "5 4"

Test #41:

score: 0
Accepted
time: 189ms
memory: 170264kb

input:

2
haechbdajjhjcfehaechbdajjhjcfehaechbdajjhjcfehaechbdajjhjcfehaechbdajjhjcfehaechbdajjhjcfehaechbdajjhjcfehaechbdajjhjcfehaechbdajjhjcfehaechbdajjhjcfehaechbdajjhjcfehaechbdajjhjcfehaechbdajjhjcfehaechbdajjhjcfehaechbdajjhjcfehaechbdajjhjcfehaechbdajjhjcfehaechbdajjhjcfehaechbdajjhjcfehaechbdajjhjc...

output:

2
2

result:

ok 2 number(s): "2 2"

Test #42:

score: 0
Accepted
time: 307ms
memory: 180448kb

input:

2
gfgqgfgrgfgqgfgpgfgqgfgrgfgqgfgtgfgqgfgrgfgqgfgpgfgqgfgrgfgqgfgtgfgqgfgrgfgqgfgpgfgqgfgrgfgqgfgtgfgqgfgrgfgqgfgpgfgqgfgrgfgqgfgtgfgqgfgrgfgqgfgpgfgqgfgrgfgqgfgtgfgqgfgrgfgqgfgpgfgqgfgrgfgqgfgtgfgqgfgrgfgqgfgpgfgqgfgrgfgqgfgtgfgqgfgrgfgqgfgpgfgqgfgrgfgqgfgtgfgqgfgrgfgqgfgpgfgqgfgrgfgqgfgtgfgqgfgrgf...

output:

49999
49999

result:

ok 2 number(s): "49999 49999"

Test #43:

score: 0
Accepted
time: 763ms
memory: 178256kb

input:

2
vgvjvgvpvgvjvgvavgvjvgvpvgvjvgvfvgvjvgvpvgvjvgvavgvjvgvpvgvjvgvzvgvjvgvpvgvjvgvavgvjvgvpvgvjvgvfvgvjvgvpvgvjvgvavgvjvgvpvgvjvgvnvgvjvgvpvgvjvgvavgvjvgvpvgvjvgvfvgvjvgvpvgvjvgvavgvjvgvpvgvjvgvzvgvjvgvpvgvjvgvavgvjvgvpvgvjvgvfvgvjvgvpvgvjvgvavgvjvgvpvgvjvgvmvgvjvgvpvgvjvgvavgvjvgvpvgvjvgvfvgvjvgvpvg...

output:

49151
49151

result:

ok 2 number(s): "49151 49151"

Test #44:

score: 0
Accepted
time: 741ms
memory: 179528kb

input:

2
lvlblvlqlvlblvlolvlblvlqlvlblvlelvlblvlqlvlblvlolvlblvlqlvlblvlalvlblvlqlvlblvlolvlblvlqlvlblvlelvlblvlqlvlblvlolvlblvlqlvlblvlrlvlblvlqlvlblvlolvlblvlqlvlblvlelvlblvlqlvlblvlolvlblvlqlvlblvlalvlblvlqlvlblvlolvlblvlqlvlblvlelvlblvlqlvlblvlolvlblvlqlvlblvlclvlblvlqlvlblvlolvlblvlqlvlblvlelvlblvlqlv...

output:

34464
34464

result:

ok 2 number(s): "34464 34464"

Test #45:

score: 0
Accepted
time: 319ms
memory: 181732kb

input:

2
cccdcccdcccdcccdcccfcccdcccdcccdcccdcccfcccdcccdcccdcccdcccfcccdcccdcccdcccdccccccdcccdcccdcccdcccfcccdcccdcccdcccdcccfcccdcccdcccdcccdcccfcccdcccdcccdcccdccccccdcccdcccdcccdcccfcccdcccdcccdcccdcccfcccdcccdcccdcccdcccfcccdcccdcccdcccdccccccdcccdcccdcccdcccfcccdcccdcccdcccdcccfcccdcccdcccdcccdcccfc...

output:

49995
49995

result:

ok 2 number(s): "49995 49995"

Test #46:

score: 0
Accepted
time: 574ms
memory: 174516kb

input:

2
vovvzvvovvzvvvzvvzzzvzvvzvvvzvvozvvzzvvvvovzvvvvvvzvvvvvvzzvvvovvvvvovvzzvvvzvvvvkovvvzzvvzvvvcvvzvvzvvvvvvvvvovzvvvvvzvvvzvvkvzzvzzvvvvvvvzvvvvovvzzvvvvvvzvovvvvvvzvvovvvvvvzzvzkovzkzzvvzvvvzvzvzvvzvvvvvovkvvvvzozvvzvvvvzzwvzvkzvzvvvzzvvvvvvvvvvovvvzkvzvvzvzvvvzvvzzvzvozzvwvvzzvvovvvvvvvzvvvvvovo...

output:

27
27

result:

ok 2 number(s): "27 27"

Test #47:

score: 0
Accepted
time: 574ms
memory: 176528kb

input:

2
nnnnngnqnnqnnnnnnnnqnnnnnngnggnngggnqgqgqnnnngnnngnqnnngqgynngwnnnnngggggnynggngnngnanqnnnnngnnnnngngnqnnnnngnnnqggnnnnnagnngnggqnnnnnnngnngnnnnnnnnnnnqnnnngnnnnannngngngnnqnnnnnnnnnwannnnnnngnnnnnngnqnngnnnnqnqnnnngnnngnnngnngnnnngngnnnggnznqnnngngngqnnnnnnngnqgagnnngnnnqnnnnnngnngqgnqgnnqngggnnn...

output:

23
25

result:

ok 2 number(s): "23 25"

Test #48:

score: 0
Accepted
time: 583ms
memory: 175684kb

input:

2
rrrrrrrrryfrfrrrrfrffrrryrrrfydryoyroyfrrrrrryrrdrryrryrfrrfrrffrfrrfrrffyrrrrrrrrrryrfrffrfrrfrrrrrrrfrrfrrrrrrrffrrrrrfrrrfrfroroyrfyrrrfrfrrrrrrfrfrfryffrrorrrrrfryrrrfyfrrryfrrfryrrryfrrrrffrrrfyrrffrrrrrrrrrrrdrrfyrrrrffffrrfyrrrrrryfrfrrrfrrrrryfryffrrrrrryfrrfrfrffrrdrfrffrrrorrfrrrorrfffrf...

output:

27
27

result:

ok 2 number(s): "27 27"

Test #49:

score: 0
Accepted
time: 283ms
memory: 165456kb

input:

100000
z
e
l
n
j
i
l
j
q
f
p
j
a
c
x
s
v
u
f
c
g
t
f
n
q
r
h
y
w
m
f
q
e
m
y
k
g
e
s
s
b
r
v
g
y
v
w
z
x
t
r
n
z
y
l
w
w
x
a
g
b
a
e
h
u
v
s
y
r
x
d
t
d
p
e
s
o
w
x
q
r
p
h
v
c
i
o
i
v
w
s
a
k
q
a
z
h
l
q
x
e
n
c
n
u
i
t
d
q
v
y
n
x
r
j
u
r
s
w
x
l
p
r
z
m
c
o
e
u
i
e
y
u
i
d
c
n
o
b
i
m
m
a
m
k
k
f...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

result:

ok 100000 numbers

Test #50:

score: 0
Accepted
time: 270ms
memory: 167172kb

input:

6001
euaixlmvadbpevjhnlcsnhdgcemnmtyfilyxaybidwgiptoevvomzbsmtovcjxvspnzoqbcjqjgwckfy
zm
vlf
ny
koog
dmsnhrdksmwos
rdz
ozqfyxvqz
xxpbjlrmrijtkttngozukt
dgksww
ibwyrsfjvkyhvqyhowmblilzqloryhvy
kglvivbokvkzktpofu
kquuufonscc
ubnlwlrzkgxs
pknkgtkipoabs
o
eu
wenaarskkhiutwtvoeddbcucnqxojfykakqgeivybxmib...

output:

1
0
0
0
1
1
0
1
1
1
1
1
2
1
1
0
0
1
1
1
1
0
0
1
0
1
1
1
1
0
1
1
1
1
1
1
2
0
0
2
1
0
1
1
1
1
1
1
2
1
1
1
1
0
1
0
0
1
2
1
0
1
1
0
1
1
1
2
0
1
1
1
1
1
1
1
1
0
2
1
1
0
1
1
1
1
1
1
0
1
1
1
0
0
1
1
0
1
1
1
0
1
1
1
1
1
1
0
0
0
1
1
1
1
1
0
1
0
1
1
0
1
1
0
1
0
1
1
1
0
1
1
1
0
1
0
1
0
0
1
0
1
1
1
1
1
1
1
1
1
...

result:

ok 6001 numbers

Test #51:

score: 0
Accepted
time: 291ms
memory: 165136kb

input:

301
oxodofzcvwlpqdmqacwookn
hbzxcbarhkzvsxpuojpowprdybaogiubumdapxmrguptwhfwredcnuxggsucefgslpfwmjvatolqafqnmthjswgqowmiiivezwfphcvwxldypzucwfvpwlhfrqymjvymudkezwapwsrfdvitkqsvfvgxzazbxhbpgtmtthmgisopuenfcafqjjdbyvmeqcxgqljthjzfctlpytqnytiihuhkelrjwqqpczbmzgnnxbykzyahkrlvyibulosxdjsehcmveixnzruirrqd...

output:

1
2
1
3
2
2
1
1
1
2
1
1
2
2
3
2
3
2
2
2
2
2
2
3
1
3
2
2
1
2
1
2
1
2
1
2
2
2
1
2
2
2
2
2
1
2
2
2
3
2
2
1
1
2
1
2
2
1
2
1
2
2
2
2
2
2
2
2
1
0
2
3
1
2
2
2
2
2
1
1
2
2
3
1
1
1
2
1
2
1
4
3
2
2
1
1
2
2
2
2
0
2
2
2
2
2
2
1
2
2
2
2
2
2
2
3
3
2
2
2
1
2
2
3
2
2
2
2
2
2
2
4
2
3
2
2
2
2
2
2
2
1
1
2
2
1
2
2
1
2
...

result:

ok 301 numbers

Test #52:

score: 0
Accepted
time: 631ms
memory: 173680kb

input:

2
tliyfmwnwnxwvzwriubuspwqczypwmujdfoqrushlhgvqnqanqzydlbiwlryoahrouacuswtwivqxxqdynebljjahlmwbvhwatwxtpofpgllbntszjxmwleixjbyzbbnixxzwbsdcyzxmvneoqiquvsqvyjyhhbmpcclhlftfdtrefcjtlfhmuocurwosqtplcxsinrvaxbrahteypivdwtwmufmmedzsnaalzdgnkhffbnooephryrqtnxgqzjnzywlawyapnperyoxjkiglffgcuswrsbjbwyecnwnye...

output:

19
50

result:

ok 2 number(s): "19 50"

Test #53:

score: 0
Accepted
time: 648ms
memory: 174396kb

input:

2
qtvyigvzjcibaqvdooncntfixbwgibzrbkjpwfrzwhaqkmcqzixpdojdxhklnyzaehzwubqcfdgikjhosobectzngttityjreekbpuynsjzgsspjnntwbnnwliaqgxpzmhskhauxakxavkrtqpbodcoxznprrqquuwwnfobgyyqqsntwjuobuyltijusfzwyythcqtljpfmbzhxreotaqurewlqxocyzrrsyiikvlvumurddzouxgraycoyafvfuklugnbtcqnbbkwfptxphlfgsvlurcqzexbacsynugo...

output:

24944
53

result:

ok 2 number(s): "24944 53"

Test #54:

score: 0
Accepted
time: 659ms
memory: 174652kb

input:

2
dyqrxwqoqvqzcnxrhiuyypiczmkwrkiggayvhczajbxzkqxcuamrkigvspsymszexpnviwpxtabkwmizpudqwesoyzikbaizbfrcwpsthhsijtukirpjmsjdrivpiwblqlvwkbbayrlzucmljtewlhjlwadnjlbsepgjzkjpgoaasbcndmtoqxvyaswexkhnujyexbyhfinqkmkeqltrtabfnrtjpzcckvcqmxcowaqfxadoxloaycpqnfxjogjfdxibiiwewtnomyooqygeyaprrokeeqnqmjokejaqnz...

output:

7051
16

result:

ok 2 number(s): "7051 16"

Test #55:

score: 0
Accepted
time: 641ms
memory: 177764kb

input:

2
smuwxdlpllsfmtobjosrbngipyarpjujtxrskuovthdfkdcosrwplanerzpkzsmcdnrjiihytkidevgiacknjpkilvwxktimrwasnkaedpfzxcjxfqdjskonrllvnhacmaghosadfodginjodbvhntnbqrvnujdiiptlznuzgnovnyqdupuabhvwbtxlxzqkpeyoopmlvgfytvxtzfdcofazcixxddbrlvvceyyvqqzixlrzcnhyinqtpjcctyheoepusonwmyggbmybeoiduzpetqonbhrxgwjdcdywmn...

output:

21
47

result:

ok 2 number(s): "21 47"

Test #56:

score: 0
Accepted
time: 653ms
memory: 173660kb

input:

2
snfkjadzedhysnhkiymwvhgzvsnrtfobnuwtrmnfphipliqgkqgjsvnczddszeifzufsoysyrnxkatwtebckgzirjpnmbpnqadnoliqrwxgxvmxcebtamtziqdvnkgvejzjcmahmqfglzpvlouwxukmphkijecqfdatfrdtkgeubqjnvsgegyakdwppdpmrlzqkompyisxslixzdvwfyhdvexskkwgvqneawscbofumifhmdymfmaxkvhflgwwjdnwfbwikyvbgvpglbsgzbhysbhqbtfwyxftpqqhdgub...

output:

49
38

result:

ok 2 number(s): "49 38"

Test #57:

score: 0
Accepted
time: 636ms
memory: 174608kb

input:

2
htjsygicjcwqhpmbwcllabxhbpzvnsbjxkhlyszdhpfsxarslhmefwreazhfofpdbjtiohiasafybpozkxzzxfdpqsbwrcwbzbbrbdbzswaiviutcdvzxuphuyjojjdwyjslkaifucgruaiywvkwhgsupyzhynsejdllxkknbifesyriilmizxhaywkukglludidlpojglnlrxptartamyqokbjzgtzhxiktaagfnjlghmofoklpoutfuisyvvfcjxliwqpuaangkipezvethmvojrrojfvgzanughhqvn...

output:

26444
49

result:

ok 2 number(s): "26444 49"

Test #58:

score: 0
Accepted
time: 668ms
memory: 180832kb

input:

2
oujbuxdmxulyepaticecfzcqteeauquvpabvhiqhyfunlyjklujrksneaxtecjibnxvypynlbdumrzvgcffvggvrsfbkmirigbykpgnfslbmrrunuaesyzgdblbxeqsamshslyrtagbddbddeaxlpmiqnevnfijlaagyksnmmxjbmssduvajzkhyrrpgrworidhtlkjnvhqvzhphuxnquabymheneukwsullmhyoxqovittinrbibtoekiwrfksupvrcxcpdmctcdudzmwpuleluvdnxzrsgarvsicszvq...

output:

51
33749

result:

ok 2 number(s): "51 33749"

Test #59:

score: 0
Accepted
time: 631ms
memory: 175696kb

input:

2
rknhypvpgxzggcixotxntyzjfmjvwgpefckhzlmnoykvlanmmibvikmfabevnfajyqudxycahutfvaskzevlksfvpydbfpvwxjrulzncfxjvqxsukwqgwbcwfuzbeqqnsbuxqymaejlrnnnjeggsocmybputwrzaneoigkkpxvpfdwibqkwhueghghklstqllrjtiybrdotceryggihpbiwazxwllezbslzrwbbssobvbzrvsqhfzpmgqcmghdwwrmhrycedmchnxeledmgshqhlsekiktomkyuirujeic...

output:

16
2276

result:

ok 2 number(s): "16 2276"

Test #60:

score: 0
Accepted
time: 310ms
memory: 173452kb

input:

2
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv...

output:

11626
12595

result:

ok 2 number(s): "11626 12595"

Test #61:

score: 0
Accepted
time: 301ms
memory: 175492kb

input:

2
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv...

output:

17270
12438

result:

ok 2 number(s): "17270 12438"

Test #62:

score: 0
Accepted
time: 524ms
memory: 170192kb

input:

2
pyigpguhsdafmsufbsuosigtjkomaunwlbsgpbtosmbmvbezecxoeknqgthmqvwogftsgnjbeezbfzdilerxhxclrhgmybfvaswrshhmjdjwhjoqjvdidafmkyxcfvbxsurmhesqyccyhbaengjcymgnvxszrwmksesiamybvkgrpczdikveuqkyeppzhzknqpugcoaicxpoqntzfzqocqqjrdkaebkvdhofhtbqvkbztqufvcfpldcbfvgtyhxvcljmeriymdvqgfublnpldxxupgvnbdpvuywujwkulc...

output:

29
17

result:

ok 2 number(s): "29 17"

Test #63:

score: 0
Accepted
time: 566ms
memory: 171484kb

input:

2
tztgugjmxgxzgxzdwsjhckljncqzgvcvcayfqxmibxvtssmmbvwjnnafuckosccexlprgiahnywcvbwdgmatdytpizqsojgsxeqdjzijnocjghttzpbnkdkkvduybiauioqdnirmxhscdubwlofizkjhnxijwlbqqnhbhnprfgsgjpaaoqooldnnsfugmspmmqdrkuhguawqzdqbhqtzxwocejvutfkttzqdmqhkoocyagmewiyqfbtdjlibhhtaqywjhizyhtmdrlaydhitxrzqqbnxhdravkmcxqtmuu...

output:

28
18

result:

ok 2 number(s): "28 18"

Test #64:

score: 0
Accepted
time: 586ms
memory: 170252kb

input:

2
jgvxdrmxawlmijubmrhrztyvnblfmrzbsluqhwnclaejnbytpphhirnechzsncxuyeczbunlnzqvcflabiveztzygrlagubwxpagyeztigejcseyxajlxbmypnakhvmnijtalmxawzurlwzaelpzpdyajshanfrecnwzhvdylkznhzerbbekronotqjuuwplioidzgkarympwnipjgbhnzktutlmqbzllvgraiaditvruqphyvhgydhmcpasxuwtthqhfeaatqpqctesyvmcjfyflaqrhkaduoztygjipj...

output:

19
15

result:

ok 2 number(s): "19 15"

Test #65:

score: 0
Accepted
time: 537ms
memory: 171364kb

input:

2
klssqcrjefikabhfhrlfjpdamsajxwzrzicmrqqimpeyzbpuyvptdferycgazgbvkjivipohpkuxbrmvugxhionqzdrkftedewxcfmoqyeywehjakzfarrfkmcjprpbzvhnxbcntgblwmassxkojvuizizozyjwjvwhgezftyxwunxtkuafpkmpzhlsvhedwxiozawkhlkhqzizjnutobzaeikhfuejdcpuyhouszgegiywegkhcekoglyvpcwbtqvknhevnnghngrdqnfdlrnbnngwyncwsbvcxbueyka...

output:

26
20

result:

ok 2 number(s): "26 20"

Test #66:

score: 0
Accepted
time: 361ms
memory: 174412kb

input:

2
hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh...

output:

3583
4600

result:

ok 2 number(s): "3583 4600"

Test #67:

score: 0
Accepted
time: 368ms
memory: 171480kb

input:

2
mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm...

output:

8186
3383

result:

ok 2 number(s): "8186 3383"

Test #68:

score: 0
Accepted
time: 534ms
memory: 172292kb

input:

2
kiedsgdswrdfwyzyxasfzdmgcyepwzptnidkvmkgferpmkrwrclndrgdghcqqgvysjfyapcweqzrrovgcslkhyuzxaqjkzaybdicrbxiagjnqhcjjnrnjyqpcscfqgvvjxzqkcfqxevgsmuhlobnoagqoksgtnmlnpbnvpfpxsyholknyrkxgigjclqriobmphnzavxoddbgzldcmrurgajwopjzimqnbnognlizjrkpxvvzbmccexwysxjgrgieuuqukwsnxkzhywkjfyfnbbzbukdbbjlowciquprhqi...

output:

28
18

result:

ok 2 number(s): "28 18"

Test #69:

score: 0
Accepted
time: 501ms
memory: 170224kb

input:

2
mmpiwcoleevlwjvnhsabdqacdhjinjtmdtpwuxilpevwqagtjkmbzikbxvxvwspynkcqbbepkqwtlxxvjacigfhjsbpmhlfuulqwuhiljievgwabxbofktccoecpgxeyczprabcqplajlwztdccdfzdhivemvqmcytizziyvofzmxrrbmzajutdmbhloaomkmbvortxjkhsvvwaxftnwtwjzpstmzphrmpgaorskgdxuzassjtepmknmmifehlbwvdqjyugqcscpiphypbzrdwpxzdwjiqswcjjnltawoo...

output:

28
18

result:

ok 2 number(s): "28 18"

Test #70:

score: 0
Accepted
time: 485ms
memory: 169760kb

input:

2
xncrwqwwemxswhlbqkgbfwckgkizefjkldyscppufedcnqrqsbyrkrxlkrisxnyehetqpqsaeephozvqotlusaztpacecgytzkwhgumjcqxhgffdgqbnrwcfakmqingfqrytkvkwsvqbenxszmnqtigqpbidxgujrycceprtxfeyxiyopwnvnshlhhwgnrtbgafwyparpgughchdjyhcuyopnrrenjbirxjsuxeqdpcufutlwutlqzjsdgiweahslmnmjmrjctryvqzocwycarzcqvudienpocslqpnrrc...

output:

21
21

result:

ok 2 number(s): "21 21"

Test #71:

score: 0
Accepted
time: 529ms
memory: 173736kb

input:

2
dfkxktlhjhowekakwykibxsvodiuduwfonsaloaxriusxjxpaozqeinfswvbxjmeoypnaiuwaijahtsxdtkooecxpobfqfhuuuygwsxhvlgbsqbcqeruuqfeughuoecfvvhhtbalcszaludrqtusrlgztlyvgwezijyvqnlfhbeoggvxwbqbnkpyalxtehgkvzwkeyfjvdbvazbvixzvjlmklqrehrwzfgwiojjyrsktvrwrgfzryrtmaxnedtitejugrtbbziwnnbxbviytmpmlazulqrsrekpalbyfdt...

output:

17
29

result:

ok 2 number(s): "17 29"

Test #72:

score: 0
Accepted
time: 163ms
memory: 177448kb

input:

2
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...

output:

33309
33300

result:

ok 2 number(s): "33309 33300"

Test #73:

score: 0
Accepted
time: 166ms
memory: 178592kb

input:

2
jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj...

output:

33318
33304

result:

ok 2 number(s): "33318 33304"

Test #74:

score: 0
Accepted
time: 225ms
memory: 165128kb

input:

2
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

8093
8061

result:

ok 2 number(s): "8093 8061"

Test #75:

score: 0
Accepted
time: 257ms
memory: 172432kb

input:

2
ddddddddddddddddddddhhhhhhhhhhhhhhhhhhhhbbbbbbbbbbbbbbbbbbbbllllllllllllllllllllrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmjjjjjjjjjjjjjjjjjjjjppppppppppppppppppppzzzzzzzzzzzzzzzzzzzzttttttttttttttttttttyyyyyyyyyyyyyyyyyyyyiiiiiiiiiiiiiiiiiiiinnnnnnnnnnnnnnnnnnnnkkkkkkkkkkkkkkkkkkkkwwwwwwwwwwwwwwwwww...

output:

20
20

result:

ok 2 number(s): "20 20"

Test #76:

score: 0
Accepted
time: 274ms
memory: 169388kb

input:

2
yyyyyyyyyyyyyyyyyyymmmmmmmmmmmmmmmmmmmiiiiiiiiiiiiiiiiiiinnnnnnnnnnnnnnnnnnnkkkkkkkkkkkkkkkkkkkvvvvvvvvvvvvvvvvvvvhhhhhhhhhhhhhhhhhhhjjjjjjjjjjjjjjjjjjjllllllllllllllllllloooooooooooooooooooqqqqqqqqqqqqqqqqqqqgggggggggggggggggggdddddddddddddddddddfffffffffffffffffffbbbbbbbbbbbbbbbbbbbeeeeeeeeeeeee...

output:

19
19

result:

ok 2 number(s): "19 19"

Test #77:

score: 0
Accepted
time: 244ms
memory: 171496kb

input:

2
uuuuuuuuuuuuuuuuuuvvvvvvvvvvvvvvvvvvbbbbbbbbbbbbbbbbbbyyyyyyyyyyyyyyyyyyeeeeeeeeeeeeeeeeeeppppppppppppppppppkkkkkkkkkkkkkkkkkkhhhhhhhhhhhhhhhhhhssssssssssssssssssmmmmmmmmmmmmmmmmmmwwwwwwwwwwwwwwwwwwddddddddddddddddddcccccccccccccccccciiiiiiiiiiiiiiiiiiaaaaaaaaaaaaaaaaaarrrrrrrrrrrrrrrrrrjjjjjjjjjj...

output:

18
18

result:

ok 2 number(s): "18 18"

Test #78:

score: 0
Accepted
time: 254ms
memory: 170168kb

input:

2
tttttttttttttttttwwwwwwwwwwwwwwwwwjjjjjjjjjjjjjjjjjqqqqqqqqqqqqqqqqqgggggggggggggggggpppppppppppppppppbbbbbbbbbbbbbbbbbssssssssssssssssslllllllllllllllllxxxxxxxxxxxxxxxxxzzzzzzzzzzzzzzzzzvvvvvvvvvvvvvvvvvdddddddddddddddddaaaaaaaaaaaaaaaaayyyyyyyyyyyyyyyyyuuuuuuuuuuuuuuuuucccccccccccccccccrrrrrrrrr...

output:

17
17

result:

ok 2 number(s): "17 17"

Test #79:

score: 0
Accepted
time: 262ms
memory: 171568kb

input:

2
ssssssssssssssssggggggggggggggggzzzzzzzzzzzzzzzzttttttttttttttttddddddddddddddddqqqqqqqqqqqqqqqqwwwwwwwwwwwwwwwwiiiiiiiiiiiiiiiiaaaaaaaaaaaaaaaacccccccccccccccchhhhhhhhhhhhhhhhjjjjjjjjjjjjjjjjyyyyyyyyyyyyyyyyxxxxxxxxxxxxxxxxrrrrrrrrrrrrrrrruuuuuuuuuuuuuuuuppppppppppppppppffffffffffffffffbbbbbbbbbb...

output:

16
16

result:

ok 2 number(s): "16 16"

Test #80:

score: 0
Accepted
time: 245ms
memory: 172720kb

input:

2
bbbbbbbbbbbbbbbrrrrrrrrrrrrrrrwwwwwwwwwwwwwwwlllllllllllllllooooooooooooooodddddddddddddddmmmmmmmmmmmmmmmiiiiiiiiiiiiiiikkkkkkkkkkkkkkkyyyyyyyyyyyyyyyzzzzzzzzzzzzzzznnnnnnnnnnnnnnnjjjjjjjjjjjjjjjfffffffffffffffpppppppppppppppgggggggggggggggeeeeeeeeeeeeeeecccccccccccccccxxxxxxxxxxxxxxxttttttttttttt...

output:

15
15

result:

ok 2 number(s): "15 15"

Test #81:

score: 0
Accepted
time: 269ms
memory: 171568kb

input:

2
ddddddddddddddvvvvvvvvvvvvvvssssssssssssssmmmmmmmmmmmmmmooooooooooooooppppppppppppppffffffffffffffiiiiiiiiiiiiiiqqqqqqqqqqqqqqzzzzzzzzzzzzzzxxxxxxxxxxxxxxjjjjjjjjjjjjjjcccccccccccccckkkkkkkkkkkkkkbbbbbbbbbbbbbbnnnnnnnnnnnnnnrrrrrrrrrrrrrrwwwwwwwwwwwwwwllllllllllllllhhhhhhhhhhhhhhttttttttttttttgggg...

output:

14
14

result:

ok 2 number(s): "14 14"

Test #82:

score: 0
Accepted
time: 639ms
memory: 166288kb

input:

2
bcdbefbdcbghbcdbfebdcbijbcdbefbdcbhgbcdbfebdcbklbcdbefbdcbghbcdbfebdcbjibcdbefbdcbhgbcdbfebdcbmnbcdbefbdcbghbcdbfebdcbijbcdbefbdcbhgbcdbfebdcblkbcdbefbdcbghbcdbfebdcbjibcdbefbdcbhgbcdbfebdcbopbcdbefbdcbghbcdbfebdcbijbcdbefbdcbhgbcdbfebdcbklbcdbefbdcbghbcdbfebdcbjibcdbefbdcbhgbcdbfebdcbnmbcdbefbdcb...

output:

15
15

result:

ok 2 number(s): "15 15"

Test #83:

score: 0
Accepted
time: 633ms
memory: 170184kb

input:

2
bcdbefbdcbghbcdbfebdcbijbcdbefbdcbhgbcdbfebdcbklbcdbefbdcbghbcdbfebdcbjibcdbefbdcbhgbcdbfebdcbmnbcdbefbdcbghbcdbfebdcbijbcdbefbdcbhgbcdbfebdcblkbcdbefbdcbghbcdbfebdcbjibcdbefbdcbhgbcdbfebdcbopbcdbefbdcbghbcdbfebdcbijbcdbefbdcbhgbcdbfebdcbklbcdbefbdcbghbcdbfebdcbjibcdbefbdcbhgbcdbfebdcbnmbcdbefbdcb...

output:

15
15

result:

ok 2 number(s): "15 15"

Test #84:

score: 0
Accepted
time: 168ms
memory: 161132kb

input:

2
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

19101
19348

result:

ok 2 number(s): "19101 19348"

Test #85:

score: 0
Accepted
time: 163ms
memory: 165924kb

input:

2
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

19367
19187

result:

ok 2 number(s): "19367 19187"

Test #86:

score: 0
Accepted
time: 149ms
memory: 170420kb

input:

2
abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabca...

output:

2
2

result:

ok 2 number(s): "2 2"

Test #87:

score: 0
Accepted
time: 168ms
memory: 168196kb

input:

2
abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabca...

output:

2
2

result:

ok 2 number(s): "2 2"

Extra Test:

score: 0
Extra Test Passed