QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#666097#8726. Magic Showhuazai67635 2ms1936kbC++172.0kb2024-10-22 16:35:002024-10-22 16:35:14

Judging History

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

  • [2024-10-22 16:35:14]
  • 评测
  • 测评结果:35
  • 用时:2ms
  • 内存:1936kb
  • [2024-10-22 16:35:00]
  • 提交

Alice

#include<iostream>
#include<cstring>
#include<algorithm>
#include<vector>
#include<random>
#include "Alice.h"

using namespace std;

namespace
{
    const int N=64,M=75;
    typedef long long ll;
    mt19937 rd(1723287);
    int a[N*M+10];
    int fa[N*M+10][2];
    int rand(int l,int r)
    {
        return rd()%(r-l+1)+l;
    }
}

vector<pair<int,int> > Alice()
{
    vector<pair<int,int> > res;
    ll x=setN(N*M+2);
    int n=N*M+2;
    for(int i=1;i<=n;i++) a[i]=i;
    shuffle(a+1,a+n+1,rd);
    for(int i=0;i<N;i++)
    {
        for(int j=1;j<=M;j++)
        {
            int u=i*M+j;
            fa[u][1]=rand(u+1,n-1);
            fa[u][0]=rand(fa[u][1]+1,n);
            if(x>>i&1)
                res.push_back({a[u],a[fa[u][1]]});
            else
                res.push_back({a[u],a[fa[u][0]]});
        }
    }
    res.push_back({a[N*M+1],a[N*M+2]});
    shuffle(res.begin(),res.end(),rd);
    return res;
}

Bob

#include<iostream>
#include<cstring>
#include<algorithm>
#include<vector>
#include<random>
#include "Bob.h"

using namespace std;

namespace
{
    const int N=64,M=75;
    typedef long long ll;
    int fa[N*M+10][2];
    int f[N*M+10];
    mt19937 rd(1723287);
    int a[N*M+10],b[N*M+10];
    int rand(int l,int r)
    {
        return rd()%(r-l+1)+l;
    }
}

ll Bob(vector<pair<int,int> > V)
{
    int n=N*M+2;
    for(int i=1;i<=n;i++) a[i]=i;
    shuffle(a+1,a+n+1,rd);
    for(int i=1;i<=n;i++) b[a[i]]=i;
    for(int i=0;i<N;i++)
    {
        for(int j=1;j<=M;j++)
        {
            int u=i*M+j;
            fa[u][1]=rand(u+1,n-1);
            fa[u][0]=rand(fa[u][1]+1,n);
        }
    }
    for(auto[u,v]:V)
    {
        if(b[v]==fa[b[u]][1]) f[b[u]]=1;
    }
    ll res=0;
    for(int i=0;i<N;i++)
    {
        ll g=0;
        for(int j=1;j<=M;j++)
        {
            int u=i*M+j;
            g|=f[u];
        }
        res|=g<<i;
    }
    return res;
}

詳細信息

Subtask #1:

score: 5
Accepted

Test #1:

score: 5
Accepted
time: 0ms = 0ms + 0ms
memory: 1896kb,1920kb

input:

1
4005

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 3262
3024 2803
3795 14...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 3262
3024 2803
3795 14...

output:

2
4802 4253
1 1628
2 867
3 3244
4 3580
4 3586
4 4152
5 2429
6 1776
6 4224
7 629
8 4331
9 2764
9 4494
9 4669
9 4706
9 4738
10 2148
10 2317
11 1473
12 2972
13 3098
15 1139
16 2352
17 911
17 4496
18 2224
19 2536
20 3059
21 3829
21 4188
22 452
23 1118
24 3515
25 1961
26 1911
27 2525
28 985
28 2719
30 94...

input:

2
4802 4253
1 1628
2 867
3 3244
4 3580
4 3586
4 4152
5 2429
6 1776
6 4224
7 629
8 4331
9 2764
9 4494
9 4669
9 4706
9 4738
10 2148
10 2317
11 1473
12 2972
13 3098
15 1139
16 2352
17 911
17 4496
18 2224
19 2536
20 3059
21 3829
21 4188
22 452
23 1118
24 3515
25 1961
26 1911
27 2525
28 985
28 2719
30 94...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4005

Test #2:

score: 5
Accepted
time: 0ms = 0ms + 0ms
memory: 1892kb,1916kb

input:

1
459

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 2886
1941 1508
3024 2803
3795 14...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 2886
1941 1508
3024 2803
3795 14...

output:

2
4802 4253
1 3540
2 4755
3 3244
3 3581
4 3580
4 3586
4 3847
5 2429
5 4604
6 1776
6 4224
7 2726
8 4331
9 2764
9 4494
9 4669
9 4706
9 4738
10 2148
11 1473
12 2972
13 3098
14 3955
15 1139
16 2352
17 911
17 4496
18 2224
19 2536
20 3059
21 416
22 452
23 1118
24 3515
25 1961
26 1911
27 2525
28 985
28 271...

input:

2
4802 4253
1 3540
2 4755
3 3244
3 3581
4 3580
4 3586
4 3847
5 2429
5 4604
6 1776
6 4224
7 2726
8 4331
9 2764
9 4494
9 4669
9 4706
9 4738
10 2148
11 1473
12 2972
13 3098
14 3955
15 1139
16 2352
17 911
17 4496
18 2224
19 2536
20 3059
21 416
22 452
23 1118
24 3515
25 1961
26 1911
27 2525
28 985
28 271...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
459

