QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#666123#8726. Magic Showhuazai67635 1ms1932kbC++172.0kb2024-10-22 16:42:072024-10-22 16:42:14

Judging History

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

  • [2024-10-22 16:42:14]
  • 评测
  • 测评结果:35
  • 用时:1ms
  • 内存:1932kb
  • [2024-10-22 16:42:07]
  • 提交

Alice

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

using namespace std;

namespace
{
    const int N=61,M=80;
    typedef long long ll;
    mt19937 rd(1723211);
    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=61,M=80;
    typedef long long ll;
    int fa[N*M+10][2];
    int f[N*M+10];
    mt19937 rd(1723211);
    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: 1ms = 1ms + 0ms
memory: 1892kb,1924kb

input:

1
4005

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 2181
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 2181
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

output:

2
4882 4272
1 2883
2 1359
3 1440
3 1565
4 3847
5 3234
6 24
6 535
6 1509
7 1758
8 187
10 3872
11 4744
12 242
13 2191
14 2100
15 2644
15 3949
16 995
16 1373
16 2208
17 2362
18 1641
19 269
20 1774
22 3308
23 4277
24 2223
25 3368
27 2732
27 2878
27 3456
28 370
29 463
29 532
29 619
29 804
29 1091
29 1368...

input:

2
4882 4272
1 2883
2 1359
3 1440
3 1565
4 3847
5 3234
6 24
6 535
6 1509
7 1758
8 187
10 3872
11 4744
12 242
13 2191
14 2100
15 2644
15 3949
16 995
16 1373
16 2208
17 2362
18 1641
19 269
20 1774
22 3308
23 4277
24 2223
25 3368
27 2732
27 2878
27 3456
28 370
29 463
29 532
29 619
29 804
29 1091
29 1368...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4005

Test #2:

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

input:

1
459

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 3583
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 3583
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

output:

2
4882 4272
1 2132
2 1359
3 1440
3 1565
4 3847
5 3234
6 24
6 1509
7 1758
8 525
10 3872
11 3763
12 242
13 2191
14 2100
15 2644
15 3949
16 995
16 1373
16 2208
17 2362
18 1641
19 1825
20 1774
22 3308
23 4277
24 2223
25 3368
27 1939
27 2657
27 2732
27 2878
27 3456
28 4249
29 463
29 532
29 804
29 1091
29...

input:

2
4882 4272
1 2132
2 1359
3 1440
3 1565
4 3847
5 3234
6 24
6 1509
7 1758
8 525
10 3872
11 3763
12 242
13 2191
14 2100
15 2644
15 3949
16 995
16 1373
16 2208
17 2362
18 1641
19 1825
20 1774
22 3308
23 4277
24 2223
25 3368
27 1939
27 2657
27 2732
27 2878
27 3456
28 4249
29 463
29 532
29 804
29 1091
29...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
459

Test #3:

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

input:

1
2495

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 85
2115 2079
238 1863
4619 4042
4273 4870
965 3583
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
3579...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 85
2115 2079
238 1863
4619 4042
4273 4870
965 3583
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
3579...

output:

2
4882 4272
1 2132
2 1359
3 1440
3 1565
3 4272
4 3847
5 3234
6 24
6 1509
7 1758
8 187
10 3872
11 4744
12 242
13 2191
14 2100
15 2644
15 3949
16 995
16 1373
16 2208
17 2362
18 1641
19 269
20 2458
22 3308
23 4277
24 2223
25 3368
27 2732
27 2878
27 3456
28 370
29 463
29 532
29 804
29 1091
29 1593
29 17...

input:

2
4882 4272
1 2132
2 1359
3 1440
3 1565
3 4272
4 3847
5 3234
6 24
6 1509
7 1758
8 187
10 3872
11 4744
12 242
13 2191
14 2100
15 2644
15 3949
16 995
16 1373
16 2208
17 2362
18 1641
19 269
20 2458
22 3308
23 4277
24 2223
25 3368
27 2732
27 2878
27 3456
28 370
29 463
29 532
29 804
29 1091
29 1593
29 17...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
2495

Test #4:

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

input:

3
1560

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 85
2115 2079
238 1863
4619 4042
4273 4870
965 2181
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
3579...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 85
2115 2079
238 1863
4619 4042
4273 4870
965 2181
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
3579...

output:

4
4882 2441
3 1565
3 4272
5 3234
6 24
6 494
6 1509
8 525
9 4374
11 3763
13 2191
13 2237
14 2100
16 995
16 1373
17 658
18 1641
19 269
20 2458
22 1800
23 4277
25 3368
26 4841
28 4249
29 4680
31 3178
32 77
32 2218
32 3206
33 527
33 1230
34 572
35 2769
37 1243
38 4218
39 2774
41 4652
42 3328
46 3142
48 ...

input:

4
4882 2441
3 1565
3 4272
5 3234
6 24
6 494
6 1509
8 525
9 4374
11 3763
13 2191
13 2237
14 2100
16 995
16 1373
17 658
18 1641
19 269
20 2458
22 1800
23 4277
25 3368
26 4841
28 4249
29 4680
31 3178
32 77
32 2218
32 3206
33 527
33 1230
34 572
35 2769
37 1243
38 4218
39 2774
41 4652
42 3328
46 3142
48 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1560

Test #5:

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

input:

3
3594

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 2181
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 2181
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

output:

4
4882 2441
1 2132
3 1565
5 3234
6 24
6 494
6 1509
8 525
9 2425
11 4744
13 2191
13 2237
14 2100
16 995
16 1373
17 658
18 1641
18 2639
19 269
20 1774
22 1800
23 4277
25 3368
26 4841
28 4249
29 4680
31 3178
32 77
32 2218
32 3206
33 527
33 1230
34 298
35 2769
37 1243
38 4218
38 4549
39 3567
41 4652
42 ...

input:

4
4882 2441
1 2132
3 1565
5 3234
6 24
6 494
6 1509
8 525
9 2425
11 4744
13 2191
13 2237
14 2100
16 995
16 1373
17 658
18 1641
18 2639
19 269
20 1774
22 1800
23 4277
25 3368
26 4841
28 4249
29 4680
31 3178
32 77
32 2218
32 3206
33 527
33 1230
34 298
35 2769
37 1243
38 4218
38 4549
39 3567
41 4652
42 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
3594

Test #6:

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

input:

3
1750

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 85
2115 2079
238 1863
4619 4042
4273 4870
965 2181
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
3579...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 85
2115 2079
238 1863
4619 4042
4273 4870
965 2181
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
3579...

output:

4
4882 2441
1 2132
3 1565
3 4272
5 3234
6 24
6 494
6 535
6 1509
8 187
9 4374
11 3763
13 2191
13 2237
14 2100
16 995
16 1373
17 658
18 1641
18 2639
19 1825
20 2458
22 1800
23 4277
25 3368
26 4841
28 370
29 4680
31 3178
32 77
32 2218
32 3206
33 527
33 1230
34 572
35 2769
37 1243
38 4218
39 3567
41 133...

input:

4
4882 2441
1 2132
3 1565
3 4272
5 3234
6 24
6 494
6 535
6 1509
8 187
9 4374
11 3763
13 2191
13 2237
14 2100
16 995
16 1373
17 658
18 1641
18 2639
19 1825
20 2458
22 1800
23 4277
25 3368
26 4841
28 370
29 4680
31 3178
32 77
32 2218
32 3206
33 527
33 1230
34 572
35 2769
37 1243
38 4218
39 3567
41 133...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1750

Test #7:

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

input:

5
4878

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 2181
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 2181
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

output:

6
4882 2476
1 2132
2 1359
3 1440
4 3847
6 494
6 1509
7 1758
9 4374
10 699
11 3763
13 2237
14 2100
16 995
16 1373
17 2362
18 1641
21 537
22 3308
24 2223
25 3368
26 4841
27 3456
29 4680
31 3178
32 2921
33 527
33 1230
35 2769
37 1064
38 4218
39 3567
40 3937
42 4672
43 904
44 3172
45 2921
48 1181
49 83
...

input:

6
4882 2476
1 2132
2 1359
3 1440
4 3847
6 494
6 1509
7 1758
9 4374
10 699
11 3763
13 2237
14 2100
16 995
16 1373
17 2362
18 1641
21 537
22 3308
24 2223
25 3368
26 4841
27 3456
29 4680
31 3178
32 2921
33 527
33 1230
35 2769
37 1064
38 4218
39 3567
40 3937
42 4672
43 904
44 3172
45 2921
48 1181
49 83
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4878

Test #8:

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

input:

5
1223

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 3583
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 3583
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

output:

6
4882 2469
1 2132
2 1359
3 1440
4 3847
6 535
6 1509
7 1758
9 4374
10 3872
11 3763
13 2237
14 2100
15 2644
16 995
16 1373
17 2362
18 1641
19 1825
21 537
22 1800
23 4277
24 2223
25 3368
26 4841
27 3456
29 4680
30 546
31 3178
32 2921
33 527
33 1230
35 2769
37 1064
38 4218
39 3567
40 3937
41 133
42 467...

input:

6
4882 2469
1 2132
2 1359
3 1440
4 3847
6 535
6 1509
7 1758
9 4374
10 3872
11 3763
13 2237
14 2100
15 2644
16 995
16 1373
17 2362
18 1641
19 1825
21 537
22 1800
23 4277
24 2223
25 3368
26 4841
27 3456
29 4680
30 546
31 3178
32 2921
33 527
33 1230
35 2769
37 1064
38 4218
39 3567
40 3937
41 133
42 467...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1223

Test #9:

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

input:

5
648

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 2181
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 2181
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

output:

6
4882 2455
2 1359
3 1440
4 3847
6 494
6 1509
7 1758
8 525
9 4374
10 3872
11 3763
13 2237
14 2100
16 995
16 1373
17 2362
18 1641
21 537
22 1800
23 4277
24 2223
25 3368
26 4841
27 3456
28 4249
29 4680
31 3178
32 2921
33 527
33 1230
35 2769
37 1064
38 4218
39 2774
40 3937
41 133
43 904
44 3172
45 2921...

input:

6
4882 2455
2 1359
3 1440
4 3847
6 494
6 1509
7 1758
8 525
9 4374
10 3872
11 3763
13 2237
14 2100
16 995
16 1373
17 2362
18 1641
21 537
22 1800
23 4277
24 2223
25 3368
26 4841
27 3456
28 4249
29 4680
31 3178
32 2921
33 527
33 1230
35 2769
37 1064
38 4218
39 2774
40 3937
41 133
43 904
44 3172
45 2921...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
648

Test #10:

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

input:

7
4475

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 85
2115 2079
238 1863
4619 4042
4273 4870
965 3583
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
3579...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 85
2115 2079
238 1863
4619 4042
4273 4870
965 3583
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
3579...

output:

8
4882 2441
1 2132
2 1359
3 1565
3 4272
5 3234
6 1509
7 1758
8 525
9 4374
10 699
11 3763
13 2237
14 2100
15 2644
18 2639
19 1825
20 2458
21 537
22 3308
23 1625
25 3368
26 4841
27 1939
27 2311
27 2657
27 2732
27 2878
28 4249
30 546
32 77
32 3206
33 527
33 1230
34 572
35 2769
38 4218
39 3567
41 4652
4...

input:

8
4882 2441
1 2132
2 1359
3 1565
3 4272
5 3234
6 1509
7 1758
8 525
9 4374
10 699
11 3763
13 2237
14 2100
15 2644
18 2639
19 1825
20 2458
21 537
22 3308
23 1625
25 3368
26 4841
27 1939
27 2311
27 2657
27 2732
27 2878
28 4249
30 546
32 77
32 3206
33 527
33 1230
34 572
35 2769
38 4218
39 3567
41 4652
4...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4475

Test #11:

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

input:

7
4240

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 85
2115 2079
238 1863
4619 4042
4273 4870
965 3583
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
3579...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 85
2115 2079
238 1863
4619 4042
4273 4870
965 3583
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
3579...

output:

8
4882 2441
2 1359
3 1565
3 4272
5 3234
6 494
6 535
6 1509
7 1758
8 525
9 4374
10 699
11 3763
14 2100
16 995
18 1641
19 269
20 2458
21 537
22 1800
23 1625
25 3368
26 4841
27 1939
27 2311
27 2657
27 2732
27 2878
28 4249
30 663
31 4234
32 77
32 3206
33 1230
34 572
35 2769
37 1243
38 4218
39 2774
41 13...

input:

8
4882 2441
2 1359
3 1565
3 4272
5 3234
6 494
6 535
6 1509
7 1758
8 525
9 4374
10 699
11 3763
14 2100
16 995
18 1641
19 269
20 2458
21 537
22 1800
23 1625
25 3368
26 4841
27 1939
27 2311
27 2657
27 2732
27 2878
28 4249
30 663
31 4234
32 77
32 3206
33 1230
34 572
35 2769
37 1243
38 4218
39 2774
41 13...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4240

Test #12:

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

input:

7
1291

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 3583
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 3583
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

output:

8
4882 2441
1 2132
2 1359
3 1565
5 3234
6 1509
7 1758
8 525
9 4374
11 3763
14 2100
15 2644
18 2639
19 269
20 1774
21 537
22 3308
23 4277
25 3368
26 4841
27 1939
27 2311
27 2657
27 2732
27 2878
28 4249
30 546
31 3178
32 77
33 527
33 1230
34 298
35 2769
37 1243
38 4218
39 3567
41 4652
42 4672
45 2921
...

input:

8
4882 2441
1 2132
2 1359
3 1565
5 3234
6 1509
7 1758
8 525
9 4374
11 3763
14 2100
15 2644
18 2639
19 269
20 1774
21 537
22 3308
23 4277
25 3368
26 4841
27 1939
27 2311
27 2657
27 2732
27 2878
28 4249
30 546
31 3178
32 77
33 527
33 1230
34 298
35 2769
37 1243
38 4218
39 3567
41 4652
42 4672
45 2921
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1291

Subtask #2:

score: 30
Accepted

Test #13:

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

input:

1
17476204

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 2181
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 2181
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

output:

2
4882 4272
1 2883
2 1359
3 1440
3 1565
4 3847
5 3234
6 24
6 494
7 1758
8 187
10 3872
11 4744
12 242
13 2191
14 2100
15 3949
16 995
16 1373
16 2208
17 2362
18 1641
19 1825
20 1774
21 3728
22 1800
23 4277
24 2223
25 3368
27 2732
27 2878
27 3456
28 370
29 463
29 532
29 804
29 1091
29 1593
29 1729
29 1...

input:

2
4882 4272
1 2883
2 1359
3 1440
3 1565
4 3847
5 3234
6 24
6 494
7 1758
8 187
10 3872
11 4744
12 242
13 2191
14 2100
15 3949
16 995
16 1373
16 2208
17 2362
18 1641
19 1825
20 1774
21 3728
22 1800
23 4277
24 2223
25 3368
27 2732
27 2878
27 3456
28 370
29 463
29 532
29 804
29 1091
29 1593
29 1729
29 1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
17476204

Test #14:

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

input:

1
11926600

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 3583
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 3583
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

output:

2
4882 4272
1 2883
2 1359
3 1440
3 1565
4 3847
5 3234
6 24
6 494
7 300
7 786
8 525
10 699
11 4744
12 242
14 627
15 3949
16 995
16 1373
16 1867
16 2208
17 2362
18 4803
19 1825
20 1774
21 3728
22 1800
23 1625
24 2223
25 4458
27 1939
27 2732
27 2878
27 3456
28 4249
29 463
29 532
29 804
29 1091
29 1593
...

input:

2
4882 4272
1 2883
2 1359
3 1440
3 1565
4 3847
5 3234
6 24
6 494
7 300
7 786
8 525
10 699
11 4744
12 242
14 627
15 3949
16 995
16 1373
16 1867
16 2208
17 2362
18 4803
19 1825
20 1774
21 3728
22 1800
23 1625
24 2223
25 4458
27 1939
27 2732
27 2878
27 3456
28 4249
29 463
29 532
29 804
29 1091
29 1593
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
11926600

Test #15:

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

input:

1
16602378

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 3583
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 3583
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

output:

2
4882 4272
1 2132
2 1359
3 1440
3 1565
4 3847
5 3234
6 24
6 494
6 1509
7 300
7 786
8 525
10 699
11 3763
12 242
14 627
15 3949
16 995
16 1373
16 1867
16 2208
17 2362
18 4803
19 269
20 1774
22 3308
23 1625
24 2223
25 4458
27 1939
27 2657
27 2732
27 2878
27 3456
28 4249
29 463
29 532
29 804
29 1091
29...

input:

2
4882 4272
1 2132
2 1359
3 1440
3 1565
4 3847
5 3234
6 24
6 494
6 1509
7 300
7 786
8 525
10 699
11 3763
12 242
14 627
15 3949
16 995
16 1373
16 1867
16 2208
17 2362
18 4803
19 269
20 1774
22 3308
23 1625
24 2223
25 4458
27 1939
27 2657
27 2732
27 2878
27 3456
28 4249
29 463
29 532
29 804
29 1091
29...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
16602378

Test #16:

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

input:

3
13129243

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 85
2115 2079
238 1863
4619 4042
4273 4870
965 2181
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
3579...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 85
2115 2079
238 1863
4619 4042
4273 4870
965 2181
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
3579...

output:

4
4882 2441
1 2132
3 1565
3 4272
5 3234
6 24
6 1509
8 525
9 4374
11 3763
13 2540
14 2100
15 2644
16 995
16 1373
17 658
18 1641
18 2639
19 269
20 2458
22 1800
23 1625
25 4458
26 4508
28 4249
29 4680
30 546
30 663
31 4234
32 2218
32 3206
33 527
33 1230
34 572
37 1064
37 1243
38 1333
39 3567
42 4672
46...

input:

4
4882 2441
1 2132
3 1565
3 4272
5 3234
6 24
6 1509
8 525
9 4374
11 3763
13 2540
14 2100
15 2644
16 995
16 1373
17 658
18 1641
18 2639
19 269
20 2458
22 1800
23 1625
25 4458
26 4508
28 4249
29 4680
30 546
30 663
31 4234
32 2218
32 3206
33 527
33 1230
34 572
37 1064
37 1243
38 1333
39 3567
42 4672
46...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
13129243

Test #17:

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

input:

3
7892141

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 3583
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 3583
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

output:

4
4882 2441
3 1565
5 3234
6 24
7 786
8 187
9 2425
11 4744
13 2237
14 2100
15 2644
16 995
16 1373
16 1867
17 658
18 1641
19 269
20 1774
22 1800
23 4277
25 3368
26 4508
28 370
29 4680
30 546
30 4838
32 2218
32 3206
33 527
33 1230
34 298
37 1064
37 1243
38 1333
38 4549
39 2774
41 133
42 3328
44 1421
46...

input:

4
4882 2441
3 1565
5 3234
6 24
7 786
8 187
9 2425
11 4744
13 2237
14 2100
15 2644
16 995
16 1373
16 1867
17 658
18 1641
19 269
20 1774
22 1800
23 4277
25 3368
26 4508
28 370
29 4680
30 546
30 4838
32 2218
32 3206
33 527
33 1230
34 298
37 1064
37 1243
38 1333
38 4549
39 2774
41 133
42 3328
44 1421
46...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
7892141

Test #18:

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

input:

3
21314775

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 85
2115 2079
238 1863
4619 4042
4273 4870
965 3583
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
3579...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 85
2115 2079
238 1863
4619 4042
4273 4870
965 3583
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
3579...

output:

4
4882 2441
1 2132
3 1565
3 4272
5 3234
6 24
6 535
7 300
8 187
9 2425
11 4744
13 2191
13 2237
14 627
15 2644
16 995
16 1373
17 658
18 2639
18 4803
19 1825
20 2458
22 1800
23 1625
25 3368
26 4841
28 370
29 4680
30 546
30 3033
30 4838
31 4234
32 2218
32 3206
33 527
34 572
35 2769
37 1243
38 4549
39 35...

input:

4
4882 2441
1 2132
3 1565
3 4272
5 3234
6 24
6 535
7 300
8 187
9 2425
11 4744
13 2191
13 2237
14 627
15 2644
16 995
16 1373
17 658
18 2639
18 4803
19 1825
20 2458
22 1800
23 1625
25 3368
26 4841
28 370
29 4680
30 546
30 3033
30 4838
31 4234
32 2218
32 3206
33 527
34 572
35 2769
37 1243
38 4549
39 35...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
21314775

Test #19:

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

input:

5
5559540

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 85
2115 2079
238 1863
4619 4042
4273 4870
965 3583
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
3579...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 85
2115 2079
238 1863
4619 4042
4273 4870
965 3583
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
3579...

output:

6
4882 2468
2 1359
3 1440
4 3847
6 494
6 535
6 1509
9 4374
10 699
11 3763
13 2237
16 995
16 1373
17 2362
18 1641
19 1825
20 2458
21 537
22 1800
24 2223
25 3368
26 4841
27 3456
29 4680
31 3178
32 2921
33 527
35 2769
36 1414
37 1064
38 4218
39 2774
40 3937
41 133
43 904
44 3172
45 2921
47 2216
48 1181...

input:

6
4882 2468
2 1359
3 1440
4 3847
6 494
6 535
6 1509
9 4374
10 699
11 3763
13 2237
16 995
16 1373
17 2362
18 1641
19 1825
20 2458
21 537
22 1800
24 2223
25 3368
26 4841
27 3456
29 4680
31 3178
32 2921
33 527
35 2769
36 1414
37 1064
38 4218
39 2774
40 3937
41 133
43 904
44 3172
45 2921
47 2216
48 1181...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
5559540

Test #20:

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

input:

5
9424319

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 85
2115 2079
238 1863
4619 4042
4273 4870
965 3583
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
3579...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 85
2115 2079
238 1863
4619 4042
4273 4870
965 3583
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
3579...

output:

6
4882 2451
1 2132
2 1359
3 1440
4 3847
6 1509
7 1758
10 3872
11 4744
15 2644
16 995
16 1373
17 2362
18 2639
20 2458
21 537
22 3308
23 4277
24 2223
26 4508
27 3456
29 4680
30 546
31 3178
32 2921
33 527
34 572
35 2769
37 1064
38 1333
39 3567
40 3937
41 133
42 4672
43 904
44 3172
45 2921
47 2216
48 11...

input:

6
4882 2451
1 2132
2 1359
3 1440
4 3847
6 1509
7 1758
10 3872
11 4744
15 2644
16 995
16 1373
17 2362
18 2639
20 2458
21 537
22 3308
23 4277
24 2223
26 4508
27 3456
29 4680
30 546
31 3178
32 2921
33 527
34 572
35 2769
37 1064
38 1333
39 3567
40 3937
41 133
42 4672
43 904
44 3172
45 2921
47 2216
48 11...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
9424319

Test #21:

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

input:

5
10955780

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 3583
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 3583
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

output:

6
4882 2447
2 1359
3 1440
4 3847
6 494
6 535
7 1758
10 3872
11 4744
13 2191
16 995
16 1373
16 1867
17 2362
21 537
22 1800
23 4277
24 2223
26 4841
27 3456
29 4680
30 4838
31 3178
32 2921
33 527
35 2769
37 1064
38 4218
39 2774
40 3937
43 904
44 3172
45 2921
48 1181
49 83
49 297
49 306
49 1835
50 2855
...

input:

6
4882 2447
2 1359
3 1440
4 3847
6 494
6 535
7 1758
10 3872
11 4744
13 2191
16 995
16 1373
16 1867
17 2362
21 537
22 1800
23 4277
24 2223
26 4841
27 3456
29 4680
30 4838
31 3178
32 2921
33 527
35 2769
37 1064
38 4218
39 2774
40 3937
43 904
44 3172
45 2921
48 1181
49 83
49 297
49 306
49 1835
50 2855
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
10955780

Test #22:

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

input:

7
19938721

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 3583
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 3583
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

output:

8
4882 2441
1 2883
2 1359
3 1565
5 3234
6 535
7 786
8 525
9 2425
10 699
11 4744
14 2100
15 2644
16 995
16 1867
18 1641
19 269
20 1774
21 537
22 3308
23 1625
25 3368
26 4841
27 1939
27 2878
28 4249
30 546
30 4838
32 77
33 527
33 1230
34 298
35 2769
38 4549
39 2774
41 133
42 3328
45 2921
46 3142
47 22...

input:

8
4882 2441
1 2883
2 1359
3 1565
5 3234
6 535
7 786
8 525
9 2425
10 699
11 4744
14 2100
15 2644
16 995
16 1867
18 1641
19 269
20 1774
21 537
22 3308
23 1625
25 3368
26 4841
27 1939
27 2878
28 4249
30 546
30 4838
32 77
33 527
33 1230
34 298
35 2769
38 4549
39 2774
41 133
42 3328
45 2921
46 3142
47 22...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
19938721

Test #23:

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

input:

7
5129508

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 3583
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 3583
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

output:

8
4882 2441
1 2883
2 1359
3 1565
5 3234
6 494
6 535
6 1509
7 1758
8 187
9 4374
11 3763
13 2237
14 627
16 995
16 1373
17 658
18 1641
19 269
20 1774
21 537
22 3308
23 4277
25 3368
26 4508
27 2732
27 2878
28 370
30 3033
31 3178
32 3206
33 527
34 298
35 2769
38 1333
39 2774
41 4652
42 263
44 1746
45 292...

input:

8
4882 2441
1 2883
2 1359
3 1565
5 3234
6 494
6 535
6 1509
7 1758
8 187
9 4374
11 3763
13 2237
14 627
16 995
16 1373
17 658
18 1641
19 269
20 1774
21 537
22 3308
23 4277
25 3368
26 4508
27 2732
27 2878
28 370
30 3033
31 3178
32 3206
33 527
34 298
35 2769
38 1333
39 2774
41 4652
42 263
44 1746
45 292...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
5129508

Test #24:

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

input:

7
15332941

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 2181
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4882
1013 4659
1162 2208
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 2181
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

output:

8
4882 2441
2 1359
3 1565
5 3234
6 24
7 300
8 187
9 4374
10 699
11 3763
13 2540
14 2100
15 2644
16 1867
17 658
18 4803
19 1825
20 1774
21 3728
22 1800
23 1625
25 4458
26 4508
28 370
30 546
30 4838
31 4234
32 3206
33 527
33 1230
34 298
35 2769
37 1064
38 1333
39 2774
42 3328
46 3142
48 1181
48 4457
4...

input:

8
4882 2441
2 1359
3 1565
5 3234
6 24
7 300
8 187
9 4374
10 699
11 3763
13 2540
14 2100
15 2644
16 1867
17 658
18 4803
19 1825
20 1774
21 3728
22 1800
23 1625
25 4458
26 4508
28 370
30 546
30 4838
31 4234
32 3206
33 527
33 1230
34 298
35 2769
37 1064
38 1333
39 2774
42 3328
46 3142
48 1181
48 4457
4...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
15332941

Subtask #3:

score: 0
Wrong Answer

Test #25:

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

input:

1
355365355024496523

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4882
1013 561
1162 2827
2596 567
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 2181
4085 541
391 1476
386 2648
3024 359
3649 2552
2747 2982
742 4880
3579...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4882
1013 561
1162 2827
2596 567
832 4014
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 2181
4085 541
391 1476
386 2648
3024 359
3649 2552
2747 2982
742 4880
3579...

output:

2
4882 4272
1 2132
2 1359
3 1565
3 2491
4 3466
5 2241
6 24
7 300
7 786
8 525
10 699
11 3763
12 242
13 2191
14 627
15 2644
15 3949
16 269
16 1867
16 4214
17 2362
18 4803
19 269
20 1774
21 98
21 491
22 3308
23 1625
24 808
25 4458
27 806
27 1939
27 2657
27 2878
28 4249
29 532
29 804
29 1729
29 2362
29 ...

input:

2
4882 4272
1 2132
2 1359
3 1565
3 2491
4 3466
5 2241
6 24
7 300
7 786
8 525
10 699
11 3763
12 242
13 2191
14 627
15 2644
15 3949
16 269
16 1867
16 4214
17 2362
18 4803
19 269
20 1774
21 98
21 491
22 3308
23 1625
24 808
25 4458
27 806
27 1939
27 2657
27 2878
28 4249
29 532
29 804
29 1729
29 2362
29 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
355365355024496523

Test #26:

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

input:

1
727827999106414164

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4882
1013 4659
1162 2208
2596 3714
832 3104
1983 85
2115 456
238 3065
4619 4042
4273 1281
965 2181
4085 4477
391 400
386 2648
3024 359
3649 2552
2747 4143
742 3924
3579 ...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4882
1013 4659
1162 2208
2596 3714
832 3104
1983 85
2115 456
238 3065
4619 4042
4273 1281
965 2181
4085 4477
391 400
386 2648
3024 359
3649 2552
2747 4143
742 3924
3579 ...

output:

2
4882 4272
1 2883
2 2572
3 1440
3 1565
3 4272
4 3466
5 3234
6 494
6 535
6 4107
7 786
8 187
10 699
11 3763
12 889
13 2191
14 2100
15 3949
16 2208
17 2362
17 3174
18 1641
19 1825
20 2458
21 98
22 1800
23 1625
24 2223
25 3368
27 2657
27 2732
27 2878
27 3456
27 3729
28 370
29 463
29 532
29 619
29 1368
...

input:

2
4882 4272
1 2883
2 2572
3 1440
3 1565
3 4272
4 3466
5 3234
6 494
6 535
6 4107
7 786
8 187
10 699
11 3763
12 889
13 2191
14 2100
15 3949
16 2208
17 2362
17 3174
18 1641
19 1825
20 2458
21 98
22 1800
23 1625
24 2223
25 3368
27 2657
27 2732
27 2878
27 3456
27 3729
28 370
29 463
29 532
29 619
29 1368
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
727827999106414164

Test #27:

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

input:

1
656410143989222955

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4882
1013 4659
1162 2827
2596 3714
832 3104
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 2181
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4882
1013 4659
1162 2827
2596 3714
832 3104
1983 2086
2115 2079
238 1863
4619 4042
4273 4870
965 2181
4085 541
391 400
386 2648
3024 3555
3649 2552
2747 4143
742 3924
35...

output:

2
4882 4272
1 2132
2 1359
3 1565
3 2491
4 3847
5 3234
6 1509
6 4107
7 786
8 525
10 3872
11 4744
12 889
14 2100
15 2644
15 3949
16 995
16 1867
16 2208
17 3174
17 3924
18 1641
19 269
20 1774
21 3728
22 1800
23 4277
24 2223
25 3368
27 1939
27 2878
27 3456
27 4117
28 4249
29 532
29 1593
29 1729
29 1812
...

input:

2
4882 4272
1 2132
2 1359
3 1565
3 2491
4 3847
5 3234
6 1509
6 4107
7 786
8 525
10 3872
11 4744
12 889
14 2100
15 2644
15 3949
16 995
16 1867
16 2208
17 3174
17 3924
18 1641
19 269
20 1774
21 3728
22 1800
23 4277
24 2223
25 3368
27 1939
27 2878
27 3456
27 4117
28 4249
29 532
29 1593
29 1729
29 1812
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
656410143989222955

Test #28:

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

input:

1
410366615149657534

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4882
1013 561
1162 2208
2596 567
832 4014
1983 85
2115 456
238 3065
4619 4042
4273 1281
965 3583
4085 541
391 400
386 2648
3024 359
3649 50
2747 2982
742 4880
3579 69
13...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4882
1013 561
1162 2208
2596 567
832 4014
1983 85
2115 456
238 3065
4619 4042
4273 1281
965 3583
4085 541
391 400
386 2648
3024 359
3649 50
2747 2982
742 4880
3579 69
13...

output:

2
4882 4272
1 2132
2 1359
3 1440
3 1565
3 4272
4 3466
5 3234
6 24
6 494
7 1758
8 187
10 699
11 4744
12 242
13 2191
14 627
15 3949
16 269
16 1373
16 1867
16 2208
17 3174
17 3924
18 1641
19 269
20 2458
21 98
21 3728
22 3308
23 1625
24 2223
25 4458
27 806
27 2732
27 4117
28 370
29 463
29 532
29 804
29 ...

input:

2
4882 4272
1 2132
2 1359
3 1440
3 1565
3 4272
4 3466
5 3234
6 24
6 494
7 1758
8 187
10 699
11 4744
12 242
13 2191
14 627
15 3949
16 269
16 1373
16 1867
16 2208
17 3174
17 3924
18 1641
19 269
20 2458
21 98
21 3728
22 3308
23 1625
24 2223
25 4458
27 806
27 2732
27 4117
28 370
29 463
29 532
29 804
29 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
410366615149657534

Test #29:

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

input:

1
298090682780948428

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4882
1013 561
1162 2208
2596 3714
832 3104
1983 2086
2115 2079
238 3065
4619 17
4273 4870
965 2181
4085 4477
391 1476
386 2648
3024 3555
3649 2552
2747 2982
742 3924
357...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4882
1013 561
1162 2208
2596 3714
832 3104
1983 2086
2115 2079
238 3065
4619 17
4273 4870
965 2181
4085 4477
391 1476
386 2648
3024 3555
3649 2552
2747 2982
742 3924
357...

output:

2
4882 4272
1 2883
2 2572
3 1440
4 3466
5 3234
6 494
6 1509
6 4107
7 300
7 1758
8 187
10 699
11 3763
12 889
13 2191
14 2100
15 942
16 269
16 2208
17 2362
17 4619
18 4803
19 1825
20 1774
21 491
22 3308
23 1625
24 218
24 808
25 3368
27 806
27 2657
27 2732
27 2878
28 370
29 463
29 532
29 804
29 1593
29...

input:

2
4882 4272
1 2883
2 2572
3 1440
4 3466
5 3234
6 494
6 1509
6 4107
7 300
7 1758
8 187
10 699
11 3763
12 889
13 2191
14 2100
15 942
16 269
16 2208
17 2362
17 4619
18 4803
19 1825
20 1774
21 491
22 3308
23 1625
24 218
24 808
25 3368
27 806
27 2657
27 2732
27 2878
28 370
29 463
29 532
29 804
29 1593
29...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
298090682780948428

Test #30:

score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1896kb,1904kb

input:

3
969441916331132577

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4882
1013 561
1162 2827
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 17
4273 4870
965 2181
4085 541
391 400
386 2648
3024 3555
3649 50
2747 2982
742 3924
3579 26...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4882
1013 561
1162 2827
2596 3714
832 4014
1983 2086
2115 2079
238 1863
4619 17
4273 4870
965 2181
4085 541
391 400
386 2648
3024 3555
3649 50
2747 2982
742 3924
3579 26...

output:

4
4882 2441
3 1525
5 2241
6 24
6 535
6 1509
7 1758
8 525
9 4374
11 3763
13 2191
13 2237
14 2100
15 942
15 2644
16 269
16 1373
18 1641
19 269
20 1774
21 3014
21 3728
23 4277
24 218
25 3368
26 4508
28 4249
30 546
30 663
31 3178
31 4717
33 1230
33 2932
34 298
37 1064
38 1333
39 2774
41 133
42 263
46 38...

input:

4
4882 2441
3 1525
5 2241
6 24
6 535
6 1509
7 1758
8 525
9 4374
11 3763
13 2191
13 2237
14 2100
15 942
15 2644
16 269
16 1373
18 1641
19 269
20 1774
21 3014
21 3728
23 4277
24 218
25 3368
26 4508
28 4249
30 546
30 663
31 3178
31 4717
33 1230
33 2932
34 298
37 1064
38 1333
39 2774
41 133
42 263
46 38...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
392981164027709089