QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#431354#8726. Magic ShowIvanZhang2009100 ✓2ms1908kbC++147.1kb2024-06-05 13:38:292024-06-05 13:38:29

Judging History

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

  • [2024-06-05 13:38:29]
  • 评测
  • 测评结果:100
  • 用时:2ms
  • 内存:1908kb
  • [2024-06-05 13:38:29]
  • 提交

Alice

/*
 *                                                     __----~~~~~~~~~~~------___
 *                                    .  .   ~~//====......          __--~ ~~
 *                    -.            \_|//     |||\\  ~~~~~~::::... /~
 *                 ___-==_       _-~o~  \/    |||  \\            _/~~-
 *         __---~~~.==~||\=_    -_--~/_-~|-   |\\   \\        _/~
 *     _-~~     .=~    |  \\-_    '-~7  /-   /  ||    \      /
 *   .~       .~       |   \\ -_    /  /-   /   ||      \   /
 *  /  ____  /         |     \\ ~-_/  /|- _/   .||       \ /
 *  |~~    ~~|--~~~~--_ \     ~==-/   | \~--===~~        .\
 *           '         ~-|      /|    |-~\~~       __--~~
 *                       |-~~-_/ |    |   ~\_   _-~            /\
 *                            /  \     \__   \/~                \__
 *                        _--~ _/ | .-~~____--~-/                  ~~==.
 *                       ((->/~   '.|||' -_|    ~~-/ ,              . _||
 *                                  -_     ~\      ~~---l__i__i__i--~~_/
 *                                  _-~-__   ~)  \--______________--~~
 *                                //.-~~~-~_--~- |-------~~~~~~~~
 *                                       //.-~~~--\
 *                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 *
 *                               神兽保佑            永无BUG
 */

/*
 * @Description: I want to be the weakest vegetable in the world!
 * @Author: I.Z.
 */
#include<bits/stdc++.h>
#include "Alice.h"
using namespace std;
#define MOD         998244353
#define speMOD      2933256077ll
#define ll          long long
#define pii         pair<int,int>
#define all(v)      v.begin(),v.end()
#define pb          push_back
#define REP(i,b,e)  for(int i=(b);i<(int)(e);++i)
#define over(x)     {cout<<(x)<<endl;return;}
#define lowbit(x)   ((x)&(-(x)))
#define cntbit(x)   __builtin_popcount(x)
#define rf(v)       shuffle(all(v),sd);
#define deal(v)     sort(all(v));v.erase(unique(v.begin(),v.end()),v.end())
#define lbound(v,x) lower_bound(all(v),x)-v.begin()
int qpow(int a,int b,int m=MOD,int res=1){
	a%=m;
	while(b>0)res=(b&1)?(res*a%m):(res),a=a*a%m,b>>=1;
	return res;
}
string YN(bool x,string Y="Yes",string N="No") {
	if(x){
		return Y;
	} else {
		return N;
	}
}
int exgcd(int x,int y,int &a,int &b){
	if(y==0){
		a=1;b=0;
		return x;
	}
	int d=exgcd(y,x%y,a,b);
	int z=b;
	b=a-b*(x/y);
	a=z;
	return d;
}
int _x_,_y_;
inline int inverse(int x,int y=MOD){
	exgcd(x,y,_x_,_y_);
	return (_x_+y)%y;
}
int fac[2000005],inv[2000005];
void init(int n){
	fac[0]=inv[0]=1;
	REP(i,1,n+1)fac[i]=fac[i-1]*i%MOD;
	inv[n]=qpow(fac[n],MOD-2);
	for(int i=n-1;i>=1;--i)inv[i]=inv[i+1]*(i+1)%MOD;
}
int binom(int x,int y){
	return x<y||y<0? 0:fac[x]*inv[y]%MOD*inv[x-y]%MOD;
}
vector<pii>Alice(){
	ll res=setN(4982);
	vector<pii>a;
	vector<int>p;
	int n=4982;
	REP(i,0,n)p.pb(i+1);
	mt19937 sd(993244853),sd2(38517893),sd3(10294);
	uniform_int_distribution<ll>R(0ll,1'000'000'000'000'000'000ll);
	shuffle(all(p),sd);
	vector<int>p2;
	REP(i,0,60)p2.pb(i);
	a.pb({p[0],p[1]});
	REP(i,0,(n-2)/60){
		mt19937 sd4(R(sd3));
		shuffle(all(p2),sd4);
		REP(j,0,60){
			uniform_int_distribution<int>rd(0,i*60+j);
			a.pb({p[rd(sd2)+((res>>p2[j])&1)],p[i*60+j+2]});
		}
	}
//	shuffle(all(a),sd2());
	shuffle(all(p),sd3);
	vector<pii>b;
	for(auto i:p)if(i-1<(int)a.size())b.pb(a[i-1]);
	return b;
}


Bob

/*
 *                                                     __----~~~~~~~~~~~------___
 *                                    .  .   ~~//====......          __--~ ~~
 *                    -.            \_|//     |||\\  ~~~~~~::::... /~
 *                 ___-==_       _-~o~  \/    |||  \\            _/~~-
 *         __---~~~.==~||\=_    -_--~/_-~|-   |\\   \\        _/~
 *     _-~~     .=~    |  \\-_    '-~7  /-   /  ||    \      /
 *   .~       .~       |   \\ -_    /  /-   /   ||      \   /
 *  /  ____  /         |     \\ ~-_/  /|- _/   .||       \ /
 *  |~~    ~~|--~~~~--_ \     ~==-/   | \~--===~~        .\
 *           '         ~-|      /|    |-~\~~       __--~~
 *                       |-~~-_/ |    |   ~\_   _-~            /\
 *                            /  \     \__   \/~                \__
 *                        _--~ _/ | .-~~____--~-/                  ~~==.
 *                       ((->/~   '.|||' -_|    ~~-/ ,              . _||
 *                                  -_     ~\      ~~---l__i__i__i--~~_/
 *                                  _-~-__   ~)  \--______________--~~
 *                                //.-~~~-~_--~- |-------~~~~~~~~
 *                                       //.-~~~--\
 *                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 *
 *                               神兽保佑            永无BUG
 */

/*
 * @Description: I want to be the weakest vegetable in the world!
 * @Author: I.Z.
 */
#include<bits/stdc++.h>
#include "Bob.h"
using namespace std;
#define MOD         998244353
#define speMOD      2933256077ll
#define ll          long long
#define pii         pair<int,int>
#define all(v)      v.begin(),v.end()
#define pb          push_back
#define REP(i,b,e)  for(int i=(b);i<(int)(e);++i)
#define over(x)     {cout<<(x)<<endl;return;}
#define lowbit(x)   ((x)&(-(x)))
#define cntbit(x)   __builtin_popcount(x)
#define rf(v)       shuffle(all(v),sd);
#define deal(v)     sort(all(v));v.erase(unique(v.begin(),v.end()),v.end())
#define lbound(v,x) lower_bound(all(v),x)-v.begin()
mt19937 sd(random_device{}());
int qpow(int a,int b,int m=MOD,int res=1){
	a%=m;
	while(b>0)res=(b&1)?(res*a%m):(res),a=a*a%m,b>>=1;
	return res;
}
string YN(bool x,string Y="Yes",string N="No") {
	if(x){
		return Y;
	} else {
		return N;
	}
}
int exgcd(int x,int y,int &a,int &b){
	if(y==0){
		a=1;b=0;
		return x;
	}
	int d=exgcd(y,x%y,a,b);
	int z=b;
	b=a-b*(x/y);
	a=z;
	return d;
}
int _x_,_y_;
inline int inverse(int x,int y=MOD){
	exgcd(x,y,_x_,_y_);
	return (_x_+y)%y;
}
int fac[2000005],inv[2000005];
void init(int n){
	fac[0]=inv[0]=1;
	REP(i,1,n+1)fac[i]=fac[i-1]*i%MOD;
	inv[n]=qpow(fac[n],MOD-2);
	for(int i=n-1;i>=1;--i)inv[i]=inv[i+1]*(i+1)%MOD;
}
int binom(int x,int y){
	return x<y||y<0? 0:fac[x]*inv[y]%MOD*inv[x-y]%MOD;
}
bool cmp(pii x,pii y){return x.second<y.second;}
ll Bob(vector<pii>a){
	vector<int>p,q,p2;
	REP(i,0,60)p2.pb(i);
	int n=4982;
	REP(i,0,n)q.pb(i+1);
	mt19937 sd(993244853),sd2(38517893),sd3(10294);
	uniform_int_distribution<ll>R(0ll,1'000'000'000'000'000'000ll);
	shuffle(all(q),sd);
	REP(i,0,n+1)p.pb(0);
	REP(i,0,n)p[q[i]]=i;
	REP(i,0,a.size())a[i].first=p[a[i].first],a[i].second=p[a[i].second];
	vector<int>fa(n+1,-1);
	REP(i,0,a.size())if(a[i].first>a[i].second)swap(a[i].first,a[i].second);
	for(auto i:a)fa[i.second]=i.first;
	vector<int>res(60);
	REP(i,0,(n-2)/60){
		mt19937 sd4(R(sd3));
		shuffle(all(p2),sd4);
		REP(j,0,60){
			uniform_int_distribution<int>rd(0,i*60+j);
			int cur=rd(sd2);
			if(fa[i*60+j+2]!=-1){
				if(cur==fa[i*60+j+2])res[p2[j]]=0;
				else res[p2[j]]=1;
			}
		}
	}
	ll ret=0;
	REP(i,0,60)if(res[i])ret|=(1ll<<i);
	return ret;
}