Test #3:

score: 5
Accepted
time: 0ms = 0ms + 0ms
memory: 1888kb,1916kb

input:

1
2495

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 2886
1941 3262
3024 2803
3795 14...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 2886
1941 3262
3024 2803
3795 14...

output:

2
4802 4253
1 3540
2 4755
3 3244
4 3580
4 3586
4 4152
5 2429
5 4604
6 4224
7 629
8 4331
9 2764
9 4494
9 4669
9 4706
9 4738
10 2148
11 1473
12 2972
13 3098
14 3955
15 1139
16 2352
17 911
17 4496
18 2224
19 2536
20 3059
21 416
21 4188
22 452
23 1118
24 3515
25 1961
26 1911
27 2525
28 985
28 2719
30 19...

input:

2
4802 4253
1 3540
2 4755
3 3244
4 3580
4 3586
4 4152
5 2429
5 4604
6 4224
7 629
8 4331
9 2764
9 4494
9 4669
9 4706
9 4738
10 2148
11 1473
12 2972
13 3098
14 3955
15 1139
16 2352
17 911
17 4496
18 2224
19 2536
20 3059
21 416
21 4188
22 452
23 1118
24 3515
25 1961
26 1911
27 2525
28 985
28 2719
30 19...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
2495

Test #4:

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

input:

3
1560

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 1508
3024 2803
3795 14...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 1508
3024 2803
3795 14...

output:

4
4802 2401
1 1628
2 867
3 3244
3 3581
4 3580
4 3586
4 3847
5 2429
7 2726
10 2317
12 2972
16 2352
17 911
17 4496
21 3829
22 3300
24 3515
26 2451
28 2719
30 942
31 4107
32 1164
33 1026
36 2911
36 2968
36 4286
38 3903
39 4740
40 490
41 1259
45 1318
45 3786
45 4130
46 3964
47 58
49 3774
51 377
51 2635
...

input:

4
4802 2401
1 1628
2 867
3 3244
3 3581
4 3580
4 3586
4 3847
5 2429
7 2726
10 2317
12 2972
16 2352
17 911
17 4496
21 3829
22 3300
24 3515
26 2451
28 2719
30 942
31 4107
32 1164
33 1026
36 2911
36 2968
36 4286
38 3903
39 4740
40 490
41 1259
45 1318
45 3786
45 4130
46 3964
47 58
49 3774
51 377
51 2635
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1560

Test #5:

score: 5
Accepted
time: 0ms = 0ms + 0ms
memory: 1888kb,1892kb

input:

3
3594

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 1508
3024 2803
3795 14...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 1508
3024 2803
3795 14...

output:

4
4802 2401
1 1628
2 867
3 3244
3 3581
4 3580
4 3586
4 3847
4 4152
5 2429
6 1776
7 2726
10 2317
12 2972
14 3955
16 2352
17 911
17 4496
21 3829
22 3300
24 3515
26 2451
28 2719
30 942
31 4107
32 3569
33 1026
36 2911
36 2968
36 4286
38 3903
39 3153
40 490
41 1259
45 1318
45 3786
45 4130
47 58
49 3774
5...

input:

4
4802 2401
1 1628
2 867
3 3244
3 3581
4 3580
4 3586
4 3847
4 4152
5 2429
6 1776
7 2726
10 2317
12 2972
14 3955
16 2352
17 911
17 4496
21 3829
22 3300
24 3515
26 2451
28 2719
30 942
31 4107
32 3569
33 1026
36 2911
36 2968
36 4286
38 3903
39 3153
40 490
41 1259
45 1318
45 3786
45 4130
47 58
49 3774
5...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
3594

Test #6:

score: 5
Accepted
time: 0ms = 0ms + 0ms
memory: 1892kb,1888kb

input:

3
1750

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 1508
3024 2803
3795 14...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 1508
3024 2803
3795 14...

output:

4
4802 2401
1 1628
3 3244
4 3580
4 3586
4 3847
5 2429
7 629
10 2317
12 2972
14 3955
16 2352
17 911
17 4496
21 3829
22 3300
24 3515
26 2451
28 985
30 942
31 4107
32 1164
36 2911
36 2968
36 4286
38 3903
39 3153
40 3671
41 759
45 1318
45 3786
45 4130
46 3964
47 819
49 3774
51 377
51 2635
52 66
52 477
5...

input:

4
4802 2401
1 1628
3 3244
4 3580
4 3586
4 3847
5 2429
7 629
10 2317
12 2972
14 3955
16 2352
17 911
17 4496
21 3829
22 3300
24 3515
26 2451
28 985
30 942
31 4107
32 1164
36 2911
36 2968
36 4286
38 3903
39 3153
40 3671
41 759
45 1318
45 3786
45 4130
46 3964
47 819
49 3774
51 377
51 2635
52 66
52 477
5...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1750

Test #7:

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

input:

5
4878

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 2886
1941 1508
3024 2803
3795 14...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 2886
1941 1508
3024 2803
3795 14...

output:

6
4802 2433
4 3580
5 2429
6 4224
9 2764
9 4669
9 4706
9 4738
11 1473
14 4322
17 4496
19 2536
20 3059
22 452
23 1118
24 3515
26 2451
26 4454
29 3459
32 3569
33 1121
34 3559
35 4250
36 2968
36 4286
37 2347
38 414
38 3903
41 759
42 803
43 1473
44 2395
45 357
46 4636
48 3653
49 568
50 1016
52 477
52 137...

input:

6
4802 2433
4 3580
5 2429
6 4224
9 2764
9 4669
9 4706
9 4738
11 1473
14 4322
17 4496
19 2536
20 3059
22 452
23 1118
24 3515
26 2451
26 4454
29 3459
32 3569
33 1121
34 3559
35 4250
36 2968
36 4286
37 2347
38 414
38 3903
41 759
42 803
43 1473
44 2395
45 357
46 4636
48 3653
49 568
50 1016
52 477
52 137...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4878

Test #8:

score: 5
Accepted
time: 0ms = 0ms + 0ms
memory: 1888kb,1896kb

input:

5
1223

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 1508
3024 2803
3795 14...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 1508
3024 2803
3795 14...

output:

6
4802 2417
4 3580
5 2429
6 4224
9 2764
9 4669
9 4706
9 4738
10 2317
11 1473
14 4322
17 4496
19 2536
20 3059
22 3300
23 1118
24 3515
26 2451
28 985
29 3459
32 3569
33 1121
34 3559
35 4678
36 2968
36 4286
37 2347
38 3903
40 3671
42 803
43 1473
44 2395
45 357
46 4636
48 3653
50 1016
51 377
52 477
52 1...

input:

6
4802 2417
4 3580
5 2429
6 4224
9 2764
9 4669
9 4706
9 4738
10 2317
11 1473
14 4322
17 4496
19 2536
20 3059
22 3300
23 1118
24 3515
26 2451
28 985
29 3459
32 3569
33 1121
34 3559
35 4678
36 2968
36 4286
37 2347
38 3903
40 3671
42 803
43 1473
44 2395
45 357
46 4636
48 3653
50 1016
51 377
52 477
52 1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1223

Test #9:

score: 5
Accepted
time: 0ms = 0ms + 0ms
memory: 1888kb,1896kb

input:

5
648

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 2886
1941 1508
3024 2803
3795 14...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 2886
1941 1508
3024 2803
3795 14...

output:

6
4802 2431
3 3581
4 3580
5 2429
6 4224
9 2764
9 4669
9 4706
9 4738
11 1473
14 4322
17 4496
19 2536
20 3059
22 3300
23 1118
24 3515
26 2451
28 985
29 3459
32 3569
33 1121
34 3559
36 2968
36 4286
37 2347
38 414
38 3903
40 3671
41 1259
42 803
43 1473
44 2395
45 357
46 4636
47 58
48 3653
49 568
50 1016...

input:

6
4802 2431
3 3581
4 3580
5 2429
6 4224
9 2764
9 4669
9 4706
9 4738
11 1473
14 4322
17 4496
19 2536
20 3059
22 3300
23 1118
24 3515
26 2451
28 985
29 3459
32 3569
33 1121
34 3559
36 2968
36 4286
37 2347
38 414
38 3903
40 3671
41 1259
42 803
43 1473
44 2395
45 357
46 4636
47 58
48 3653
49 568
50 1016...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
648

Test #10:

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

input:

7
4475

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 2886
1941 3262
3024 2803
3795 14...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 2886
1941 3262
3024 2803
3795 14...

output:

8
4802 2401
2 4755
3 3581
4 3580
4 3586
5 4604
7 2726
9 4669
9 4706
10 2148
12 2972
13 4262
14 1134
14 3955
15 1139
16 2352
17 4496
21 4188
22 452
24 3515
28 2719
30 191
31 4107
32 1164
33 1026
34 789
34 1334
34 2854
34 4561
35 4678
36 2968
36 4286
38 414
39 3153
40 490
41 1259
43 411
45 3786
45 413...

input:

8
4802 2401
2 4755
3 3581
4 3580
4 3586
5 4604
7 2726
9 4669
9 4706
10 2148
12 2972
13 4262
14 1134
14 3955
15 1139
16 2352
17 4496
21 4188
22 452
24 3515
28 2719
30 191
31 4107
32 1164
33 1026
34 789
34 1334
34 2854
34 4561
35 4678
36 2968
36 4286
38 414
39 3153
40 490
41 1259
43 411
45 3786
45 413...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4475

Test #11:

score: 5
Accepted
time: 0ms = 0ms + 0ms
memory: 1892kb,1896kb

input:

7
4240

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 2886
1941 1508
3024 2803
3795 14...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 2886
1941 1508
3024 2803
3795 14...

output:

8
4802 2401
2 4755
3 3244
3 3581
4 3586
4 3847
5 4604
7 2726
9 4669
9 4706
10 2148
12 2972
13 4262
14 1134
15 1139
16 2352
17 4496
21 416
22 3300
24 3515
26 2451
26 4454
28 985
30 191
31 4107
32 1164
33 1121
34 789
34 1334
34 1679
34 2854
34 4561
35 4250
36 2968
36 4286
38 414
39 4740
40 3671
41 125...

input:

8
4802 2401
2 4755
3 3244
3 3581
4 3586
4 3847
5 4604
7 2726
9 4669
9 4706
10 2148
12 2972
13 4262
14 1134
15 1139
16 2352
17 4496
21 416
22 3300
24 3515
26 2451
26 4454
28 985
30 191
31 4107
32 1164
33 1121
34 789
34 1334
34 1679
34 2854
34 4561
35 4250
36 2968
36 4286
38 414
39 4740
40 3671
41 125...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4240

Test #12:

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

input:

7
1291

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 1508
3024 2803
3795 14...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 1508
3024 2803
3795 14...

output:

8
4802 2401
2 4755
3 3581
4 3586
4 3847
5 2429
5 4604
6 1776
7 2726
9 4669
9 4706
10 2317
12 2972
14 3955
15 1139
16 2352
17 4496
21 3829
22 452
24 3515
28 2719
30 191
31 4107
32 3569
33 1026
34 789
34 1334
34 2854
34 4561
35 4678
36 2968
36 4286
39 3153
40 490
41 1259
43 411
45 3786
45 4130
46 4636...

input:

8
4802 2401
2 4755
3 3581
4 3586
4 3847
5 2429
5 4604
6 1776
7 2726
9 4669
9 4706
10 2317
12 2972
14 3955
15 1139
16 2352
17 4496
21 3829
22 452
24 3515
28 2719
30 191
31 4107
32 3569
33 1026
34 789
34 1334
34 2854
34 4561
35 4678
36 2968
36 4286
39 3153
40 490
41 1259
43 411
45 3786
45 4130
46 4636...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1291

Subtask #2:

score: 30
Accepted

Test #13:

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

input:

1
17476204

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 2886
1941 3262
3024 2803
3795 14...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 2886
1941 3262
3024 2803
3795 14...

output:

2
4802 4253
1 1628
2 867
3 3244
4 3580
4 3586
4 4152
5 2429
6 1776
6 4224
7 629
8 4331
9 2764
9 4494
9 4669
9 4706
9 4738
10 482
11 1473
12 2972
13 3098
15 1139
16 2352
17 911
17 4496
18 2224
19 2536
20 3045
20 3059
21 416
21 4188
22 3300
23 4189
24 3515
25 1961
26 1911
27 2525
28 4409
29 1601
30 94...

input:

2
4802 4253
1 1628
2 867
3 3244
4 3580
4 3586
4 4152
5 2429
6 1776
6 4224
7 629
8 4331
9 2764
9 4494
9 4669
9 4706
9 4738
10 482
11 1473
12 2972
13 3098
15 1139
16 2352
17 911
17 4496
18 2224
19 2536
20 3045
20 3059
21 416
21 4188
22 3300
23 4189
24 3515
25 1961
26 1911
27 2525
28 4409
29 1601
30 94...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
17476204

Test #14:

score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 1892kb,1920kb

input:

1
11926600

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 1508
3024 2803
3795 45...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 1508
3024 2803
3795 45...

output:

2
4802 4253
1 3540
2 4755
3 3244
3 3581
4 3580
4 3586
4 3847
4 4152
5 2429
5 4604
6 1776
6 4224
7 2726
8 4331
9 2764
9 4494
9 4669
9 4706
9 4738
10 2148
10 2317
11 1473
12 2972
13 4262
14 1134
14 1725
15 3375
16 2352
17 911
17 4496
18 2224
19 2536
20 3059
20 3360
21 3829
22 3300
23 4189
24 3515
25 1...

input:

2
4802 4253
1 3540
2 4755
3 3244
3 3581
4 3580
4 3586
4 3847
4 4152
5 2429
5 4604
6 1776
6 4224
7 2726
8 4331
9 2764
9 4494
9 4669
9 4706
9 4738
10 2148
10 2317
11 1473
12 2972
13 4262
14 1134
14 1725
15 3375
16 2352
17 911
17 4496
18 2224
19 2536
20 3059
20 3360
21 3829
22 3300
23 4189
24 3515
25 1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
11926600

Test #15:

score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 1888kb,1920kb

input:

1
16602378

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 1508
3024 2803
3795 45...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 1508
3024 2803
3795 45...

output:

2
4802 4253
1 3540
2 4755
3 3244
3 3581
4 3580
4 3586
4 3847
5 2429
5 4604
6 1776
6 4224
7 2726
8 4331
9 2764
9 4494
9 4669
9 4706
9 4738
10 482
10 2317
11 1473
12 2972
13 4262
14 1134
14 1725
14 3955
15 3375
16 2352
17 911
17 4496
18 2224
19 4054
20 3059
20 3360
21 3829
22 452
23 1118
24 3515
25 19...

input:

2
4802 4253
1 3540
2 4755
3 3244
3 3581
4 3580
4 3586
4 3847
5 2429
5 4604
6 1776
6 4224
7 2726
8 4331
9 2764
9 4494
9 4669
9 4706
9 4738
10 482
10 2317
11 1473
12 2972
13 4262
14 1134
14 1725
14 3955
15 3375
16 2352
17 911
17 4496
18 2224
19 4054
20 3059
20 3360
21 3829
22 452
23 1118
24 3515
25 19...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
16602378

Test #16:

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

input:

3
13129243

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 1508
3024 2803
3795 14...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 1508
3024 2803
3795 14...

output:

4
4802 2401
1 1628
2 867
3 3244
3 3581
4 3586
4 3847
5 2429
7 2726
10 482
10 2317
12 2972
14 1134
14 1725
14 3955
16 2226
16 2352
17 911
17 4496
19 4054
21 3829
22 3300
24 3515
26 2451
26 4454
30 942
31 2291
31 4107
32 1164
33 1026
33 3001
33 3028
34 789
34 1334
34 4561
35 4250
35 4678
36 2968
36 42...

input:

4
4802 2401
1 1628
2 867
3 3244
3 3581
4 3586
4 3847
5 2429
7 2726
10 482
10 2317
12 2972
14 1134
14 1725
14 3955
16 2226
16 2352
17 911
17 4496
19 4054
21 3829
22 3300
24 3515
26 2451
26 4454
30 942
31 2291
31 4107
32 1164
33 1026
33 3001
33 3028
34 789
34 1334
34 4561
35 4250
35 4678
36 2968
36 42...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
13129243

Test #17:

score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 1888kb,1896kb

input:

3
7892141

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 3262
3024 2803
3795 45...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 3262
3024 2803
3795 45...

output:

4
4802 2401
2 4755
3 3244
4 3586
4 4152
5 2429
5 4604
6 1776
7 629
10 482
10 2317
12 2972
15 1139
16 2226
16 2352
17 911
17 4496
19 4054
20 3360
21 3829
21 4188
22 3300
24 3515
26 1911
26 2451
28 985
28 4409
30 191
31 2291
31 4107
32 3569
35 4678
36 2968
36 4286
38 3903
39 4740
40 3671
41 759
43 411...

input:

4
4802 2401
2 4755
3 3244
4 3586
4 4152
5 2429
5 4604
6 1776
7 629
10 482
10 2317
12 2972
15 1139
16 2226
16 2352
17 911
17 4496
19 4054
20 3360
21 3829
21 4188
22 3300
24 3515
26 1911
26 2451
28 985
28 4409
30 191
31 2291
31 4107
32 3569
35 4678
36 2968
36 4286
38 3903
39 4740
40 3671
41 759
43 411...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
7892141

Test #18:

score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 1896kb,1900kb

input:

3
21314775

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 1508
3024 2803
3795 14...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 1508
3024 2803
3795 14...

output:

4
4802 2401
2 4755
3 3244
5 2429
5 4604
7 629
10 2317
12 2972
14 1134
14 3955
15 3375
16 2226
16 2352
17 911
17 4496
19 4054
21 3829
22 3300
26 1911
26 2451
26 4454
28 985
28 4409
30 191
31 4107
32 1164
33 1618
33 3001
35 4250
35 4678
36 2968
38 3903
39 3153
40 3671
41 759
43 411
45 3786
45 4130
46 ...

input:

4
4802 2401
2 4755
3 3244
5 2429
5 4604
7 629
10 2317
12 2972
14 1134
14 3955
15 3375
16 2226
16 2352
17 911
17 4496
19 4054
21 3829
22 3300
26 1911
26 2451
26 4454
28 985
28 4409
30 191
31 4107
32 1164
33 1618
33 3001
35 4250
35 4678
36 2968
38 3903
39 3153
40 3671
41 759
43 411
45 3786
45 4130
46 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
21314775

Test #19:

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

input:

5
5559540

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 3262
3024 2803
3795 14...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 3262
3024 2803
3795 14...

output:

6
4802 2436
4 3580
5 2429
6 4224
9 2764
9 3593
9 4669
9 4706
9 4738
10 2317
11 1473
14 4322
15 3375
16 2226
17 4496
19 4054
20 3059
21 3829
22 3300
24 3515
26 2451
26 4454
28 985
29 3459
32 1164
33 1121
34 3559
35 4250
36 2968
37 2347
38 3903
42 803
43 1473
44 357
45 357
46 4636
48 3653
50 1016
51 3...

input:

6
4802 2436
4 3580
5 2429
6 4224
9 2764
9 3593
9 4669
9 4706
9 4738
10 2317
11 1473
14 4322
15 3375
16 2226
17 4496
19 4054
20 3059
21 3829
22 3300
24 3515
26 2451
26 4454
28 985
29 3459
32 1164
33 1121
34 3559
35 4250
36 2968
37 2347
38 3903
42 803
43 1473
44 357
45 357
46 4636
48 3653
50 1016
51 3...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
5559540

Test #20:

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

input:

5
9424319

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 3262
3024 2803
3795 14...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 3262
3024 2803
3795 14...

output:

6
4802 2406
4 3580
5 2429
6 4224
9 2764
9 3593
9 4669
9 4706
9 4738
10 2317
11 1473
14 4322
15 3375
17 4496
19 2536
20 3059
21 4188
24 3515
26 2451
28 985
29 3459
31 2291
32 1164
33 1121
34 3559
35 4678
36 2968
37 2347
38 3903
40 3671
42 803
43 1473
44 2395
45 357
46 4636
48 3653
50 1196
51 377
52 4...

input:

6
4802 2406
4 3580
5 2429
6 4224
9 2764
9 3593
9 4669
9 4706
9 4738
10 2317
11 1473
14 4322
15 3375
17 4496
19 2536
20 3059
21 4188
24 3515
26 2451
28 985
29 3459
31 2291
32 1164
33 1121
34 3559
35 4678
36 2968
37 2347
38 3903
40 3671
42 803
43 1473
44 2395
45 357
46 4636
48 3653
50 1196
51 377
52 4...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
9424319

