QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#666146#8726. Magic Showhuazai6760 1ms1936kbC++172.0kb2024-10-22 16:50:252024-10-22 16:50:31

Judging History

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

  • [2024-10-22 16:50:31]
  • 评测
  • 测评结果:0
  • 用时:1ms
  • 内存:1936kb
  • [2024-10-22 16:50:25]
  • 提交

Alice

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

using namespace std;

namespace
{
    const int N=64,M=78;
    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=(N-1-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=78;
    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=(N-1-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=(N-1-i)*M+j;
            g|=f[u];
        }
        res|=g<<i;
    }
    return res;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

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

input:

1
4005

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4994
46 2435
4373 3192
1065 687
2209 4684
3859 144
3394 4226
8 3093
2884 4173
4540 3380
2990 4242
3012 2419
328 4305
55 3526
1720 3551
343 2864
4421 2543
82 4304
2233 90...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4994
46 2435
4373 3192
1065 687
2209 4684
3859 144
3394 4226
8 3093
2884 4173
4540 3380
2990 4242
3012 2419
328 4305
55 3526
1720 3551
343 2864
4421 2543
82 4304
2233 90...

output:

2
4994 4242
1 1496
2 1791
2 4686
3 4243
4 129
4 1190
6 3409
8 3093
12 1233
12 4777
13 2438
14 4880
15 3005
16 2461
16 3081
16 3104
17 557
17 2641
19 1627
21 214
21 774
21 3174
21 3267
22 1803
23 786
25 3246
27 658
27 1993
27 2858
27 3589
27 4119
27 4706
28 4640
29 186
29 2045
30 2360
31 1887
31 2624...

input:

2
4994 4242
1 1496
2 1791
2 4686
3 4243
4 129
4 1190
6 3409
8 3093
12 1233
12 4777
13 2438
14 4880
15 3005
16 2461
16 3081
16 3104
17 557
17 2641
19 1627
21 214
21 774
21 3174
21 3267
22 1803
23 786
25 3246
27 658
27 1993
27 2858
27 3589
27 4119
27 4706
28 4640
29 186
29 2045
30 2360
31 1887
31 2624...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4005

Test #2:

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

input:

1
459

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4994
46 2435
4373 1054
1065 4630
2209 4684
3859 144
3394 4226
8 3093
2884 4173
4540 3380
2990 4242
3012 2419
328 4305
55 3526
1720 915
343 2864
4421 763
82 4304
2233 225...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4994
46 2435
4373 1054
1065 4630
2209 4684
3859 144
3394 4226
8 3093
2884 4173
4540 3380
2990 4242
3012 2419
328 4305
55 3526
1720 915
343 2864
4421 763
82 4304
2233 225...

output:

2
4994 4242
1 1496
2 1791
2 4686
3 4243
4 129
4 1190
6 3409
8 3093
12 1233
12 4777
13 2438
14 4880
15 3005
16 2461
16 3081
16 3104
17 557
17 1802
17 4583
19 1627
21 214
21 774
21 3029
21 3267
22 1803
23 786
25 3246
27 658
27 1993
27 2858
27 3589
27 4119
27 4706
28 4640
29 186
29 1184
29 4100
30 2360...

input:

2
4994 4242
1 1496
2 1791
2 4686
3 4243
4 129
4 1190
6 3409
8 3093
12 1233
12 4777
13 2438
14 4880
15 3005
16 2461
16 3081
16 3104
17 557
17 1802
17 4583
19 1627
21 214
21 774
21 3029
21 3267
22 1803
23 786
25 3246
27 658
27 1993
27 2858
27 3589
27 4119
27 4706
28 4640
29 186
29 1184
29 4100
30 2360...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
459

Test #3:

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

input:

1
2495

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4994
46 2435
4373 1054
1065 4630
2209 4684
3859 144
3394 4226
8 3093
2884 4173
4540 3380
2990 4242
3012 2419
328 4305
55 3526
1720 3551
343 2864
4421 2543
82 4304
2233 9...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4994
46 2435
4373 1054
1065 4630
2209 4684
3859 144
3394 4226
8 3093
2884 4173
4540 3380
2990 4242
3012 2419
328 4305
55 3526
1720 3551
343 2864
4421 2543
82 4304
2233 9...

output:

2
4994 4242
1 1496
2 1791
2 4686
3 4243
4 129
4 1190
6 3409
8 3093
12 1233
12 4777
13 2438
14 4880
15 3005
16 2461
16 3081
16 3104
17 557
17 1802
17 2634
17 4583
19 1627
21 214
21 774
21 3029
21 3267
22 1803
23 786
25 3246
27 658
27 754
27 1993
27 2858
27 3589
27 4119
28 4640
29 186
29 1184
29 4100
...

input:

2
4994 4242
1 1496
2 1791
2 4686
3 4243
4 129
4 1190
6 3409
8 3093
12 1233
12 4777
13 2438
14 4880
15 3005
16 2461
16 3081
16 3104
17 557
17 1802
17 2634
17 4583
19 1627
21 214
21 774
21 3029
21 3267
22 1803
23 786
25 3246
27 658
27 754
27 1993
27 2858
27 3589
27 4119
28 4640
29 186
29 1184
29 4100
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
2495

Test #4:

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

input:

3
1560

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4994
46 2435
4373 3192
1065 687
2209 4684
3859 144
3394 4226
8 3093
2884 4173
4540 3380
2990 4242
3012 2419
328 4305
55 3526
1720 915
343 2864
4421 763
82 4304
2233 904
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4994
46 2435
4373 3192
1065 687
2209 4684
3859 144
3394 4226
8 3093
2884 4173
4540 3380
2990 4242
3012 2419
328 4305
55 3526
1720 915
343 2864
4421 763
82 4304
2233 904
...

output:

4
4994 2497
1 1496
2 1791
2 4686
4 1190
6 3409
7 4605
8 3093
9 3992
10 4923
11 3802
12 1233
12 4777
13 2438
14 4880
15 3005
18 1498
19 1627
21 214
21 774
21 3174
21 3267
22 1803
23 786
25 3246
26 533
28 4640
30 2360
31 1887
32 1695
32 4970
33 1930
34 4079
34 4256
40 1831
42 1320
43 695
45 3286
46 24...

input:

4
4994 2497
1 1496
2 1791
2 4686
4 1190
6 3409
7 4605
8 3093
9 3992
10 4923
11 3802
12 1233
12 4777
13 2438
14 4880
15 3005
18 1498
19 1627
21 214
21 774
21 3174
21 3267
22 1803
23 786
25 3246
26 533
28 4640
30 2360
31 1887
32 1695
32 4970
33 1930
34 4079
34 4256
40 1831
42 1320
43 695
45 3286
46 24...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1560

Test #5:

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

input:

3
3594

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4994
46 2435
4373 1054
1065 687
2209 4684
3859 144
3394 4226
8 3093
2884 4173
4540 3380
2990 4242
3012 2419
328 4305
55 3526
1720 3551
343 2864
4421 763
82 4304
2233 904...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4994
46 2435
4373 1054
1065 687
2209 4684
3859 144
3394 4226
8 3093
2884 4173
4540 3380
2990 4242
3012 2419
328 4305
55 3526
1720 3551
343 2864
4421 763
82 4304
2233 904...

output:

4
4994 2497
1 1496
2 1791
2 4686
4 1190
6 3409
7 4605
8 3093
9 3992
10 4923
11 3802
12 1233
12 4777
13 2438
14 4880
15 3005
18 1498
19 1627
21 214
21 774
21 3174
21 3267
22 1803
23 786
25 3246
26 533
28 4640
30 2360
31 1887
31 2624
32 1695
32 3164
32 4970
33 1930
34 4079
34 4256
38 2091
40 1831
42 1...

input:

4
4994 2497
1 1496
2 1791
2 4686
4 1190
6 3409
7 4605
8 3093
9 3992
10 4923
11 3802
12 1233
12 4777
13 2438
14 4880
15 3005
18 1498
19 1627
21 214
21 774
21 3174
21 3267
22 1803
23 786
25 3246
26 533
28 4640
30 2360
31 1887
31 2624
32 1695
32 3164
32 4970
33 1930
34 4079
34 4256
38 2091
40 1831
42 1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
3594

Test #6:

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

input:

3
1750

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4994
46 2435
4373 1054
1065 687
2209 4684
3859 144
3394 4226
8 3093
2884 4173
4540 3380
2990 4242
3012 2419
328 4305
55 3526
1720 915
343 2864
4421 763
82 4304
2233 2255...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4994
46 2435
4373 1054
1065 687
2209 4684
3859 144
3394 4226
8 3093
2884 4173
4540 3380
2990 4242
3012 2419
328 4305
55 3526
1720 915
343 2864
4421 763
82 4304
2233 2255...

output:

4
4994 2497
1 1496
2 1791
4 1190
6 3409
7 4605
8 3093
9 3992
10 4923
11 3802
12 1233
12 4777
13 2438
14 4880
15 3005
18 1498
19 1627
21 214
21 774
21 3174
21 3267
22 1803
23 786
25 3246
26 533
28 4640
29 186
29 1114
29 2799
30 2360
31 1887
32 1695
32 4970
33 1930
34 4079
34 4256
40 1831
42 1320
43 6...

input:

4
4994 2497
1 1496
2 1791
4 1190
6 3409
7 4605
8 3093
9 3992
10 4923
11 3802
12 1233
12 4777
13 2438
14 4880
15 3005
18 1498
19 1627
21 214
21 774
21 3174
21 3267
22 1803
23 786
25 3246
26 533
28 4640
29 186
29 1114
29 2799
30 2360
31 1887
32 1695
32 4970
33 1930
34 4079
34 4256
40 1831
42 1320
43 6...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1750

Test #7:

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

input:

5
4878

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4994
46 2435
4373 1054
1065 687
2209 4684
3859 144
3394 4226
8 3093
2884 4173
4540 3380
2990 4242
3012 2419
328 4305
55 3526
1720 915
343 2864
4421 763
82 4304
2233 904
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4994
46 2435
4373 1054
1065 687
2209 4684
3859 144
3394 4226
8 3093
2884 4173
4540 3380
2990 4242
3012 2419
328 4305
55 3526
1720 915
343 2864
4421 763
82 4304
2233 904
...

output:

6
4994 2558
1 1496
2 4686
4 1190
5 3306
6 3409
9 3992
12 1233
13 2438
14 4880
15 3005
16 176
16 3081
16 3104
16 3975
17 4583
18 1498
19 1627
21 3029
23 786
24 1001
27 4706
28 4640
29 1184
31 1887
32 1695
32 4970
34 4079
35 2935
36 2543
39 3938
40 1831
41 2079
43 2464
44 3211
49 4680
50 3828
52 4885
...

input:

6
4994 2558
1 1496
2 4686
4 1190
5 3306
6 3409
9 3992
12 1233
13 2438
14 4880
15 3005
16 176
16 3081
16 3104
16 3975
17 4583
18 1498
19 1627
21 3029
23 786
24 1001
27 4706
28 4640
29 1184
31 1887
32 1695
32 4970
34 4079
35 2935
36 2543
39 3938
40 1831
41 2079
43 2464
44 3211
49 4680
50 3828
52 4885
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4878

Test #8:

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

input:

5
1223

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4994
46 2435
4373 1054
1065 4630
2209 4684
3859 144
3394 4226
8 3093
2884 4173
4540 3380
2990 4242
3012 2419
328 4305
55 3526
1720 915
343 2864
4421 763
82 4304
2233 225...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4994
46 2435
4373 1054
1065 4630
2209 4684
3859 144
3394 4226
8 3093
2884 4173
4540 3380
2990 4242
3012 2419
328 4305
55 3526
1720 915
343 2864
4421 763
82 4304
2233 225...

output:

6
4994 2524
1 1496
2 4686
4 1190
5 3306
6 3409
8 3093
11 3802
12 1233
13 2438
14 4880
16 176
16 3081
16 3104
16 3975
17 4583
18 1498
21 214
21 774
21 3267
22 1803
24 3127
25 3246
26 533
27 4706
28 4640
29 1184
31 1887
32 4556
33 1930
34 4079
35 2935
37 1672
41 2079
42 1320
43 695
44 3211
47 1286
49 ...

input:

6
4994 2524
1 1496
2 4686
4 1190
5 3306
6 3409
8 3093
11 3802
12 1233
13 2438
14 4880
16 176
16 3081
16 3104
16 3975
17 4583
18 1498
21 214
21 774
21 3267
22 1803
24 3127
25 3246
26 533
27 4706
28 4640
29 1184
31 1887
32 4556
33 1930
34 4079
35 2935
37 1672
41 2079
42 1320
43 695
44 3211
47 1286
49 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1223

Test #9:

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

input:

5
648

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4994
46 2435
4373 3192
1065 687
2209 4684
3859 144
3394 4226
8 3093
2884 4173
4540 3380
2990 4242
3012 2419
328 4305
55 3526
1720 915
343 2864
4421 763
82 4304
2233 904
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4994
46 2435
4373 3192
1065 687
2209 4684
3859 144
3394 4226
8 3093
2884 4173
4540 3380
2990 4242
3012 2419
328 4305
55 3526
1720 915
343 2864
4421 763
82 4304
2233 904
...

output:

6
4994 2519
1 1496
2 4686
4 129
5 3306
6 3409
11 3802
12 4777
13 2438
14 4880
15 3005
16 3502
17 2641
19 1627
21 214
21 774
21 3267
22 1803
23 786
27 658
27 1993
27 2858
27 3589
27 4119
27 4977
28 4640
29 186
29 1114
29 2799
29 3555
29 4100
31 1887
32 1695
32 4970
34 4079
36 2543
40 1831
41 2079
43 ...

input:

6
4994 2519
1 1496
2 4686
4 129
5 3306
6 3409
11 3802
12 4777
13 2438
14 4880
15 3005
16 3502
17 2641
19 1627
21 214
21 774
21 3267
22 1803
23 786
27 658
27 1993
27 2858
27 3589
27 4119
27 4977
28 4640
29 186
29 1114
29 2799
29 3555
29 4100
31 1887
32 1695
32 4970
34 4079
36 2543
40 1831
41 2079
43 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
648

Test #10:

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

input:

7
4475

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4994
46 2435
4373 1054
1065 4630
2209 4684
3859 144
3394 4226
8 3093
2884 4173
4540 3380
2990 4242
3012 2419
328 4305
55 3526
1720 915
343 2864
4421 2543
82 4304
2233 22...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4994
46 2435
4373 1054
1065 4630
2209 4684
3859 144
3394 4226
8 3093
2884 4173
4540 3380
2990 4242
3012 2419
328 4305
55 3526
1720 915
343 2864
4421 2543
82 4304
2233 22...

output:

8
4994 2497
1 1496
4 1190
6 3409
7 4605
8 3093
9 3992
10 4923
11 3802
12 4777
13 2438
14 4880
15 3005
16 176
16 3081
16 3104
17 2284
18 1498
19 1627
20 3015
21 214
21 774
21 3267
22 1803
23 786
25 3246
26 533
27 4119
28 4640
30 2360
31 1887
32 1695
33 1930
34 4256
37 1672
38 2091
39 3938
40 1831
42 ...

input:

8
4994 2497
1 1496
4 1190
6 3409
7 4605
8 3093
9 3992
10 4923
11 3802
12 4777
13 2438
14 4880
15 3005
16 176
16 3081
16 3104
17 2284
18 1498
19 1627
20 3015
21 214
21 774
21 3267
22 1803
23 786
25 3246
26 533
27 4119
28 4640
30 2360
31 1887
32 1695
33 1930
34 4256
37 1672
38 2091
39 3938
40 1831
42 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4448

Subtask #2:

score: 0
Wrong Answer

Test #13:

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

input:

1
17476204

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4994
46 2435
4373 3192
1065 687
2209 4684
3859 144
3394 4226
8 3093
2884 4173
4540 3380
2990 4242
3012 2419
328 4305
55 3526
1720 3551
343 2864
4421 2543
82 4304
2233 22...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4994
46 2435
4373 3192
1065 687
2209 4684
3859 144
3394 4226
8 3093
2884 4173
4540 3380
2990 4242
3012 2419
328 4305
55 3526
1720 3551
343 2864
4421 2543
82 4304
2233 22...

output:

2
4994 4242
1 1496
2 1791
2 4686
3 4243
4 129
4 1190
6 3409
8 3093
12 1233
12 4777
13 2438
14 4880
15 3610
16 3081
16 3502
17 1802
17 2056
17 2641
19 1627
21 214
21 774
21 3029
21 3267
22 1803
23 786
25 3246
27 658
27 1993
27 2858
27 3589
27 4119
27 4706
28 4640
29 186
29 2045
29 4100
30 2360
31 188...

input:

2
4994 4242
1 1496
2 1791
2 4686
3 4243
4 129
4 1190
6 3409
8 3093
12 1233
12 4777
13 2438
14 4880
15 3610
16 3081
16 3502
17 1802
17 2056
17 2641
19 1627
21 214
21 774
21 3029
21 3267
22 1803
23 786
25 3246
27 658
27 1993
27 2858
27 3589
27 4119
27 4706
28 4640
29 186
29 2045
29 4100
30 2360
31 188...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
17476204

Test #14:

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

input:

1
11926600

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4994
46 2435
4373 3192
1065 4630
2209 4684
3859 144
3394 4226
8 3093
2884 4173
4540 3380
2990 4242
3012 2419
328 4305
55 3526
1720 3551
343 2864
4421 763
82 4304
2233 22...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4994
46 2435
4373 3192
1065 4630
2209 4684
3859 144
3394 4226
8 3093
2884 4173
4540 3380
2990 4242
3012 2419
328 4305
55 3526
1720 3551
343 2864
4421 763
82 4304
2233 22...

output:

2
4994 4242
1 1496
2 1791
2 4686
3 4243
4 1190
4 1992
6 3409
8 3093
12 1233
12 4777
13 2438
14 4880
15 3005
16 3081
16 3502
17 981
17 1802
17 2056
17 2641
19 1627
21 774
21 3174
21 3267
22 1803
23 786
24 1592
25 3246
27 1993
27 2422
27 2858
27 3206
27 3589
27 4706
28 4640
29 620
29 2045
29 4100
30 2...

input:

2
4994 4242
1 1496
2 1791
2 4686
3 4243
4 1190
4 1992
6 3409
8 3093
12 1233
12 4777
13 2438
14 4880
15 3005
16 3081
16 3502
17 981
17 1802
17 2056
17 2641
19 1627
21 774
21 3174
21 3267
22 1803
23 786
24 1592
25 3246
27 1993
27 2422
27 2858
27 3206
27 3589
27 4706
28 4640
29 620
29 2045
29 4100
30 2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
11926600

Test #15:

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

input:

1
16602378

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4994
46 2435
4373 1054
1065 4630
2209 4684
3859 144
3394 4401
8 3093
2884 2956
4540 3380
2990 4242
3012 2419
328 4305
55 3526
1720 915
343 2864
4421 763
82 4304
2233 904...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4994
46 2435
4373 1054
1065 4630
2209 4684
3859 144
3394 4401
8 3093
2884 2956
4540 3380
2990 4242
3012 2419
328 4305
55 3526
1720 915
343 2864
4421 763
82 4304
2233 904...

output:

2
4994 4242
1 1496
2 1791
2 4686
3 4243
4 1190
4 1992
6 3409
8 3093
12 1233
12 4777
13 2438
14 4880
15 3610
16 2461
16 3081
16 3104
17 981
17 1802
17 2056
17 4583
19 1627
21 774
21 3174
21 3267
22 1803
23 786
24 1592
25 3246
27 1993
27 2422
27 2858
27 3206
27 3589
27 4706
28 4640
29 620
29 1184
29 4...

input:

2
4994 4242
1 1496
2 1791
2 4686
3 4243
4 1190
4 1992
6 3409
8 3093
12 1233
12 4777
13 2438
14 4880
15 3610
16 2461
16 3081
16 3104
17 981
17 1802
17 2056
17 4583
19 1627
21 774
21 3174
21 3267
22 1803
23 786
24 1592
25 3246
27 1993
27 2422
27 2858
27 3206
27 3589
27 4706
28 4640
29 620
29 1184
29 4...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
16602378

Test #16:

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

input:

3
13129243

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4994
46 2435
4373 1054
1065 687
2209 4684
3859 144
3394 4401
8 3093
2884 2956
4540 3380
2990 4242
3012 2419
328 4305
55 3526
1720 915
343 2864
4421 763
82 4304
2233 904
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4994
46 2435
4373 1054
1065 687
2209 4684
3859 144
3394 4401
8 3093
2884 2956
4540 3380
2990 4242
3012 2419
328 4305
55 3526
1720 915
343 2864
4421 763
82 4304
2233 904
...

output:

4
4994 2497
1 1496
2 1791
2 4686
4 1190
6 3409
7 4605
8 3093
9 3992
10 4923
11 3802
12 1233
12 4777
13 2438
14 4880
15 3610
18 1498
19 1627
21 774
21 3174
21 3267
22 1803
23 786
24 4578
25 3246
26 533
28 4640
29 186
29 2799
30 2360
31 1887
31 2717
32 1695
32 4970
33 1930
34 4079
34 4256
40 1831
42 1...

input:

4
4994 2497
1 1496
2 1791
2 4686
4 1190
6 3409
7 4605
8 3093
9 3992
10 4923
11 3802
12 1233
12 4777
13 2438
14 4880
15 3610
18 1498
19 1627
21 774
21 3174
21 3267
22 1803
23 786
24 4578
25 3246
26 533
28 4640
29 186
29 2799
30 2360
31 1887
31 2717
32 1695
32 4970
33 1930
34 4079
34 4256
40 1831
42 1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
13129243

Test #17:

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

input:

3
7892141

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4994
46 2435
4373 3192
1065 4630
2209 4684
3859 144
3394 4401
8 3093
2884 2956
4540 3380
2990 4242
3012 2419
328 4305
55 3526
1720 3551
343 2864
4421 2543
82 4304
2233 9...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4994
46 2435
4373 3192
1065 4630
2209 4684
3859 144
3394 4401
8 3093
2884 2956
4540 3380
2990 4242
3012 2419
328 4305
55 3526
1720 3551
343 2864
4421 2543
82 4304
2233 9...

output:

4
4994 2497
2 1791
2 4686
4 1190
6 3409
7 4605
8 3093
9 3992
10 4923
11 3802
12 1233
12 4777
13 2438
14 4880
15 3610
16 176
16 3081
16 3104
18 1498
19 1627
21 774
21 3174
21 3267
22 1803
23 786
24 1592
24 4578
25 3246
26 533
30 2360
31 1887
31 2624
31 2717
32 1695
32 3164
33 1930
34 4079
34 4256
40 ...

input:

4
4994 2497
2 1791
2 4686
4 1190
6 3409
7 4605
8 3093
9 3992
10 4923
11 3802
12 1233
12 4777
13 2438
14 4880
15 3610
16 176
16 3081
16 3104
18 1498
19 1627
21 774
21 3174
21 3267
22 1803
23 786
24 1592
24 4578
25 3246
26 533
30 2360
31 1887
31 2624
31 2717
32 1695
32 3164
33 1930
34 4079
34 4256
40 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
7892140

Subtask #3:

score: 0
Wrong Answer

Test #25:

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

input:

1
355365355024496523

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4994
46 2435
4373 1054
1065 687
2209 4684
3859 144
3394 4226
8 3093
2884 4173
4540 4003
2990 4242
3012 809
328 4305
55 751
1720 915
343 3375
4421 763
82 3286
2233 904
43...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4994
46 2435
4373 1054
1065 687
2209 4684
3859 144
3394 4226
8 3093
2884 4173
4540 4003
2990 4242
3012 809
328 4305
55 751
1720 915
343 3375
4421 763
82 3286
2233 904
43...

output:

2
4994 4242
1 1496
2 4686
3 4243
4 1992
6 2363
6 2614
8 3093
12 199
12 4777
13 274
14 1474
14 4880
15 3005
16 2461
16 3081
16 3104
17 557
17 981
17 1802
17 4583
19 1627
21 78
21 214
21 774
21 3174
21 3267
22 4367
23 3514
24 960
24 1263
24 1592
25 37
25 4978
27 2422
27 3128
27 3206
27 3589
27 4706
28...

input:

2
4994 4242
1 1496
2 4686
3 4243
4 1992
6 2363
6 2614
8 3093
12 199
12 4777
13 274
14 1474
14 4880
15 3005
16 2461
16 3081
16 3104
17 557
17 981
17 1802
17 4583
19 1627
21 78
21 214
21 774
21 3174
21 3267
22 4367
23 3514
24 960
24 1263
24 1592
25 37
25 4978
27 2422
27 3128
27 3206
27 3589
27 4706
28...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
355365355024496523

Test #26:

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

input:

1
727827999106414164

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4994
46 3042
4373 3192
1065 687
2209 3095
3859 2954
3394 4401
8 3093
2884 2956
4540 3380
2990 1703
3012 809
328 3136
55 751
1720 915
343 2864
4421 763
82 4304
2233 2255
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4994
46 3042
4373 3192
1065 687
2209 3095
3859 2954
3394 4401
8 3093
2884 2956
4540 3380
2990 1703
3012 809
328 3136
55 751
1720 915
343 2864
4421 763
82 4304
2233 2255
...

output:

2
4994 4242
1 1496
2 4295
3 4243
4 129
4 1190
6 2614
6 3409
8 3093
11 886
12 1233
12 4777
13 274
14 4880
15 3005
16 3104
16 3502
17 2056
17 2634
17 2641
19 1804
21 214
21 3174
21 3267
22 1803
23 3514
24 1592
25 37
27 658
27 754
27 1993
27 2858
27 3128
27 4119
28 4640
29 186
29 2045
29 2254
30 2360
3...

input:

2
4994 4242
1 1496
2 4295
3 4243
4 129
4 1190
6 2614
6 3409
8 3093
11 886
12 1233
12 4777
13 274
14 4880
15 3005
16 3104
16 3502
17 2056
17 2634
17 2641
19 1804
21 214
21 3174
21 3267
22 1803
23 3514
24 1592
25 37
27 658
27 754
27 1993
27 2858
27 3128
27 4119
28 4640
29 186
29 2045
29 2254
30 2360
3...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
727827999106414164

Test #27:

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

input:

1
656410143989222955

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4994
46 2435
4373 1054
1065 687
2209 3095
3859 2954
3394 4401
8 3093
2884 2956
4540 3380
2990 4242
3012 2419
328 3136
55 751
1720 3551
343 3375
4421 2543
82 4304
2233 90...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4994
46 2435
4373 1054
1065 687
2209 3095
3859 2954
3394 4401
8 3093
2884 2956
4540 3380
2990 4242
3012 2419
328 3136
55 751
1720 3551
343 3375
4421 2543
82 4304
2233 90...

output:

2
4994 4242
1 1496
2 4686
3 4243
4 1190
4 1992
6 2363
8 3093
12 199
12 4777
13 274
14 4880
15 3005
16 3502
17 1802
17 2056
17 4583
19 1627
21 78
21 774
21 3174
21 3267
22 1803
23 3514
24 1592
25 37
27 658
27 2858
27 3206
27 4706
28 4640
29 186
29 620
29 1184
29 4100
30 2360
31 1887
31 2624
31 2717
3...

input:

2
4994 4242
1 1496
2 4686
3 4243
4 1190
4 1992
6 2363
8 3093
12 199
12 4777
13 274
14 4880
15 3005
16 3502
17 1802
17 2056
17 4583
19 1627
21 78
21 774
21 3174
21 3267
22 1803
23 3514
24 1592
25 37
27 658
27 2858
27 3206
27 4706
28 4640
29 186
29 620
29 1184
29 4100
30 2360
31 1887
31 2624
31 2717
3...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
656410143989222955

Test #28:

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

input:

1
410366615149657534

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4994
46 3042
4373 1054
1065 4630
2209 4684
3859 144
3394 4226
8 3093
2884 4173
4540 4003
2990 1703
3012 2419
328 4305
55 3526
1720 3551
343 2864
4421 2543
82 3286
2233 9...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4994
46 3042
4373 1054
1065 4630
2209 4684
3859 144
3394 4226
8 3093
2884 4173
4540 4003
2990 1703
3012 2419
328 4305
55 3526
1720 3551
343 2864
4421 2543
82 3286
2233 9...

output:

2
4994 4242
1 1496
2 1791
2 4686
3 4243
4 1992
6 3409
8 3093
12 1233
12 4777
13 2438
14 4880
15 3610
16 2461
16 3081
17 557
17 1802
17 2634
17 4583
19 1627
21 214
21 774
21 3174
22 1803
23 786
24 1263
25 3246
25 4978
27 754
27 2369
27 2422
27 3206
28 4640
29 620
29 1184
29 2254
29 4100
30 2360
31 26...

input:

2
4994 4242
1 1496
2 1791
2 4686
3 4243
4 1992
6 3409
8 3093
12 1233
12 4777
13 2438
14 4880
15 3610
16 2461
16 3081
17 557
17 1802
17 2634
17 4583
19 1627
21 214
21 774
21 3174
22 1803
23 786
24 1263
25 3246
25 4978
27 754
27 2369
27 2422
27 3206
28 4640
29 620
29 1184
29 2254
29 4100
30 2360
31 26...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
410366615149657534

Test #29:

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

input:

1
298090682780948428

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4994
46 3042
4373 3192
1065 687
2209 3095
3859 144
3394 4226
8 3093
2884 4173
4540 4003
2990 1703
3012 809
328 3136
55 751
1720 915
343 2864
4421 763
82 3286
2233 2255
4...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4994
46 3042
4373 3192
1065 687
2209 3095
3859 144
3394 4226
8 3093
2884 4173
4540 4003
2990 1703
3012 809
328 3136
55 751
1720 915
343 2864
4421 763
82 3286
2233 2255
4...

output:

2
4994 4242
1 1496
2 4295
3 2256
4 129
6 2614
6 3409
8 3093
12 1233
12 4777
13 274
14 4880
15 3005
16 2461
16 3104
17 557
17 981
17 1802
17 2641
19 1627
21 214
21 3174
21 3267
22 1803
23 786
25 37
27 658
27 3128
27 3589
27 4119
27 4706
28 4640
29 186
29 2045
29 4100
30 2360
31 1495
31 2977
32 686
32...

input:

2
4994 4242
1 1496
2 4295
3 2256
4 129
6 2614
6 3409
8 3093
12 1233
12 4777
13 274
14 4880
15 3005
16 2461
16 3104
17 557
17 981
17 1802
17 2641
19 1627
21 214
21 3174
21 3267
22 1803
23 786
25 37
27 658
27 3128
27 3589
27 4119
27 4706
28 4640
29 186
29 2045
29 4100
30 2360
31 1495
31 2977
32 686
32...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
298090682780948428

Test #30:

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

input:

3
969441916331132577

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4994
46 3042
4373 3192
1065 687
2209 4684
3859 2954
3394 4401
8 3093
2884 2956
4540 4003
2990 1703
3012 2419
328 4305
55 3526
1720 915
343 3375
4421 2543
82 3286
2233 90...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4994
46 3042
4373 3192
1065 687
2209 4684
3859 2954
3394 4401
8 3093
2884 2956
4540 4003
2990 1703
3012 2419
328 4305
55 3526
1720 915
343 3375
4421 2543
82 3286
2233 90...

output:

4
4994 2497
1 1496
2 1791
3 2256
6 2363
7 4605
9 3992
10 4923
12 199
12 4777
13 2438
14 1474
14 4880
15 3610
17 2284
18 1498
20 1568
22 4367
23 786
24 960
24 4578
25 2970
25 3246
28 4640
29 186
29 3555
30 2360
31 3221
33 1930
34 927
34 4256
35 2935
36 2264
40 1586
42 1320
43 695
45 3286
46 3042
47 3...

input:

4
4994 2497
1 1496
2 1791
3 2256
6 2363
7 4605
9 3992
10 4923
12 199
12 4777
13 2438
14 1474
14 4880
15 3610
17 2284
18 1498
20 1568
22 4367
23 786
24 960
24 4578
25 2970
25 3246
28 4640
29 186
29 3555
30 2360
31 3221
33 1930
34 927
34 4256
35 2935
36 2264
40 1586
42 1320
43 695
45 3286
46 3042
47 3...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
969441916331132577

Test #31:

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

input:

3
929489812741933634

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4994
46 3042
4373 1054
1065 687
2209 3095
3859 2954
3394 4401
8 3093
2884 2956
4540 3380
2990 1703
3012 2419
328 4305
55 3526
1720 3551
343 3375
4421 763
82 3286
2233 22...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4994
46 3042
4373 1054
1065 687
2209 3095
3859 2954
3394 4401
8 3093
2884 2956
4540 3380
2990 1703
3012 2419
328 4305
55 3526
1720 3551
343 3375
4421 763
82 3286
2233 22...

output:

4
4994 2497
2 1791
3 2256
4 1190
6 2363
7 4605
8 3093
9 3992
10 4923
12 4777
13 2438
14 270
14 1474
15 3005
16 176
16 3440
21 78
21 774
22 4367
23 786
25 2970
25 4978
26 533
28 4640
30 4764
33 479
33 4539
34 927
34 4256
35 2861
36 2264
37 4785
38 2091
40 1586
42 1320
43 695
45 3286
47 3406
49 688
51...

input:

4
4994 2497
2 1791
3 2256
4 1190
6 2363
7 4605
8 3093
9 3992
10 4923
12 4777
13 2438
14 270
14 1474
15 3005
16 176
16 3440
21 78
21 774
22 4367
23 786
25 2970
25 4978
26 533
28 4640
30 4764
33 479
33 4539
34 927
34 4256
35 2861
36 2264
37 4785
38 2091
40 1586
42 1320
43 695
45 3286
47 3406
49 688
51...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
929489812741933634

Test #32:

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

input:

3
144032041325838295

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4994
46 2435
4373 1054
1065 687
2209 4684
3859 144
3394 4226
8 3093
2884 4173
4540 4003
2990 4242
3012 809
328 4305
55 3526
1720 3551
343 3375
4421 763
82 4304
2233 2255...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4994
46 2435
4373 1054
1065 687
2209 4684
3859 144
3394 4226
8 3093
2884 4173
4540 4003
2990 4242
3012 809
328 4305
55 3526
1720 3551
343 3375
4421 763
82 4304
2233 2255...

output:

4
4994 2497
1 1496
2 1791
2 4295
3 4820
6 2614
7 4605
9 1625
10 3984
11 2559
12 4777
13 2438
14 1474
15 3005
18 2369
19 1627
21 214
22 4367
23 3514
24 960
24 1263
25 2970
25 3246
25 4978
26 533
28 4640
30 4764
31 1887
33 4539
34 4079
34 4256
35 309
35 414
35 2861
36 2264
40 182
40 1586
40 1831
42 13...

input:

4
4994 2497
1 1496
2 1791
2 4295
3 4820
6 2614
7 4605
9 1625
10 3984
11 2559
12 4777
13 2438
14 1474
15 3005
18 2369
19 1627
21 214
22 4367
23 3514
24 960
24 1263
25 2970
25 3246
25 4978
26 533
28 4640
30 4764
31 1887
33 4539
34 4079
34 4256
35 309
35 414
35 2861
36 2264
40 182
40 1586
40 1831
42 13...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
144032041325838295

Test #33:

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

input:

3
832110946250826180

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4994
46 3042
4373 3192
1065 4630
2209 3095
3859 2954
3394 4401
8 3093
2884 2956
4540 4003
2990 1703
3012 809
328 4305
55 3526
1720 915
343 3375
4421 763
82 4304
2233 225...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4994
46 3042
4373 3192
1065 4630
2209 3095
3859 2954
3394 4401
8 3093
2884 2956
4540 4003
2990 1703
3012 809
328 4305
55 3526
1720 915
343 3375
4421 763
82 4304
2233 225...

output:

4
4994 2497
2 1791
3 4820
5 1373
6 2363
6 2614
7 4605
8 3093
9 1625
10 3984
11 886
12 199
12 4777
13 2438
14 4880
15 3610
16 176
16 2461
18 1498
19 1804
23 3514
25 2970
25 4978
30 2360
31 1887
31 3221
32 686
32 1695
33 479
33 1930
34 927
34 4256
36 348
37 4785
40 182
40 1831
42 2101
43 695
43 2924
4...

input:

4
4994 2497
2 1791
3 4820
5 1373
6 2363
6 2614
7 4605
8 3093
9 1625
10 3984
11 886
12 199
12 4777
13 2438
14 4880
15 3610
16 176
16 2461
18 1498
19 1804
23 3514
25 2970
25 4978
30 2360
31 1887
31 3221
32 686
32 1695
33 479
33 1930
34 927
34 4256
36 348
37 4785
40 182
40 1831
42 2101
43 695
43 2924
4...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
832110946250826176