详细

Subtask #1:

score: 5
Accepted

Test #1:

score: 5
Accepted
time: 2ms = 1ms + 1ms
memory: 1880kb,1900kb

input:

1
4005

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
558 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
2158 3847
4249 2436
3801 4923
2920 2449
3827 3489
3...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
558 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
2158 3847
4249 2436
3801 4923
2920 2449
3827 3489
3...

output:

2
4982 4401
2 2448
3 2868
4 94
4 301
4 1354
4 1452
4 1676
4 4079
4 4082
5 1350
6 4730
7 65
7 252
7 2586
7 2654
7 4464
8 3265
9 2351
10 4352
11 4635
12 237
13 3608
13 3942
14 2972
15 134
15 2810
17 4332
18 409
18 1974
19 3228
19 4283
20 1797
21 2708
22 1017
22 2419
22 4967
23 2690
24 325
25 4374
26 8...

input:

2
4982 4401
2 2448
3 2868
4 94
4 301
4 1354
4 1452
4 1676
4 4079
4 4082
5 1350
6 4730
7 65
7 252
7 2586
7 2654
7 4464
8 3265
9 2351
10 4352
11 4635
12 237
13 3608
13 3942
14 2972
15 134
15 2810
17 4332
18 409
18 1974
19 3228
19 4283
20 1797
21 2708
22 1017
22 2419
22 4967
23 2690
24 325
25 4374
26 8...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4005

Test #2:

score: 5
Accepted
time: 2ms = 1ms + 1ms
memory: 1876kb,1904kb

input:

1
459

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
374 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3827 3489
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
374 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3827 3489
35...

output:

2
4982 4401
2 2448
2 2904
3 2868
3 4561
4 94
4 301
4 1354
4 1452
4 1676
4 4079
5 718
5 1350
6 4730
7 65
7 252
7 2586
7 2654
7 4464
8 3265
9 2351
10 4352
11 4635
12 237
13 3942
14 2972
15 134
15 2810
17 4332
18 409
18 1974
19 3228
19 4283
20 1797
21 4360
22 1017
22 2419
22 4967
23 2690
24 325
25 4374...

input:

2
4982 4401
2 2448
2 2904
3 2868
3 4561
4 94
4 301
4 1354
4 1452
4 1676
4 4079
5 718
5 1350
6 4730
7 65
7 252
7 2586
7 2654
7 4464
8 3265
9 2351
10 4352
11 4635
12 237
13 3942
14 2972
15 134
15 2810
17 4332
18 409
18 1974
19 3228
19 4283
20 1797
21 4360
22 1017
22 2419
22 4967
23 2690
24 325
25 4374...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
459

Test #3:

score: 5
Accepted
time: 2ms = 1ms + 1ms
memory: 1876kb,1904kb

input:

1
2495

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
374 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3827 3489
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
374 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3827 3489
35...

output:

2
4982 4401
2 2448
2 2904
3 2868
3 4561
4 94
4 301
4 1354
4 1452
4 1676
4 4079
5 718
5 1350
6 4730
7 65
7 252
7 2586
7 2654
7 4464
8 3702
10 4352
11 4635
12 237
13 3942
14 2972
15 134
15 2810
17 4332
18 409
18 1974
19 1026
19 3228
19 4283
20 1797
21 4360
22 1017
22 2419
22 4967
23 2690
24 325
25 437...

input:

2
4982 4401
2 2448
2 2904
3 2868
3 4561
4 94
4 301
4 1354
4 1452
4 1676
4 4079
5 718
5 1350
6 4730
7 65
7 252
7 2586
7 2654
7 4464
8 3702
10 4352
11 4635
12 237
13 3942
14 2972
15 134
15 2810
17 4332
18 409
18 1974
19 1026
19 3228
19 4283
20 1797
21 4360
22 1017
22 2419
22 4967
23 2690
24 325
25 437...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
2495

Test #4:

score: 5
Accepted
time: 1ms = 1ms + 0ms
memory: 1872kb,1880kb

input:

3
1560

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
558 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
2158 3847
4249 2436
3801 4923
2920 2449
3827 3489
3...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
558 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
2158 3847
4249 2436
3801 4923
2920 2449
3827 3489
3...

output:

4
4982 2491
1 2444
3 2868
5 1350
6 4730
8 3702
10 4352
13 3608
13 3942
14 333
14 927
14 2972
15 134
15 2810
16 2303
17 4332
18 409
18 4210
19 1026
19 4283
20 436
20 1797
21 2708
25 4374
26 805
26 3786
28 1994
28 3622
29 962
30 952
32 4098
33 97
34 1595
36 1575
36 4677
38 2990
39 4253
39 4826
40 4605...

input:

4
4982 2491
1 2444
3 2868
5 1350
6 4730
8 3702
10 4352
13 3608
13 3942
14 333
14 927
14 2972
15 134
15 2810
16 2303
17 4332
18 409
18 4210
19 1026
19 4283
20 436
20 1797
21 2708
25 4374
26 805
26 3786
28 1994
28 3622
29 962
30 952
32 4098
33 97
34 1595
36 1575
36 4677
38 2990
39 4253
39 4826
40 4605...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1560

Test #5:

score: 5
Accepted
time: 2ms = 1ms + 1ms
memory: 1876kb,1872kb

input:

3
3594

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
558 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
2158 3847
4249 2436
3801 4923
2920 2449
3827 3489
3...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
558 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
2158 3847
4249 2436
3801 4923
2920 2449
3827 3489
3...

output:

4
4982 2491
1 2444
2 2904
3 2868
3 4561
5 718
5 1350
6 4730
8 3265
9 2351
10 4352
13 3608
13 3942
14 333
14 927
14 2972
15 134
15 2810
16 2303
17 4332
18 409
18 4210
19 3228
19 4283
20 436
20 1797
21 2708
25 4374
26 805
26 3786
28 1994
28 3622
29 962
30 952
32 4098
33 97
34 1595
36 1575
36 4677
38 2...

input:

4
4982 2491
1 2444
2 2904
3 2868
3 4561
5 718
5 1350
6 4730
8 3265
9 2351
10 4352
13 3608
13 3942
14 333
14 927
14 2972
15 134
15 2810
16 2303
17 4332
18 409
18 4210
19 3228
19 4283
20 436
20 1797
21 2708
25 4374
26 805
26 3786
28 1994
28 3622
29 962
30 952
32 4098
33 97
34 1595
36 1575
36 4677
38 2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
3594

Test #6:

score: 5
Accepted
time: 2ms = 1ms + 1ms
memory: 1876kb,1876kb

input:

3
1750

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
558 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
2158 3847
4249 2436
3801 4923
2920 2449
3827 3489
3...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
558 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
2158 3847
4249 2436
3801 4923
2920 2449
3827 3489
3...

output:

4
4982 2491
1 2444
2 2904
3 2868
3 4561
5 718
5 1350
6 4730
8 3702
10 4352
13 3608
13 3942
14 333
14 927
14 2972
15 134
15 2810
16 2303
17 4332
18 409
19 1026
19 4283
20 436
20 1797
21 2708
25 4374
26 805
26 3786
28 1994
28 3622
29 962
30 952
32 4098
33 97
34 1595
36 1575
38 2990
39 4253
39 4826
40 ...

input:

4
4982 2491
1 2444
2 2904
3 2868
3 4561
5 718
5 1350
6 4730
8 3702
10 4352
13 3608
13 3942
14 333
14 927
14 2972
15 134
15 2810
16 2303
17 4332
18 409
19 1026
19 4283
20 436
20 1797
21 2708
25 4374
26 805
26 3786
28 1994
28 3622
29 962
30 952
32 4098
33 97
34 1595
36 1575
38 2990
39 4253
39 4826
40 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1750

Test #7:

score: 5
Accepted
time: 2ms = 1ms + 1ms
memory: 1872kb,1880kb

input:

5
4878

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
558 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
2158 3847
4249 2436
3801 4923
2920 2449
3827 3489
3...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
558 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
2158 3847
4249 2436
3801 4923
2920 2449
3827 3489
3...

output:

6
4982 2496
1 2444
2 2448
3 4561
4 1366
5 1350
6 4730
7 252
7 2586
7 2654
7 4464
9 1141
13 3942
14 333
15 134
16 2303
17 4332
18 4210
19 3228
20 436
21 4360
22 2419
23 2690
26 3786
27 873
27 1006
27 1134
28 3622
30 667
32 4098
33 97
34 4845
35 1772
36 3759
37 1372
37 3170
37 4113
39 4253
40 4605
41 ...

input:

6
4982 2496
1 2444
2 2448
3 4561
4 1366
5 1350
6 4730
7 252
7 2586
7 2654
7 4464
9 1141
13 3942
14 333
15 134
16 2303
17 4332
18 4210
19 3228
20 436
21 4360
22 2419
23 2690
26 3786
27 873
27 1006
27 1134
28 3622
30 667
32 4098
33 97
34 4845
35 1772
36 3759
37 1372
37 3170
37 4113
39 4253
40 4605
41 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4878

Test #8:

score: 5
Accepted
time: 1ms = 1ms + 0ms
memory: 1876kb,1876kb

input:

5
1223

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
374 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3827 3489
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
374 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3827 3489
35...

output:

6
4982 2495
2 2448
3 4561
4 94
4 301
4 1452
4 1676
4 4079
4 4082
5 1350
7 252
7 2586
7 2654
7 4464
9 1141
11 4635
13 3942
14 927
14 2972
15 134
16 2303
17 4332
18 409
19 3228
20 436
21 2708
22 2419
23 2690
24 325
25 4374
27 873
27 1006
27 1134
28 3622
30 1484
32 4098
33 97
34 4845
35 1772
36 3759
37...

input:

6
4982 2495
2 2448
3 4561
4 94
4 301
4 1452
4 1676
4 4079
4 4082
5 1350
7 252
7 2586
7 2654
7 4464
9 1141
11 4635
13 3942
14 927
14 2972
15 134
16 2303
17 4332
18 409
19 3228
20 436
21 2708
22 2419
23 2690
24 325
25 4374
27 873
27 1006
27 1134
28 3622
30 1484
32 4098
33 97
34 4845
35 1772
36 3759
37...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1223

Test #9:

score: 5
Accepted
time: 1ms = 1ms + 0ms
memory: 1880kb,1876kb

input:

5
648

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
558 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
2158 3847
4249 2436
3801 4923
2920 2449
3827 3489
3...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
558 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
2158 3847
4249 2436
3801 4923
2920 2449
3827 3489
3...

output:

6
4982 2496
1 2444
3 2868
4 1354
7 65
8 3265
9 2351
10 4352
12 237
13 3608
14 927
14 2972
15 2810
18 409
19 4283
20 1797
22 864
22 1017
22 4967
23 2690
24 325
25 4374
26 3786
27 1376
28 1994
29 962
30 952
31 2112
32 4098
34 1595
35 335
35 363
35 3714
35 4347
36 1575
36 4677
37 1261
38 2990
39 4826
4...

input:

6
4982 2496
1 2444
3 2868
4 1354
7 65
8 3265
9 2351
10 4352
12 237
13 3608
14 927
14 2972
15 2810
18 409
19 4283
20 1797
22 864
22 1017
22 4967
23 2690
24 325
25 4374
26 3786
27 1376
28 1994
29 962
30 952
31 2112
32 4098
34 1595
35 335
35 363
35 3714
35 4347
36 1575
36 4677
37 1261
38 2990
39 4826
4...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
648

Test #10:

score: 5
Accepted
time: 1ms = 1ms + 0ms
memory: 1880kb,1876kb

input:

7
4475

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
374 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3827 3489
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
374 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3827 3489
35...

output:

8
4982 2491
1 2444
2 2904
3 2868
3 4561
5 718
5 1002
6 4730
8 3702
10 4352
11 4635
13 3942
14 333
14 927
14 2972
15 134
15 2810
16 2303
17 4332
18 409
19 1026
19 4283
20 436
20 1797
21 4360
22 4967
25 4374
26 805
27 873
27 1006
27 1134
28 1994
29 962
30 952
30 4159
31 2112
32 4098
33 97
34 1595
37 1...

input:

8
4982 2491
1 2444
2 2904
3 2868
3 4561
5 718
5 1002
6 4730
8 3702
10 4352
11 4635
13 3942
14 333
14 927
14 2972
15 134
15 2810
16 2303
17 4332
18 409
19 1026
19 4283
20 436
20 1797
21 4360
22 4967
25 4374
26 805
27 873
27 1006
27 1134
28 1994
29 962
30 952
30 4159
31 2112
32 4098
33 97
34 1595
37 1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4475

Test #11:

score: 5
Accepted
time: 1ms = 1ms + 0ms
memory: 1880kb,1876kb

input:

7
4240

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
374 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3827 3489
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
374 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3827 3489
35...

output:

8
4982 2491
1 2444
2 2448
3 2868
6 4730
8 3702
10 4352
13 3942
14 333
14 927
14 2972
15 134
16 2303
17 4332
18 409
18 1974
19 1026
19 4283
20 436
21 4360
22 864
22 4967
25 4374
26 805
26 3786
27 873
27 1134
27 1376
28 1994
29 962
30 952
30 4159
31 2112
32 4098
33 97
34 1595
37 1372
37 3170
37 4113
3...

input:

8
4982 2491
1 2444
2 2448
3 2868
6 4730
8 3702
10 4352
13 3942
14 333
14 927
14 2972
15 134
16 2303
17 4332
18 409
18 1974
19 1026
19 4283
20 436
21 4360
22 864
22 4967
25 4374
26 805
26 3786
27 873
27 1134
27 1376
28 1994
29 962
30 952
30 4159
31 2112
32 4098
33 97
34 1595
37 1372
37 3170
37 4113
3...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4240

Test #12:

score: 5
Accepted
time: 1ms = 1ms + 0ms
memory: 1880kb,1876kb

input:

7
1291

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
374 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3827 3489
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
374 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3827 3489
35...

output:

8
4982 2491
1 2444
2 2904
3 2868
3 4561
5 718
5 1350
6 4730
8 3265
9 2351
10 4352
11 4635
13 3942
14 927
14 2972
15 134
16 2303
17 4332
18 409
19 4283
20 436
20 1797
21 2708
22 4967
25 4374
26 805
27 873
27 1006
27 1134
28 1994
28 3622
29 962
30 952
31 2112
32 4098
33 97
34 1595
37 1372
37 3170
37 4...

input:

8
4982 2491
1 2444
2 2904
3 2868
3 4561
5 718
5 1350
6 4730
8 3265
9 2351
10 4352
11 4635
13 3942
14 927
14 2972
15 134
16 2303
17 4332
18 409
19 4283
20 436
20 1797
21 2708
22 4967
25 4374
26 805
27 873
27 1006
27 1134
28 1994
28 3622
29 962
30 952
31 2112
32 4098
33 97
34 1595
37 1372
37 3170
37 4...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1291

Subtask #2:

score: 30
Accepted

Test #13:

score: 30
Accepted
time: 2ms = 1ms + 1ms
memory: 1880kb,1908kb

input:

1
17476204

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
1709 1845
502 3099
4569 3296
3926 2245
222 2866
558 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
2158 3847
4249 2436
3801 4923
2920 2449
3827 3489
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
1709 1845
502 3099
4569 3296
3926 2245
222 2866
558 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
2158 3847
4249 2436
3801 4923
2920 2449
3827 3489
35...

output:

2
4982 4401
2 2448
3 2868
4 94
4 301
4 1354
4 4079
5 1350
5 2652
6 4730
7 65
7 252
7 2586
7 2654
7 4464
8 3265
9 2351
10 4352
11 2134
12 237
13 3608
13 3942
14 2972
15 134
15 2810
17 4332
18 409
18 4210
19 4027
19 4283
20 1797
21 4360
22 864
22 1017
22 2419
23 2690
23 4178
24 325
25 567
25 759
26 80...

input:

2
4982 4401
2 2448
3 2868
4 94
4 301
4 1354
4 4079
5 1350
5 2652
6 4730
7 65
7 252
7 2586
7 2654
7 4464
8 3265
9 2351
10 4352
11 2134
12 237
13 3608
13 3942
14 2972
15 134
15 2810
17 4332
18 409
18 4210
19 4027
19 4283
20 1797
21 4360
22 864
22 1017
22 2419
23 2690
23 4178
24 325
25 567
25 759
26 80...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
17476204

Test #14:

score: 30
Accepted
time: 2ms = 1ms + 1ms
memory: 1876kb,1904kb

input:

1
11926600

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
374 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3744 3489
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
374 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3744 3489
35...

output:

2
4982 4401
2 2448
3 2868
3 3563
4 94
4 301
4 1366
4 1452
4 1676
4 4079
4 4082
5 1350
5 2652
6 4730
7 65
7 252
7 2586
7 4464
8 3265
9 2351
10 4352
11 2134
12 237
13 3942
14 2972
15 134
15 2810
17 4332
17 4415
18 409
18 4210
19 3228
19 4283
20 1797
21 2708
22 864
22 2419
23 2690
24 325
25 3736
25 437...