Test #21:

score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 1888kb,1896kb

input:

5
10955780

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 1508
3024 2803
3795 45...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 1508
3024 2803
3795 45...

output:

6
4802 2413
1 3540
2 4755
3 3244
4 3586
4 3847
4 4152
5 4604
6 1776
7 629
8 4331
9 4494
10 2148
12 2972
13 3098
14 1725
16 2352
17 911
18 2224
20 3045
21 3829
25 1961
26 1911
27 2525
29 1601
30 191
31 4107
34 789
34 1334
34 1679
34 4561
35 705
36 2911
37 539
38 4081
39 4740
40 490
41 759
42 225
42 8...

input:

6
4802 2413
1 3540
2 4755
3 3244
4 3586
4 3847
4 4152
5 4604
6 1776
7 629
8 4331
9 4494
10 2148
12 2972
13 3098
14 1725
16 2352
17 911
18 2224
20 3045
21 3829
25 1961
26 1911
27 2525
29 1601
30 191
31 4107
34 789
34 1334
34 1679
34 4561
35 705
36 2911
37 539
38 4081
39 4740
40 490
41 759
42 225
42 8...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
10955780

Test #22:

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

input:

7
19938721

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 3262
3024 2803
3795 45...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 3262
3024 2803
3795 45...

output:

8
4802 2401
2 4755
3 3244
3 3581
4 3586
4 4152
5 2429
5 4604
6 1776
7 2726
9 4669
10 2317
12 2972
14 1134
15 1139
16 2352
17 4496
20 3360
21 3829
21 4188
22 452
24 3515
26 2451
26 4454
28 985
28 4409
30 191
31 4107
32 3569
33 1618
34 2854
34 4561
35 4250
35 4678
36 2968
36 4286
39 4740
40 3671
41 12...

input:

8
4802 2401
2 4755
3 3244
3 3581
4 3586
4 4152
5 2429
5 4604
6 1776
7 2726
9 4669
10 2317
12 2972
14 1134
15 1139
16 2352
17 4496
20 3360
21 3829
21 4188
22 452
24 3515
26 2451
26 4454
28 985
28 4409
30 191
31 4107
32 3569
33 1618
34 2854
34 4561
35 4250
35 4678
36 2968
36 4286
39 4740
40 3671
41 12...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
19938721

Test #23:

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

input:

7
5129508

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 3262
3024 2803
3795 14...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 3262
3024 2803
3795 14...

output:

8
4802 2401
2 4755
3 3244
5 2429
5 4604
6 1776
7 629
9 2764
9 3593
9 4669
9 4706
10 2317
12 2972
15 3375
16 2226
16 2352
17 4496
19 4054
20 3045
21 4188
22 452
24 3515
28 2719
29 1601
30 191
31 2291
32 3569
33 3001
33 3028
34 789
34 1334
34 1679
34 2854
34 4561
36 2968
39 4740
40 490
41 759
45 1318
...

input:

8
4802 2401
2 4755
3 3244
5 2429
5 4604
6 1776
7 629
9 2764
9 3593
9 4669
9 4706
10 2317
12 2972
15 3375
16 2226
16 2352
17 4496
19 4054
20 3045
21 4188
22 452
24 3515
28 2719
29 1601
30 191
31 2291
32 3569
33 3001
33 3028
34 789
34 1334
34 1679
34 2854
34 4561
36 2968
39 4740
40 490
41 759
45 1318
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
5129508

Test #24:

score: 30
Accepted
time: 0ms = 0ms + 0ms
memory: 1888kb,1900kb

input:

7
15332941

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 1508
3024 2803
3795 45...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4802
4104 4516
2280 2093
1127 1451
1053 1104
2045 1251
3923 275
249 2125
4510 3074
4095 3665
4592 4558
2857 3926
220 3666
2519 1534
3077 4291
1941 1508
3024 2803
3795 45...

output:

8
4802 2401
1 1628
2 867
3 3244
4 3586
4 3847
5 2429
6 1776
7 629
10 482
10 2317
12 2972
14 1134
14 1725
15 1139
16 2226
16 2352
17 911
17 4496
19 4054
21 3829
22 3300
23 4189
24 3515
26 2451
26 4454
28 4409
30 942
31 2291
32 3569
33 1026
33 3001
33 3028
34 1334
34 4561
35 4250
35 4678
36 2968
36 42...

input:

8
4802 2401
1 1628
2 867
3 3244
4 3586
4 3847
5 2429
6 1776
7 629
10 482
10 2317
12 2972
14 1134
14 1725
15 1139
16 2226
16 2352
17 911
17 4496
19 4054
21 3829
22 3300
23 4189
24 3515
26 2451
26 4454
28 4409
30 942
31 2291
32 3569
33 1026
33 3001
33 3028
34 1334
34 4561
35 4250
35 4678
36 2968
36 42...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
15332941

Subtask #3:

score: 0
Wrong Answer

Test #25:

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

input:

1
355365355024496523

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4802
4104 4516
2280 2793
1127 1451
1053 468
2045 108
3923 3446
249 3704
4510 3551
4095 3665
4592 4574
2857 3926
220 29
2519 1534
3077 4291
1941 1508
3024 2803
3795 4516
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4802
4104 4516
2280 2793
1127 1451
1053 468
2045 108
3923 3446
249 3704
4510 3551
4095 3665
4592 4574
2857 3926
220 29
2519 1534
3077 4291
1941 1508
3024 2803
3795 4516
...