input:

2
4982 4401
2 2448
3 2868
3 3563
4 94
4 301
4 1366
4 1452
4 1676
4 4079
4 4082
5 1350
5 2652
6 4730
7 65
7 252
7 2586
7 4464
8 3265
9 2351
10 4352
11 2134
12 237
13 3942
14 2972
15 134
15 2810
17 4332
17 4415
18 409
18 4210
19 3228
19 4283
20 1797
21 2708
22 864
22 2419
23 2690
24 325
25 3736
25 437...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
11926600

Test #15:

score: 30
Accepted
time: 2ms = 1ms + 1ms
memory: 1876kb,1908kb

input:

1
16602378

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
374 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3744 3489
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
374 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3744 3489
35...

output:

2
4982 4401
2 2448
2 2904
3 2868
3 3563
3 4561
4 94
4 301
4 1366
4 4079
4 4082
5 718
5 1350
6 4730
7 65
7 252
7 2586
7 4464
8 3265
9 2351
10 4352
11 2134
12 237
13 3942
14 2972
15 134
15 2810
17 4332
17 4415
18 409
18 2046
18 4210
19 3228
19 4283
20 1797
21 2708
22 864
22 2419
22 4967
23 2690
24 325...

input:

2
4982 4401
2 2448
2 2904
3 2868
3 3563
3 4561
4 94
4 301
4 1366
4 4079
4 4082
5 718
5 1350
6 4730
7 65
7 252
7 2586
7 4464
8 3265
9 2351
10 4352
11 2134
12 237
13 3942
14 2972
15 134
15 2810
17 4332
17 4415
18 409
18 2046
18 4210
19 3228
19 4283
20 1797
21 2708
22 864
22 2419
22 4967
23 2690
24 325...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
16602378

Test #16:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 1876kb,1880kb

input:

3
13129243

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
558 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
2158 3847
4249 2436
3801 4923
2920 2449
3744 3489
3...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
558 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
2158 3847
4249 2436
3801 4923
2920 2449
3744 3489
3...

output:

4
4982 2491
1 2444
2 2904
3 2868
3 4561
5 718
5 1002
5 1350
6 4730
8 3702
10 4352
13 3608
13 3942
14 333
14 927
14 2972
15 134
15 2810
16 2303
17 4332
17 4415
18 409
18 2046
18 4210
19 1026
19 4283
20 436
20 1797
21 2708
22 4967
25 567
25 3736
26 805
28 3622
29 962
30 4159
32 4098
33 97
38 651
39 42...

input:

4
4982 2491
1 2444
2 2904
3 2868
3 4561
5 718
5 1002
5 1350
6 4730
8 3702
10 4352
13 3608
13 3942
14 333
14 927
14 2972
15 134
15 2810
16 2303
17 4332
17 4415
18 409
18 2046
18 4210
19 1026
19 4283
20 436
20 1797
21 2708
22 4967
25 567
25 3736
26 805
28 3622
29 962
30 4159
32 4098
33 97
38 651
39 42...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
13129243

Test #17:

score: 30
Accepted
time: 2ms = 1ms + 1ms
memory: 1876kb,1876kb

input:

3
7892141

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
374 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3827 3489
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
374 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3827 3489
35...

output:

4
4982 2491
1 2444
3 2868
5 1350
6 4730
8 3265
9 2351
10 4352
11 4635
14 927
14 2972
15 134
15 2810
16 2303
17 4332
18 409
18 2046
19 3228
19 4283
20 436
20 1797
21 2708
22 4967
25 567
25 3736
26 805
28 3622
29 962
32 4098
33 97
36 1575
36 4677
38 2990
39 4253
40 4605
42 139
45 1555
46 1651
47 2121
...

input:

4
4982 2491
1 2444
3 2868
5 1350
6 4730
8 3265
9 2351
10 4352
11 4635
14 927
14 2972
15 134
15 2810
16 2303
17 4332
18 409
18 2046
19 3228
19 4283
20 436
20 1797
21 2708
22 4967
25 567
25 3736
26 805
28 3622
29 962
32 4098
33 97
36 1575
36 4677
38 2990
39 4253
40 4605
42 139
45 1555
46 1651
47 2121
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
7892141

Test #18:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 1876kb,1880kb

input:

3
21314775

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
1709 1845
502 3099
4569 3296
3926 2245
222 2866
374 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3827 3489
351...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
1709 1845
502 3099
4569 3296
3926 2245
222 2866
374 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3827 3489
351...

output:

4
4982 2491
1 2444
2 2904
3 2868
3 3563
3 4561
5 718
5 1002
5 1350
6 4730
8 3702
10 4352
11 4635
14 333
14 927
14 2972
15 134
15 2810
16 2303
17 4332
18 409
18 2046
19 1026
19 4027
19 4283
20 436
20 1797
21 2708
22 4967
25 759
25 4374
26 805
28 1994
28 3622
29 962
30 4159
32 4098
33 81
34 1595
38 29...

input:

4
4982 2491
1 2444
2 2904
3 2868
3 3563
3 4561
5 718
5 1002
5 1350
6 4730
8 3702
10 4352
11 4635
14 333
14 927
14 2972
15 134
15 2810
16 2303
17 4332
18 409
18 2046
19 1026
19 4027
19 4283
20 436
20 1797
21 2708
22 4967
25 759
25 4374
26 805
28 1994
28 3622
29 962
30 4159
32 4098
33 81
34 1595
38 29...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
21314775

Test #19:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 1880kb,1880kb

input:

5
5559540

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
374 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3827 3489
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
374 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3827 3489
35...

output:

6
4982 2491
3 2868
4 94
4 301
4 1452
4 1676
4 4079
4 4082
5 1350
6 4730
7 65
8 3702
10 4352
12 237
14 927
14 2972
15 2810
16 2303
18 409
18 2046
19 1026
19 4283
20 436
22 864
23 2690
24 325
25 3736
26 805
27 1376
28 3622
29 962
30 4159
31 2112
33 81
35 335
35 363
35 1854
35 3714
35 4347
36 1575
36 3...

input:

6
4982 2491
3 2868
4 94
4 301
4 1452
4 1676
4 4079
4 4082
5 1350
6 4730
7 65
8 3702
10 4352
12 237
14 927
14 2972
15 2810
16 2303
18 409
18 2046
19 1026
19 4283
20 436
22 864
23 2690
24 325
25 3736
26 805
27 1376
28 3622
29 962
30 4159
31 2112
33 81
35 335
35 363
35 1854
35 3714
35 4347
36 1575
36 3...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
5559540

Test #20:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 1876kb,1876kb

input:

5
9424319

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
374 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3744 3489
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
374 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3744 3489
35...

output:

6
4982 2492
2 2904
3 2868
4 94
4 301
4 4079
4 4082
5 718
5 2652
7 65
12 237
14 927
14 2972
15 2810
17 4332
18 409
19 3228
20 1797
22 1017
23 4178
25 567
26 805
27 1376
29 962
30 1484
31 2112
32 4098
33 81
35 335
35 363
35 3714
35 4347
36 332
36 1575
36 4034
36 4677
37 1261
41 4418
42 139
44 2308
46 ...

input:

6
4982 2492
2 2904
3 2868
4 94
4 301
4 4079
4 4082
5 718
5 2652
7 65
12 237
14 927
14 2972
15 2810
17 4332
18 409
19 3228
20 1797
22 1017
23 4178
25 567
26 805
27 1376
29 962
30 1484
31 2112
32 4098
33 81
35 335
35 363
35 3714
35 4347
36 332
36 1575
36 4034
36 4677
37 1261
41 4418
42 139
44 2308
46 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
9424319

Test #21:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 1876kb,1876kb

input:

5
10955780

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
374 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3744 3489
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
374 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3744 3489
35...

output:

6
4982 2531
1 2444
2 2448
3 2868
4 1354
5 1350
6 4730
7 65
9 2351
12 237
14 333
15 134
17 4415
18 4210
19 4283
20 1797
22 864
22 1017
22 4967
23 4178
24 325
25 4374
26 805
27 1376
28 1994
29 962
30 952
31 2112
32 4098
33 81
34 1595
35 335
35 363
35 1854
35 3714
35 4347
36 332
36 1575
36 4677
37 2416...

input:

6
4982 2531
1 2444
2 2448
3 2868
4 1354
5 1350
6 4730
7 65
9 2351
12 237
14 333
15 134
17 4415
18 4210
19 4283
20 1797
22 864
22 1017
22 4967
23 4178
24 325
25 4374
26 805
27 1376
28 1994
29 962
30 952
31 2112
32 4098
33 81
34 1595
35 335
35 363
35 1854
35 3714
35 4347
36 332
36 1575
36 4677
37 2416...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
10955780

Test #22:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 1876kb,1880kb

input:

7
19938721

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
1709 1845
502 3099
4569 3296
3926 2245
222 2866
374 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3827 3489
351...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
1709 1845
502 3099
4569 3296
3926 2245
222 2866
374 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3827 3489
351...

output:

8
4982 2491
1 2444
2 2448
3 2868
5 1350
6 4730
7 4464
8 3265
9 2351
10 4352
11 4635
14 927
14 2972
16 2303
17 4332
18 409
19 4027
19 4283
20 436
21 2708
22 4967
23 2690
25 759
26 805
27 873
27 1134
28 1994
29 962
30 952
30 4159
31 2112
32 4098
33 97
34 1595
35 1854
35 3714
37 1372
37 3170
37 4113
38...

input:

8
4982 2491
1 2444
2 2448
3 2868
5 1350
6 4730
7 4464
8 3265
9 2351
10 4352
11 4635
14 927
14 2972
16 2303
17 4332
18 409
19 4027
19 4283
20 436
21 2708
22 4967
23 2690
25 759
26 805
27 873
27 1134
28 1994
29 962
30 952
30 4159
31 2112
32 4098
33 97
34 1595
35 1854
35 3714
37 1372
37 3170
37 4113
38...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
19938721

Test #23:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 1876kb,1876kb

input:

7
5129508

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
374 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3827 3489
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
374 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3827 3489
35...

output:

8
4982 2491
1 2444
2 2448
3 2868
5 1350
6 4730
8 3265
9 2351
10 4352
11 2134
13 3942
14 927
14 2972
15 134
16 2303
17 4332
18 409
18 2046
18 4210
19 3228
19 4283
20 436
20 1797
21 2708
22 4967
26 805
26 3786
27 873
27 1376
28 3622
29 962
32 4098
33 81
37 1372
37 3170
37 4113
38 2990
39 4253
40 4605
...

input:

8
4982 2491
1 2444
2 2448
3 2868
5 1350
6 4730
8 3265
9 2351
10 4352
11 2134
13 3942
14 927
14 2972
15 134
16 2303
17 4332
18 409
18 2046
18 4210
19 3228
19 4283
20 436
20 1797
21 2708
22 4967
26 805
26 3786
27 873
27 1376
28 3622
29 962
32 4098
33 81
37 1372
37 3170
37 4113
38 2990
39 4253
40 4605
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
5129508

Test #24:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 1880kb,1880kb

input:

7
15332941

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
558 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
2158 3847
4249 2436
3801 4923
2920 2449
3744 3489
3...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
558 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
2158 3847
4249 2436
3801 4923
2920 2449
3744 3489
3...

output:

8
4982 2491
1 2444
2 2448
3 3563
5 1002
6 4730
7 252
7 4464
8 3265
9 2351
10 4352
13 3608
14 927
14 2972
15 134
16 2303
17 4415
18 409
18 2046
18 4210
19 4283
20 436
20 1797
21 2708
22 2419
26 805
28 3622
29 962
30 4159
32 4098
33 97
37 3170
37 4113
38 651
40 4605
42 139
43 1116
45 755
46 2191
47 21...

input:

8
4982 2491
1 2444
2 2448
3 3563
5 1002
6 4730
7 252
7 4464
8 3265
9 2351
10 4352
13 3608
14 927
14 2972
15 134
16 2303
17 4415
18 409
18 2046
18 4210
19 4283
20 436
20 1797
21 2708
22 2419
26 805
28 3622
29 962
30 4159
32 4098
33 97
37 3170
37 4113
38 651
40 4605
42 139
43 1116
45 755
46 2191
47 21...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
15332941

Subtask #3:

score: 65
Accepted

Test #25:

score: 65
Accepted
time: 2ms = 1ms + 1ms
memory: 1872kb,1904kb

input:

1
355365355024496523

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
1709 1845
502 3099
1897 3296
3926 2245
222 2866
558 665
4104 4100
3251 3855
4098 32
1285 3316
3299 754
804 3034
2158 3847
4249 2436
3801 4923
2920 2449
3744 3489
26...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
1709 1845
502 3099
1897 3296
3926 2245
222 2866
558 665
4104 4100
3251 3855
4098 32
1285 3316
3299 754
804 3034
2158 3847
4249 2436
3801 4923
2920 2449
3744 3489
26...

output:

2
4982 4401
2 235
2 2904
3 3563
3 3910
3 4561
4 126
4 1366
4 1452
4 1676
4 4079
4 4082
5 718
5 1350
6 2668
7 172
7 252
7 2586
7 4464
8 3265
9 2351
10 2142
11 4635
12 237
13 3199
13 3608
14 2972
15 134
15 2810
17 4332
17 4415
18 409
18 1974
19 4027
19 4283
20 1069
21 2708
22 2419
22 4967
23 3323
23 4...

input:

2
4982 4401
2 235
2 2904
3 3563
3 3910
3 4561
4 126
4 1366
4 1452
4 1676
4 4079
4 4082
5 718
5 1350
6 2668
7 172
7 252
7 2586
7 4464
8 3265
9 2351
10 2142
11 4635
12 237
13 3199
13 3608
14 2972
15 134
15 2810
17 4332
17 4415
18 409
18 1974
19 4027
19 4283
20 1069
21 2708
22 2419
22 4967
23 3323
23 4...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
355365355024496523

Test #26:

score: 65
Accepted
time: 2ms = 1ms + 1ms
memory: 1876kb,1884kb

input:

1
727827999106414164

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
4383 1845
458 3099
4569 3296
3926 2245
2563 2866
558 665
4104 4100
3036 3855
4615 32
1285 3316
3299 754
3242 3034
2158 3847
4821 2436
3801 4923
2920 2449
3827 3489
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
4383 1845
458 3099
4569 3296
3926 2245
2563 2866
558 665
4104 4100
3036 3855
4615 32
1285 3316
3299 754
3242 3034
2158 3847
4821 2436
3801 4923
2920 2449
3827 3489
...

output:

2
4982 3764
1 654
2 2448
3 2868
4 94
4 126
4 301
4 1366
4 1676
4 1973
4 4082
5 683
5 1002
5 1952
6 4730
8 3702
9 1141
10 4352
11 2134
12 712
13 3942
14 2972
15 134
15 3849
16 2399
18 2046
18 4210
19 1026
19 4283
20 1069
22 864
22 4967
23 2690
23 4178
24 325
25 4374
26 3786
27 873
27 1006
27 1134
27 ...

input:

2
4982 3764
1 654
2 2448
3 2868
4 94
4 126
4 301
4 1366
4 1676
4 1973
4 4082
5 683
5 1002
5 1952
6 4730
8 3702
9 1141
10 4352
11 2134
12 712
13 3942
14 2972
15 134
15 3849
16 2399
18 2046
18 4210
19 1026
19 4283
20 1069
22 864
22 4967
23 2690
23 4178
24 325
25 4374
26 3786
27 873
27 1006
27 1134
27 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
727827999106414164

Test #27:

score: 65
Accepted
time: 2ms = 1ms + 1ms
memory: 1880kb,1892kb

input:

1
656410143989222955

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
4383 1845
458 3099
4569 3296
4714 2245
222 2866
558 665
4104 4100
3251 3855
4098 32
2870 3316
3299 754
804 3034
2158 3847
4821 2436
3801 4923
2308 2449
3827 3489
26...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
4383 1845
458 3099
4569 3296
4714 2245
222 2866
558 665
4104 4100
3251 3855
4098 32
2870 3316
3299 754
804 3034
2158 3847
4821 2436
3801 4923
2308 2449
3827 3489
26...

output:

2
4982 3764
1 2444
2 2448
2 2904
3 3910
3 4561
4 94
4 126
4 301
4 1354
4 1676
4 4079
4 4082
5 718
5 1952
5 2652
6 4730
7 252
7 2260
7 2586
8 3265
9 2351
9 4965
10 4352
11 4635
12 712
13 3199
14 927
14 2972
15 134
15 2810
16 2303
18 2046
18 4210
19 4283
20 1069
22 1017
23 2690
24 325
25 759
25 3736
2...

input:

2
4982 3764
1 2444
2 2448
2 2904
3 3910
3 4561
4 94
4 126
4 301
4 1354
4 1676
4 4079
4 4082
5 718
5 1952
5 2652
6 4730
7 252
7 2260
7 2586
8 3265
9 2351
9 4965
10 4352
11 4635
12 712
13 3199
14 927
14 2972
15 134
15 2810
16 2303
18 2046
18 4210
19 4283
20 1069
22 1017
23 2690
24 325
25 759
25 3736
2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
656410143989222955

Test #28:

score: 65
Accepted
time: 2ms = 1ms + 1ms
memory: 1876kb,1888kb

input:

1
410366615149657534

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
1709 1845
458 3099
1897 3296
4714 2245
222 2866
374 665
2925 4100
3036 3855
4098 32
2870 3316
380 754
3242 3034
793 3847
4249 2436
3390 4923
2308 2449
3744 3489
351...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
1709 1845
458 3099
1897 3296
4714 2245
222 2866
374 665
2925 4100
3036 3855
4098 32
2870 3316
380 754
3242 3034
793 3847
4249 2436
3390 4923
2308 2449
3744 3489
351...

output:

2
4982 3764
1 2444
2 235
2 2469
2 2904
3 659
3 2868
3 4561
4 301
4 1366
4 4079
4 4082
5 718
5 1002
5 1350
5 2652
6 2668
7 252
7 2586
8 3702
9 1141
10 4352
11 2134
12 237
13 3199
15 134
15 3849
16 2303
18 1974
19 1026
19 4283
20 436
20 1797
22 864
23 3323
24 2417
25 567
25 759
26 1468
26 3786
27 1006...

input:

2
4982 3764
1 2444
2 235
2 2469
2 2904
3 659
3 2868
3 4561
4 301
4 1366
4 4079
4 4082
5 718
5 1002
5 1350
5 2652
6 2668
7 252
7 2586
8 3702
9 1141
10 4352
11 2134
12 237
13 3199
15 134
15 3849
16 2303
18 1974
19 1026
19 4283
20 436
20 1797
22 864
23 3323
24 2417
25 567
25 759
26 1468
26 3786
27 1006...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
410366615149657534

Test #29:

score: 65
Accepted
time: 2ms = 1ms + 1ms
memory: 1876kb,1888kb

input:

1
298090682780948428

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
4383 1845
502 3099
1897 3296
3926 2245
2563 2866
558 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
3242 3034
2158 3847
4821 2436
3801 4923
2920 2449
3827 3489
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
4383 1845
502 3099
1897 3296
3926 2245
2563 2866
558 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
3242 3034
2158 3847
4821 2436
3801 4923
2920 2449
3827 3489
...

output:

2
4982 3764
1 2444
2 235
3 2868
3 3563
4 301
4 1366
4 1676
4 4082
5 1002
5 1350
6 4730
7 252
7 2586
7 4464
8 3265
9 1141
9 2351
10 4352
11 2134
12 712
13 3199
14 927
14 2972
15 2810
16 2303
18 1974
19 4283
20 436
20 1069
22 864
22 4967
23 3323
23 4178
24 325
25 4374
26 1468
26 3786
27 1006
27 1134
2...

input:

2
4982 3764
1 2444
2 235
3 2868
3 3563
4 301
4 1366
4 1676
4 4082
5 1002
5 1350
6 4730
7 252
7 2586
7 4464
8 3265
9 1141
9 2351
10 4352
11 2134
12 712
13 3199
14 927
14 2972
15 2810
16 2303
18 1974
19 4283
20 436
20 1069
22 864
22 4967
23 3323
23 4178
24 325
25 4374
26 1468
26 3786
27 1006
27 1134
2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
298090682780948428

Test #30:

score: 65
Accepted
time: 2ms = 1ms + 1ms
memory: 1876kb,1876kb

input:

3
969441916331132577

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
1709 1845
458 3099
1897 3296
3926 2245
222 2866
558 665
2925 4100
3251 3855
4098 32
2870 3316
380 754
804 3034
2158 3847
4249 2436
3801 4923
2920 2449
3827 3489
262...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
1709 1845
458 3099
1897 3296
3926 2245
222 2866
558 665
2925 4100
3251 3855
4098 32
2870 3316
380 754
804 3034
2158 3847
4249 2436
3801 4923
2920 2449
3827 3489
262...

output:

4
4982 2491
1 2444
2 235
3 659
4 1354
4 4079
4 4082
6 4730
8 3265
9 2351
10 2142
11 4635
12 237
13 3608
14 927
14 2972
15 2810
16 2303
17 4332
18 2046
19 4027
19 4283
20 436
20 1797
21 2708
22 2419
23 4178
25 567
25 759
26 1468
27 1006
27 1134
27 1376
28 1994
28 3622
29 962
32 4098
33 97
34 1595
37 ...

input:

4
4982 2491
1 2444
2 235
3 659
4 1354
4 4079
4 4082
6 4730
8 3265
9 2351
10 2142
11 4635
12 237
13 3608
14 927
14 2972
15 2810
16 2303
17 4332
18 2046
19 4027
19 4283
20 436
20 1797
21 2708
22 2419
23 4178
25 567
25 759
26 1468
27 1006
27 1134
27 1376
28 1994
28 3622
29 962
32 4098
33 97
34 1595
37 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
969441916331132577

Test #31:

score: 65
Accepted
time: 0ms = 0ms + 0ms
memory: 1876kb,1876kb

input:

3
929489812741933634

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
4383 1845
502 3099
1897 3296
3926 2245
2563 2866
558 665
2925 4100
3251 3855
4098 32
1285 3316
380 754
804 3034
2158 3847
4821 2436
3801 4923
2920 2449
3744 3489
26...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
4383 1845
502 3099
1897 3296
3926 2245
2563 2866
558 665
2925 4100
3251 3855
4098 32
1285 3316
380 754
804 3034
2158 3847
4821 2436
3801 4923
2920 2449
3744 3489
26...

output:

4
4982 2491
1 2444
2 235
2 2904
5 718
5 1952
5 2652
6 2668
8 3265
9 2351
10 2142
11 2134
13 3199
13 3608
14 927
14 2972
15 2810
16 2303
17 4332
17 4415
18 2046
18 4210
19 3228
20 436
20 1797
21 4360
22 864
23 4178
25 3736
25 4374
26 3586
26 3786
27 1860
27 3175
28 3622
29 962
32 4098
33 97
37 1261
3...

input:

4
4982 2491
1 2444
2 235
2 2904
5 718
5 1952
5 2652
6 2668
8 3265
9 2351
10 2142
11 2134
13 3199
13 3608
14 927
14 2972
15 2810
16 2303
17 4332
17 4415
18 2046
18 4210
19 3228
20 436
20 1797
21 4360
22 864
23 4178
25 3736
25 4374
26 3586
26 3786
27 1860
27 3175
28 3622
29 962
32 4098
33 97
37 1261
3...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
929489812741933634

Test #32:

score: 65
Accepted
time: 2ms = 1ms + 1ms
memory: 1880kb,1876kb

input:

3
144032041325838295

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
1709 1845
458 3099
1897 3296
3926 2245
222 2866
558 665
2925 4100
3251 3855
4098 32
2870 3316
380 754
3242 3034
2158 3847
4249 2436
3801 4923
2920 2449
3744 3489
26...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
1709 1845
458 3099
1897 3296
3926 2245
222 2866
558 665
2925 4100
3251 3855
4098 32
2870 3316
380 754
3242 3034
2158 3847
4249 2436
3801 4923
2920 2449
3744 3489
26...

output:

4
4982 2491
1 2444
2 2469
2 2904
3 659
3 2868
3 4561
5 718
5 1002
5 1350
6 2668
8 3702
10 2142
11 4635
13 3199
13 3608
14 927
15 134
15 2810
16 2303
17 4332
17 4415
18 1974
19 1026
20 1797
21 2708
22 4967
25 759
25 4374
26 1468
26 3586
27 873
27 1134
27 1860
28 1994
28 3622
29 3963
30 952
30 4159
31...

input:

4
4982 2491
1 2444
2 2469
2 2904
3 659
3 2868
3 4561
5 718
5 1002
5 1350
6 2668
8 3702
10 2142
11 4635
13 3199
13 3608
14 927
15 134
15 2810
16 2303
17 4332
17 4415
18 1974
19 1026
20 1797
21 2708
22 4967
25 759
25 4374
26 1468
26 3586
27 873
27 1134
27 1860
28 1994
28 3622
29 3963
30 952
30 4159
31...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
144032041325838295

Test #33:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 1876kb,1880kb

input:

3
832110946250826180

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
4383 1845
502 3099
4569 3296
3926 2245
2563 2866
374 665
4104 4100
3036 3855
4615 32
2870 3316
3299 754
804 3034
793 3847
4821 2436
3390 4923
2920 2449
3744 3489
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
4383 1845
502 3099
4569 3296
3926 2245
2563 2866
374 665
4104 4100
3036 3855
4615 32
2870 3316
3299 754
804 3034
793 3847
4821 2436
3390 4923
2920 2449
3744 3489
35...

output:

4
4982 2491
1 654
2 2448
2 2469
5 683
5 1952
6 2668
8 3265
9 2351
9 4965
10 4352
11 2134
13 3942
14 3678
15 134
16 2399
17 4332
17 4415
18 409
18 1974
18 2046
19 4283
20 1797
21 4360
22 864
22 1017
22 1027
23 4178
25 567
26 1468
26 3586
26 3786
27 873
27 1006
27 1860
28 1994
28 3412
29 962
31 1805
3...

input:

4
4982 2491
1 654
2 2448
2 2469
5 683
5 1952
6 2668
8 3265
9 2351
9 4965
10 4352
11 2134
13 3942
14 3678
15 134
16 2399
17 4332
17 4415
18 409
18 1974
18 2046
19 4283
20 1797
21 4360
22 864
22 1017
22 1027
23 4178
25 567
26 1468
26 3586
26 3786
27 873
27 1006
27 1860
28 1994
28 3412
29 962
31 1805
3...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
832110946250826180

Test #34:

score: 65
Accepted
time: 2ms = 1ms + 1ms
memory: 1876kb,1876kb

input:

3
85728715707691821

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
1709 1845
458 3099
1897 3296
3926 2245
2563 2866
558 665
4104 4100
3036 3855
4615 32
2870 3316
3299 754
804 3034
2158 3847
4249 2436
3801 4923
2920 2449
3744 3489
3...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
1709 1845
458 3099
1897 3296
3926 2245
2563 2866
558 665
4104 4100
3036 3855
4615 32
2870 3316
3299 754
804 3034
2158 3847
4249 2436
3801 4923
2920 2449
3744 3489
3...

output:

4
4982 2491
1 654
3 2868
4 4079
6 4730
7 252
7 2654
8 3265
9 2351
10 4352
13 3199
13 3608
14 333
14 927
14 2972
15 2810
16 2303
17 161
17 4415
18 409
18 2046
18 4210
20 436
20 1069
21 4360
23 4178
25 567
26 1468
27 873
27 1134
27 1376
28 1994
28 3622
29 962
30 4159
30 4549
32 4615
33 81
34 1595
37 2...

input:

4
4982 2491
1 654
3 2868
4 4079
6 4730
7 252
7 2654
8 3265
9 2351
10 4352
13 3199
13 3608
14 333
14 927
14 2972
15 2810
16 2303
17 161
17 4415
18 409
18 2046
18 4210
20 436
20 1069
21 4360
23 4178
25 567
26 1468
27 873
27 1134
27 1376
28 1994
28 3622
29 962
30 4159
30 4549
32 4615
33 81
34 1595
37 2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
85728715707691821

Test #35:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 1876kb,1876kb

input:

5
777434612360931036

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
1709 1845
502 3099
4569 3296
3926 2245
222 2866
558 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
2158 3847
4249 2436
3801 4923
2920 2449
3744 3489
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
1709 1845
502 3099
4569 3296
3926 2245
222 2866
558 665
4104 4100
3036 3855
4098 32
1285 3316
3299 754
804 3034
2158 3847
4249 2436
3801 4923
2920 2449
3744 3489
35...

output:

6
4982 2516
1 2444
2 2469
3 3563
4 1354
5 2652
7 2260
7 2586
7 4464
8 3702
9 4965
10 2142
11 2134
12 237
13 3942
14 927
15 2810
16 2399
17 4415
18 1974
19 1026
19 4283
22 864
22 1017
23 2690
25 567
26 3786
27 1860
28 3622
29 962
31 1805
32 4098
35 179
35 335
35 1358
35 1725
35 3714
35 4347
36 4677
3...

input:

6
4982 2516
1 2444
2 2469
3 3563
4 1354
5 2652
7 2260
7 2586
7 4464
8 3702
9 4965
10 2142
11 2134
12 237
13 3942
14 927
15 2810
16 2399
17 4415
18 1974
19 1026
19 4283
22 864
22 1017
23 2690
25 567
26 3786
27 1860
28 3622
29 962
31 1805
32 4098
35 179
35 335
35 1358
35 1725
35 3714
35 4347
36 4677
3...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
777434612360931036

Test #36:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 1880kb,1880kb

input:

5
705262511549880222

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
4383 1845
502 3099
4569 3296
4714 2245
2563 2866
558 665
4104 4100
3036 3855
4098 32
2870 3316
3299 754
3242 3034
2158 3847
4821 2436
3801 4923
2308 2449
3827 3489
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
4383 1845
502 3099
4569 3296
4714 2245
2563 2866
558 665
4104 4100
3036 3855
4098 32
2870 3316
3299 754
3242 3034
2158 3847
4821 2436
3801 4923
2308 2449
3827 3489
...

output:

6
4982 2550
2 2904
3 4561
4 94
4 126
4 301
4 1452
4 1676
4 4082
5 718
5 1002
5 2652
7 65
9 1141
11 2134
13 3199
14 927
14 2972
15 134
18 1974
19 3228
21 2708
22 864
23 2690
24 325
26 3786
27 873
27 1134
28 1994
29 3963
30 667
31 2112
32 4098
33 81
34 2492
35 179
35 363
35 3714
35 4347
36 3759
37 126...

input:

6
4982 2550
2 2904
3 4561
4 94
4 126
4 301
4 1452
4 1676
4 4082
5 718
5 1002
5 2652
7 65
9 1141
11 2134
13 3199
14 927
14 2972
15 134
18 1974
19 3228
21 2708
22 864
23 2690
24 325
26 3786
27 873
27 1134
28 1994
29 3963
30 667
31 2112
32 4098
33 81
34 2492
35 179
35 363
35 3714
35 4347
36 3759
37 126...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
705262511549880222

Test #37:

score: 65
Accepted
time: 2ms = 1ms + 1ms
memory: 1876kb,1876kb

input:

5
510318082834167951

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
4383 1845
458 3099
4569 3296
3926 2245
222 2866
374 665
4104 4100
3036 3855
4615 32
2870 3316
3299 754
3242 3034
793 3847
4821 2436
3390 4923
2920 2449
3744 3489
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
4383 1845
458 3099
4569 3296
3926 2245
222 2866
374 665
4104 4100
3036 3855
4615 32
2870 3316
3299 754
3242 3034
793 3847
4821 2436
3390 4923
2920 2449
3744 3489
35...

output:

6
4982 2513
1 654
2 2469
2 2904
3 3910
4 94
4 301
4 1973
5 1350
7 65
9 1141
11 4635
12 712
13 3942
14 3678
15 134
17 4415
18 1974
19 4283
20 436
21 4360
22 1027
24 2417
25 759
25 3736
27 1006
27 3175
28 3622
30 4159
30 4549
32 4615
34 4845
35 179
35 335
35 1358
35 1725
35 3714
36 1575
36 3323
36 347...

input:

6
4982 2513
1 654
2 2469
2 2904
3 3910
4 94
4 301
4 1973
5 1350
7 65
9 1141
11 4635
12 712
13 3942
14 3678
15 134
17 4415
18 1974
19 4283
20 436
21 4360
22 1027
24 2417
25 759
25 3736
27 1006
27 3175
28 3622
30 4159
30 4549
32 4615
34 4845
35 179
35 335
35 1358
35 1725
35 3714
36 1575
36 3323
36 347...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
510318082834167951

Test #38:

score: 65
Accepted
time: 2ms = 1ms + 1ms
memory: 1872kb,1876kb

input:

5
914858813253258744

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
4383 1845
458 3099
1897 3296
4714 2245
222 2866
374 665
2925 4100
3251 3855
4615 32
1285 3316
380 754
804 3034
793 3847
4821 2436
3390 4923
2308 2449
3744 3489
2626...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
4383 1845
458 3099
1897 3296
4714 2245
222 2866
374 665
2925 4100
3251 3855
4615 32
1285 3316
380 754
804 3034
793 3847
4821 2436
3390 4923
2308 2449
3744 3489
2626...

output:

6
4982 2532
1 654
3 3910
4 4079
4 4082
5 683
5 2652
7 252
7 2260
7 2654
8 3702
9 4965
12 712
14 333
15 134
17 161
19 1026
20 1797
22 2419
23 2690
24 325
25 759
26 3586
28 1994
30 1484
31 2112
32 4615
33 97
34 1595
35 2565
36 352
37 1261
38 3116
41 190
42 4770
43 1546
44 1045
44 1699
44 2391
45 755
4...

input:

6
4982 2532
1 654
3 3910
4 4079
4 4082
5 683
5 2652
7 252
7 2260
7 2654
8 3702
9 4965
12 712
14 333
15 134
17 161
19 1026
20 1797
22 2419
23 2690
24 325
25 759
26 3586
28 1994
30 1484
31 2112
32 4615
33 97
34 1595
35 2565
36 352
37 1261
38 3116
41 190
42 4770
43 1546
44 1045
44 1699
44 2391
45 755
4...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
914858813253258744

Test #39:

score: 65
Accepted
time: 2ms = 1ms + 1ms
memory: 1880kb,1876kb

input:

5
659635316746638238

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
1709 1845
502 3099
1897 3296
4714 2245
222 2866
558 665
2925 4100
3251 3855
4615 32
2870 3316
380 754
3242 3034
2158 3847
4249 2436
3801 4923
2308 2449
3744 3489
26...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
1709 1845
502 3099
1897 3296
4714 2245
222 2866
558 665
2925 4100
3251 3855
4615 32
2870 3316
380 754
3242 3034
2158 3847
4249 2436
3801 4923
2308 2449
3744 3489
26...

output:

6
4982 2497
1 654
2 2904
3 659
3 4561
4 1366
5 683
5 718
5 1002
6 4730
7 252
7 2260
7 2654
7 4464
9 1141
11 2134
12 237
13 3608
14 333
15 3849
16 2303
17 4332
18 1974
19 4027
20 1069
21 4360
22 2419
25 759
25 3736
26 805
27 1376
28 3412
30 4159
31 2112
32 4615
35 2565
36 348
36 1575
36 1582
36 3323
...

input:

6
4982 2497
1 654
2 2904
3 659
3 4561
4 1366
5 683
5 718
5 1002
6 4730
7 252
7 2260
7 2654
7 4464
9 1141
11 2134
12 237
13 3608
14 333
15 3849
16 2303
17 4332
18 1974
19 4027
20 1069
21 4360
22 2419
25 759
25 3736
26 805
27 1376
28 3412
30 4159
31 2112
32 4615
35 2565
36 348
36 1575
36 1582
36 3323
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
659635316746638238

Test #40:

score: 65
Accepted
time: 2ms = 1ms + 1ms
memory: 1876kb,1880kb

input:

7
858490260563149759

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
4383 1845
502 3099
1897 3296
4714 2245
222 2866
558 665
2925 4100
3251 3855
4615 32
2870 3316
380 754
3242 3034
2158 3847
4821 2436
3801 4923
2308 2449
3744 3489
26...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
4383 1845
502 3099
1897 3296
4714 2245
222 2866
558 665
2925 4100
3251 3855
4615 32
2870 3316
380 754
3242 3034
2158 3847
4821 2436
3801 4923
2308 2449
3744 3489
26...

output:

8
4982 2491
1 654
2 2469
2 2904
3 659
3 3563
3 4561
5 683
5 718
6 2668
7 4464
8 3702
10 2142
11 4635
13 3199
13 3608
14 3678
15 3849
16 2399
17 4332
17 4415
19 1026
19 4027
20 1797
21 4360
22 1017
23 4178
24 2417
25 567
25 759
25 3736
26 1468
26 3586
27 873
27 1860
27 3175
28 3412
29 3963
31 1805
32...

input:

8
4982 2491
1 654
2 2469
2 2904
3 659
3 3563
3 4561
5 683
5 718
6 2668
7 4464
8 3702
10 2142
11 4635
13 3199
13 3608
14 3678
15 3849
16 2399
17 4332
17 4415
19 1026
19 4027
20 1797
21 4360
22 1017
23 4178
24 2417
25 567
25 759
25 3736
26 1468
26 3586
27 873
27 1860
27 3175
28 3412
29 3963
31 1805
32...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
858490260563149759

Test #41:

score: 65
Accepted
time: 2ms = 1ms + 1ms
memory: 1876kb,1876kb

input:

7
860058643727731209

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
4383 1845
502 3099
1897 3296
4714 2245
222 2866
558 665
4104 4100
3036 3855
4098 32
2870 3316
3299 754
3242 3034
2158 3847
4821 2436
3801 4923
2308 2449
3827 3489
3...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
4383 1845
502 3099
1897 3296
4714 2245
222 2866
558 665
4104 4100
3036 3855
4098 32
2870 3316
3299 754
3242 3034
2158 3847
4821 2436
3801 4923
2308 2449
3827 3489
3...

output:

8
4982 2491
1 2444
2 2448
3 3563
3 3910
5 1952
6 2668
7 2260
7 2586
7 4464
8 3265
9 2351
10 2142
11 4635
13 3608
14 927
14 2972
15 2810
16 2399
17 4332
18 409
18 2046
18 4210
19 4027
19 4283
20 1069
21 4360
22 4967
24 325
25 759
25 3736
26 1468
26 3586
27 873
27 3175
28 3622
29 3963
31 1805
32 4098
...

input:

8
4982 2491
1 2444
2 2448
3 3563
3 3910
5 1952
6 2668
7 2260
7 2586
7 4464
8 3265
9 2351
10 2142
11 4635
13 3608
14 927
14 2972
15 2810
16 2399
17 4332
18 409
18 2046
18 4210
19 4027
19 4283
20 1069
21 4360
22 4967
24 325
25 759
25 3736
26 1468
26 3586
27 873
27 3175
28 3622
29 3963
31 1805
32 4098
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
860058643727731209

Test #42:

score: 65
Accepted
time: 2ms = 1ms + 1ms
memory: 1876kb,1880kb

input:

7
718861404514377808

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
1709 1845
458 3099
1897 3296
4714 2245
2563 2866
374 665
2925 4100
3036 3855
4098 32
2870 3316
380 754
3242 3034
793 3847
4249 2436
3390 4923
2308 2449
3744 3489
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
1709 1845
458 3099
1897 3296
4714 2245
2563 2866
374 665
2925 4100
3036 3855
4098 32
2870 3316
380 754
3242 3034
793 3847
4249 2436
3390 4923
2308 2449
3744 3489
35...

output:

8
4982 2491
1 2444
3 659
5 1952
6 2668
7 252
7 2586
8 3702
10 2142
11 2134
12 237
13 3199
14 333
14 2972
16 2303
17 4332
17 4415
18 2046
19 1026
19 4283
20 1069
21 4360
22 4967
23 2690
25 3736
26 3786
27 873
27 3175
28 3412
29 3963
31 2112
32 4098
33 97
37 1372
38 3116
39 1250
40 4605
41 190
42 139
...

input:

8
4982 2491
1 2444
3 659
5 1952
6 2668
7 252
7 2586
8 3702
10 2142
11 2134
12 237
13 3199
14 333
14 2972
16 2303
17 4332
17 4415
18 2046
19 1026
19 4283
20 1069
21 4360
22 4967
23 2690
25 3736
26 3786
27 873
27 3175
28 3412
29 3963
31 2112
32 4098
33 97
37 1372
38 3116
39 1250
40 4605
41 190
42 139
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
718861404514377808

Test #43:

score: 65
Accepted
time: 1ms = 0ms + 1ms
memory: 1880kb,1876kb

input:

7
659192688464047828

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
1709 1845
502 3099
1897 3296
4714 2245
2563 2866
558 665
2925 4100
3251 3855
4098 32
2870 3316
380 754
3242 3034
2158 3847
4249 2436
3801 4923
2308 2449
3827 3489
2...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
1709 1845
502 3099
1897 3296
4714 2245
2563 2866
558 665
2925 4100
3251 3855
4098 32
2870 3316
380 754
3242 3034
2158 3847
4249 2436
3801 4923
2308 2449
3827 3489
2...

output:

8
4982 2491
1 2444
2 2469
3 659
4 301
4 4082
5 1952
6 4730
8 3702
9 1141
10 4352
13 3199
13 3608
14 3678
15 134
16 2303
17 4332
19 1026
19 3228
19 4283
20 436
21 2708
22 4967
23 3323
24 2417
25 567
26 1468
26 3786
28 1994
29 3963
31 2112
32 4098
33 81
34 1595
37 1372
37 3170
37 4113
38 3116
39 4826
...

input:

8
4982 2491
1 2444
2 2469
3 659
4 301
4 4082
5 1952
6 4730
8 3702
9 1141
10 4352
13 3199
13 3608
14 3678
15 134
16 2303
17 4332
19 1026
19 3228
19 4283
20 436
21 2708
22 4967
23 3323
24 2417
25 567
26 1468
26 3786
28 1994
29 3963
31 2112
32 4098
33 81
34 1595
37 1372
37 3170
37 4113
38 3116
39 4826
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
659192688464047828

Test #44:

score: 65
Accepted
time: 2ms = 1ms + 1ms
memory: 1876kb,1876kb

input:

7
685730986714800201

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
374 665
2925 4100
3036 3855
4615 32
2870 3316
380 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3744 3489
351...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
1709 1845
502 3099
4569 3296
3926 2245
2563 2866
374 665
2925 4100
3036 3855
4615 32
2870 3316
380 754
804 3034
793 3847
4249 2436
3390 4923
2920 2449
3744 3489
351...

output:

8
4982 2491
1 654
2 2448
3 659
3 3563
4 4079
5 683
6 2668
7 252
7 4464
8 3265
9 2351
10 4352
11 4635
12 237
13 3199
14 927
14 2972
16 2303
17 4415
18 4210
19 3228
20 436
21 4360
22 4967
24 325
25 567
26 3586
27 873
27 1860
27 3175
28 1994
29 962
30 952
31 2112
32 4615
33 81
34 1595
34 4845
37 1372
3...

input:

8
4982 2491
1 654
2 2448
3 659
3 3563
4 4079
5 683
6 2668
7 252
7 4464
8 3265
9 2351
10 4352
11 4635
12 237
13 3199
14 927
14 2972
16 2303
17 4415
18 4210
19 3228
20 436
21 4360
22 4967
24 325
25 567
26 3586
27 873
27 1860
27 3175
28 1994
29 962
30 952
31 2112
32 4615
33 81
34 1595
34 4845
37 1372
3...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
685730986714800201