output:

2
4802 4253
1 1628
2 867
3 433
3 3581
4 2987
4 3580
4 3586
4 3847
5 3780
6 243
6 1776
6 3577
6 4092
7 2726
8 1850
9 3206
9 4494
9 4706
10 2148
10 2317
11 2206
12 4745
13 4262
14 1134
14 1725
14 3955
15 3375
16 3938
17 911
18 2224
19 2536
20 1272
20 3045
20 3059
20 3360
21 3829
22 452
23 1118
24 3515...

input:

2
4802 4253
1 1628
2 867
3 433
3 3581
4 2987
4 3580
4 3586
4 3847
5 3780
6 243
6 1776
6 3577
6 4092
7 2726
8 1850
9 3206
9 4494
9 4706
10 2148
10 2317
11 2206
12 4745
13 4262
14 1134
14 1725
14 3955
15 3375
16 3938
17 911
18 2224
19 2536
20 1272
20 3045
20 3059
20 3360
21 3829
22 452
23 1118
24 3515...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
355365355024496523

Test #26:

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

input:

1
727827999106414164

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4802
4104 4516
2280 2093
1127 516
1053 1104
2045 1251
3923 3446
249 2125
4510 3551
4095 2933
4592 4558
2857 4547
220 3666
2519 2684
3077 4291
1941 1508
3024 2803
3795 14...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4802
4104 4516
2280 2093
1127 516
1053 1104
2045 1251
3923 3446
249 2125
4510 3551
4095 2933
4592 4558
2857 4547
220 3666
2519 2684
3077 4291
1941 1508
3024 2803
3795 14...

output:

2
4802 2517
2 867
3 433
4 2803
4 3847
6 243
6 3010
6 3577
6 4092
9 4738
11 2206
13 4262
16 2352
17 911
18 2224
19 4054
20 3045
20 3360
24 2706
25 4127
26 1911
26 4454
27 2713
29 4419
30 942
32 1164
34 3219
34 4561
35 4250
36 2911
36 2968
36 3864
36 4286
37 573
38 3903
38 4081
39 4740
40 490
42 225
4...

input:

2
4802 2517
2 867
3 433
4 2803
4 3847
6 243
6 3010
6 3577
6 4092
9 4738
11 2206
13 4262
16 2352
17 911
18 2224
19 4054
20 3045
20 3360
24 2706
25 4127
26 1911
26 4454
27 2713
29 4419
30 942
32 1164
34 3219
34 4561
35 4250
36 2911
36 2968
36 3864
36 4286
37 573
38 3903
38 4081
39 4740
40 490
42 225
4...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
727827999106414164

Test #27:

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

input:

1
656410143989222955

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4802
4104 4516
2280 2093
1127 516
1053 468
2045 1251
3923 3446
249 2125
4510 3551
4095 2933
4592 4558
2857 3926
220 3666
2519 2684
3077 4291
1941 3262
3024 3194
3795 451...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4802
4104 4516
2280 2093
1127 516
1053 468
2045 1251
3923 3446
249 2125
4510 3551
4095 2933
4592 4558
2857 3926
220 3666
2519 2684
3077 4291
1941 3262
3024 3194
3795 451...

output:

2
4802 2517
2 867
3 3244
4 2803
6 243
6 1776
6 3010
6 4224
9 3593
9 4738
11 1473
13 3098
14 3955
16 3938
17 3987
18 2224
19 4054
20 3360
21 4188
24 3515
25 4127
26 1911
27 2713
29 3459
30 942
32 3569
33 1026
33 3028
34 1334
34 3219
35 705
36 2911
36 4286
37 2347
38 3903
38 4081
39 3153
40 490
42 803...

input:

2
4802 2517
2 867
3 3244
4 2803
6 243
6 1776
6 3010
6 4224
9 3593
9 4738
11 1473
13 3098
14 3955
16 3938
17 3987
18 2224
19 4054
20 3360
21 4188
24 3515
25 4127
26 1911
27 2713
29 3459
30 942
32 3569
33 1026
33 3028
34 1334
34 3219
35 705
36 2911
36 4286
37 2347
38 3903
38 4081
39 3153
40 490
42 803...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
656410143989222955

Test #28:

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

input:

1
410366615149657534

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4802
4104 2196
2280 2793
1127 1451
1053 1104
2045 1251
3923 275
249 3704
4510 3074
4095 3665
4592 4574
2857 4547
220 29
2519 2684
3077 4291
1941 3262
3024 3194
3795 4516...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4802
4104 2196
2280 2793
1127 1451
1053 1104
2045 1251
3923 275
249 3704
4510 3074
4095 3665
4592 4574
2857 4547
220 29
2519 2684
3077 4291
1941 3262
3024 3194
3795 4516...

output:

2
4802 2517
2 4755
3 433
4 3580
4 3586
6 3577
6 4092
9 4706
9 4738
11 1473
13 4262
14 3955
16 2352
17 3987
18 2296
19 2536
20 1276
21 4188
24 2706
25 1961
26 4454
26 4648
28 985
29 220
29 3459
30 191
31 2291
32 1164
33 1026
34 4561
35 4250
36 2911
36 2968
37 539
37 2347
38 3025
39 3153
40 3671
42 22...

input:

2
4802 2517
2 4755
3 433
4 3580
4 3586
6 3577
6 4092
9 4706
9 4738
11 1473
13 4262
14 3955
16 2352
17 3987
18 2296
19 2536
20 1276
21 4188
24 2706
25 1961
26 4454
26 4648
28 985
29 220
29 3459
30 191
31 2291
32 1164
33 1026
34 4561
35 4250
36 2911
36 2968
37 539
37 2347
38 3025
39 3153
40 3671
42 22...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
410366615149657534

Test #29:

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

input:

1
298090682780948428

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4802
4104 4516
2280 2793
1127 1451
1053 1104
2045 1251
3923 3446
249 3704
4510 3551
4095 2933
4592 4574
2857 3926
220 29
2519 1534
3077 4291
1941 1508
3024 2803
3795 145...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4802
4104 4516
2280 2793
1127 1451
1053 1104
2045 1251
3923 3446
249 3704
4510 3551
4095 2933
4592 4574
2857 3926
220 29
2519 1534
3077 4291
1941 1508
3024 2803
3795 145...

output:

2
4802 2517
2 867
3 433
4 2803
4 3847
6 243
6 1776
6 3010
6 3577
6 4092
9 3206
9 4738
11 2206
13 4262
16 2352
17 911
18 2224
19 2536
20 3045
24 2706
25 1961
26 1911
26 4454
27 2713
28 985
29 220
29 3459
29 4184
30 942
32 3569
33 1026
34 1334
34 4561
35 4250
36 1770
36 2968
36 3864
36 4286
37 573
38 ...

input:

2
4802 2517
2 867
3 433
4 2803
4 3847
6 243
6 1776
6 3010
6 3577
6 4092
9 3206
9 4738
11 2206
13 4262
16 2352
17 911
18 2224
19 2536
20 3045
24 2706
25 1961
26 1911
26 4454
27 2713
28 985
29 220
29 3459
29 4184
30 942
32 3569
33 1026
34 1334
34 4561
35 4250
36 1770
36 2968
36 3864
36 4286
37 573
38 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
298090682780948428

Test #30:

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

input:

3
969441916331132577

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4802
4104 4516
2280 2793
1127 516
1053 468
2045 108
3923 275
249 3704
4510 3074
4095 3665
4592 4574
2857 3926
220 29
2519 2684
3077 4291
1941 3262
3024 2803
3795 1451
39...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4802
4104 4516
2280 2793
1127 516
1053 468
2045 108
3923 275
249 3704
4510 3074
4095 3665
4592 4574
2857 3926
220 29
2519 2684
3077 4291
1941 3262
3024 2803
3795 1451
39...

output:

4
4802 2401
1 1628
3 433
3 3581
4 3586
5 3780
6 1776
6 3577
6 4092
8 1850
10 482
10 2317
12 4745
16 2226
16 3938
17 911
17 4496
19 4054
20 1272
20 3045
21 3829
21 4188
22 3300
23 4189
24 2706
26 752
26 2451
28 985
30 942
31 2291
32 3569
33 1618
33 3001
35 4678
36 4286
38 3025
40 3671
41 1259
43 411
...

input:

4
4802 2401
1 1628
3 433
3 3581
4 3586
5 3780
6 1776
6 3577
6 4092
8 1850
10 482
10 2317
12 4745
16 2226
16 3938
17 911
17 4496
19 4054
20 1272
20 3045
21 3829
21 4188
22 3300
23 4189
24 2706
26 752
26 2451
28 985
30 942
31 2291
32 3569
33 1618
33 3001
35 4678
36 4286
38 3025
40 3671
41 1259
43 411
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
969441916331132577

Test #31:

score: 0
Wrong Answer
time: 1ms = 1ms + 0ms
memory: 1892kb,1908kb

input:

3
929489812741933634

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4802
4104 2196
2280 2093
1127 516
1053 468
2045 108
3923 275
249 2125
4510 3074
4095 3665
4592 4574
2857 3926
220 29
2519 1534
3077 2886
1941 1508
3024 2803
3795 1451
39...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4802
4104 2196
2280 2093
1127 516
1053 468
2045 108
3923 275
249 2125
4510 3074
4095 3665
4592 4574
2857 3926
220 29
2519 1534
3077 2886
1941 1508
3024 2803
3795 1451
39...

output:

4
4802 2401
1 1628
3 433
3 3581
4 3847
4 4152
5 3780
6 1776
6 3577
6 4092
10 2148
12 4745
14 1725
14 3955
16 2226
16 3938
17 911
19 4054
21 416
22 3300
24 2706
25 4102
26 2451
27 2713
28 2719
30 942
32 3569
33 3001
33 3028
36 1770
36 4286
37 539
38 414
38 3025
38 3903
39 3153
40 490
41 1259
43 2652
...

input:

4
4802 2401
1 1628
3 433
3 3581
4 3847
4 4152
5 3780
6 1776
6 3577
6 4092
10 2148
12 4745
14 1725
14 3955
16 2226
16 3938
17 911
19 4054
21 416
22 3300
24 2706
25 4102
26 2451
27 2713
28 2719
30 942
32 3569
33 3001
33 3028
36 1770
36 4286
37 539
38 414
38 3025
38 3903
39 3153
40 490
41 1259
43 2652
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
353029060438510146