QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#557460#8726. Magic ShowLe0Chan100 ✓2ms2020kbC++201.9kb2024-09-11 09:50:102024-09-11 09:50:10

Judging History

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

  • [2024-09-11 09:50:10]
  • 评测
  • 测评结果:100
  • 用时:2ms
  • 内存:2020kb
  • [2024-09-11 09:50:10]
  • 提交

Alice

#include <bits/stdc++.h>
using namespace std;
#include "Alice.h"
#define LL long long
#define pii pair<int,int>
#define fi first 
#define se second
std::vector<std::pair<int, int>> Alice();
long long setN(int n);
const int N=5003;
int bel[N];
mt19937 rd(0x2477264);
mt19937_64 rad(0x20333ac);
vector<pii> Alice(){
    int n=4943;
    LL V=setN(4943);
	V^=rad()%(LL)(1e17);
    // LL V=4004;
    vector<pii> as;
    as.push_back({1,2});
    for(int l=3;l<=4943;l+=61){
        int now=l;
        for(int i=0;i<=60;i++){
            // cout<<now<<" ";
            bel[now]=i;
            now++;
        }
        // cout<<'\n';
    }
    shuffle(bel+3,bel+1+n,rd);
    // for(int i=3;i<=n;i++) cout<<bel[i]<<" ";cout<<'\n';
    for(int i=3;i<=n;i++){
        if(V&(1ll<<bel[i])) as.push_back({i,i-2});
        else as.push_back({i,i-1});
    }
    return as;
}
// int main(){
//     Alice();return 0;
// }

Bob

#include <bits/stdc++.h>
#include "Bob.h"
using namespace std;
#define LL long long
#define pii pair<int,int>
#define fi first 
#define se second
long long Bob(std::vector<std::pair<int, int>> V);
const int N=5e3+5;
bool vis[N];
int fa[N],ans[N],bel[N];
int n=4943;
vector<int> g[N];
void add(int x,int y){g[x].push_back(y);}
mt19937 rd(0x2477264);
mt19937_64 rad(0x20333ac);
LL Bob(vector<pii> as){
    for(auto [x,y]:as){
        if(x<y) fa[y]=x;
        else fa[x]=y;
    }
    for(int l=3;l<=n;l+=61){
        int now=l;
        for(int j=0;j<=60;j++){
            bel[now]=j;
            now++;
        }
    }
    shuffle(bel+3,bel+1+n,rd);
    // for(int i=3;i<=n;i++) cout<<bel[i]<<" ";cout<<'\n';
    LL rs=0;
    for(int i=3;i<=n;i++){
        if(fa[i]) ans[bel[i]]=i-fa[i]-1;
    }
    for(int j=0;j<=60;j++) if(ans[j]) rs+=1ll<<j;
    return rs^(rad()%(LL)(1e17));
}
// int main(){
//     Bob(vector<pii>());
//     return 0;
// }

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 5
Accepted

Test #1:

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

input:

1
4005

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4943
1 2
3 1
4 2
5 4
6 4
7 6
8 7
9 7
10 9
11 9
12 10
13 11
14 13
15 13
16 14
17 15
18 17
19 17
20 18
21 20
22 20
23 22
24 22
25 24
26 25
27 26
28 26
29 28
30 28
31 29
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4943
1 2
3 1
4 2
5 4
6 4
7 6
8 7
9 7
10 9
11 9
12 10
13 11
14 13
15 13
16 14
17 15
18 17
19 17
20 18
21 20
22 20
23 22
24 22
25 24
26 25
27 26
28 26
29 28
30 28
31 29
32...

output:

2
4943 4907
1 2
1 3
2 4
4 5
4 6
6 7
7 8
7 9
9 10
9 11
10 12
11 13
13 14
13 15
14 16
15 17
17 18
17 19
18 20
20 21
20 22
22 23
22 24
24 25
25 26
26 27
26 28
28 29
28 30
29 31
31 32
31 33
32 34
33 35
34 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
42 44
43 45
44 46
46 47
46 48
48 49
49 50
50 51
50 52
...

input:

2
4943 4907
1 2
1 3
2 4
4 5
4 6
6 7
7 8
7 9
9 10
9 11
10 12
11 13
13 14
13 15
14 16
15 17
17 18
17 19
18 20
20 21
20 22
22 23
22 24
24 25
25 26
26 27
26 28
28 29
28 30
29 31
31 32
31 33
32 34
33 35
34 36
36 37
37 38
38 39
39 40
40 41
41 42
42 43
42 44
43 45
44 46
46 47
46 48
48 49
49 50
50 51
50 52
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4005

Test #2:

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

input:

1
459

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4943
1 2
3 1
4 2
5 4
6 4
7 5
8 7
9 7
10 8
11 9
12 10
13 11
14 13
15 13
16 14
17 15
18 16
19 18
20 18
21 19
22 20
23 21
24 22
25 24
26 25
27 26
28 26
29 28
30 28
31 29
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4943
1 2
3 1
4 2
5 4
6 4
7 5
8 7
9 7
10 8
11 9
12 10
13 11
14 13
15 13
16 14
17 15
18 16
19 18
20 18
21 19
22 20
23 21
24 22
25 24
26 25
27 26
28 26
29 28
30 28
31 29
32...

output:

2
4943 4907
1 2
1 3
2 4
4 5
4 6
5 7
7 8
7 9
8 10
9 11
10 12
11 13
13 14
13 15
14 16
15 17
16 18
18 19
18 20
19 21
20 22
21 23
22 24
24 25
25 26
26 27
26 28
28 29
28 30
29 31
31 32
31 33
32 34
33 35
34 36
35 37
37 38
38 39
38 40
40 41
41 42
42 43
43 44
44 45
44 46
46 47
47 48
48 49
48 50
50 51
50 52
...

input:

2
4943 4907
1 2
1 3
2 4
4 5
4 6
5 7
7 8
7 9
8 10
9 11
10 12
11 13
13 14
13 15
14 16
15 17
16 18
18 19
18 20
19 21
20 22
21 23
22 24
24 25
25 26
26 27
26 28
28 29
28 30
29 31
31 32
31 33
32 34
33 35
34 36
35 37
37 38
38 39
38 40
40 41
41 42
42 43
43 44
44 45
44 46
46 47
47 48
48 49
48 50
50 51
50 52
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
459

Test #3:

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

input:

1
2495

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4943
1 2
3 1
4 2
5 4
6 4
7 6
8 7
9 7
10 8
11 9
12 10
13 11
14 13
15 13
16 14
17 15
18 17
19 18
20 18
21 19
22 20
23 21
24 22
25 24
26 25
27 26
28 26
29 28
30 28
31 29
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4943
1 2
3 1
4 2
5 4
6 4
7 6
8 7
9 7
10 8
11 9
12 10
13 11
14 13
15 13
16 14
17 15
18 17
19 18
20 18
21 19
22 20
23 21
24 22
25 24
26 25
27 26
28 26
29 28
30 28
31 29
32...

output:

2
4943 4907
1 2
1 3
2 4
4 5
4 6
6 7
7 8
7 9
8 10
9 11
10 12
11 13
13 14
13 15
14 16
15 17
17 18
18 19
18 20
19 21
20 22
21 23
22 24
24 25
25 26
26 27
26 28
28 29
28 30
29 31
31 32
31 33
32 34
33 35
34 36
36 37
37 38
38 39
38 40
40 41
41 42
41 43
43 44
43 45
44 46
46 47
47 48
48 49
48 50
50 51
50 52
...

input:

2
4943 4907
1 2
1 3
2 4
4 5
4 6
6 7
7 8
7 9
8 10
9 11
10 12
11 13
13 14
13 15
14 16
15 17
17 18
18 19
18 20
19 21
20 22
21 23
22 24
24 25
25 26
26 27
26 28
28 29
28 30
29 31
31 32
31 33
32 34
33 35
34 36
36 37
37 38
38 39
38 40
40 41
41 42
41 43
43 44
43 45
44 46
46 47
47 48
48 49
48 50
50 51
50 52
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
2495

Test #4:

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

input:

3
1560

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4943
1 2
3 1
4 2
5 4
6 4
7 5
8 7
9 7
10 9
11 9
12 11
13 11
14 13
15 13
16 14
17 15
18 16
19 17
20 18
21 20
22 20
23 22
24 22
25 24
26 25
27 26
28 27
29 28
30 28
31 30
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4943
1 2
3 1
4 2
5 4
6 4
7 5
8 7
9 7
10 9
11 9
12 11
13 11
14 13
15 13
16 14
17 15
18 16
19 17
20 18
21 20
22 20
23 22
24 22
25 24
26 25
27 26
28 27
29 28
30 28
31 30
32...

output:

4
4943 2472
1 2
1 3
2 4
4 5
4 6
14 16
15 17
16 18
17 19
24 25
25 26
26 27
30 31
33 35
34 36
35 37
37 38
38 39
39 40
44 46
46 47
47 48
48 49
49 50
50 51
58 60
69 71
75 77
76 78
77 79
78 80
79 81
80 82
92 93
98 99
99 100
102 104
109 111
110 112
111 113
112 114
113 115
120 121
125 127
126 128
127 129
1...

input:

4
4943 2472
1 2
1 3
2 4
4 5
4 6
14 16
15 17
16 18
17 19
24 25
25 26
26 27
30 31
33 35
34 36
35 37
37 38
38 39
39 40
44 46
46 47
47 48
48 49
49 50
50 51
58 60
69 71
75 77
76 78
77 79
78 80
79 81
80 82
92 93
98 99
99 100
102 104
109 111
110 112
111 113
112 114
113 115
120 121
125 127
126 128
127 129
1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1560

Test #5:

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

input:

3
3594

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4943
1 2
3 1
4 2
5 4
6 4
7 6
8 7
9 7
10 8
11 9
12 11
13 11
14 13
15 13
16 14
17 15
18 16
19 17
20 18
21 19
22 20
23 21
24 22
25 24
26 25
27 26
28 27
29 28
30 28
31 30
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4943
1 2
3 1
4 2
5 4
6 4
7 6
8 7
9 7
10 8
11 9
12 11
13 11
14 13
15 13
16 14
17 15
18 16
19 17
20 18
21 19
22 20
23 21
24 22
25 24
26 25
27 26
28 27
29 28
30 28
31 30
32...

output:

4
4943 2472
1 2
1 3
2 4
4 5
4 6
8 10
14 16
15 17
16 18
17 19
18 20
19 21
20 22
21 23
22 24
24 25
25 26
26 27
30 31
33 35
34 36
36 37
40 41
41 42
44 46
46 47
47 48
48 49
49 50
50 51
58 60
59 61
61 62
62 63
69 71
75 77
76 78
77 79
78 80
79 81
80 82
82 83
83 84
92 93
98 99
99 100
102 104
112 114
113 11...

input:

4
4943 2472
1 2
1 3
2 4
4 5
4 6
8 10
14 16
15 17
16 18
17 19
18 20
19 21
20 22
21 23
22 24
24 25
25 26
26 27
30 31
33 35
34 36
36 37
40 41
41 42
44 46
46 47
47 48
48 49
49 50
50 51
58 60
59 61
61 62
62 63
69 71
75 77
76 78
77 79
78 80
79 81
80 82
82 83
83 84
92 93
98 99
99 100
102 104
112 114
113 11...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
3594

Test #6:

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

input:

3
1750

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4943
1 2
3 1
4 2
5 4
6 4
7 5
8 7
9 7
10 8
11 9
12 11
13 11
14 13
15 13
16 14
17 15
18 16
19 17
20 18
21 19
22 20
23 21
24 22
25 24
26 25
27 26
28 27
29 28
30 28
31 30
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4943
1 2
3 1
4 2
5 4
6 4
7 5
8 7
9 7
10 8
11 9
12 11
13 11
14 13
15 13
16 14
17 15
18 16
19 17
20 18
21 19
22 20
23 21
24 22
25 24
26 25
27 26
28 27
29 28
30 28
31 30
32...

output:

4
4943 2472
1 2
1 3
2 4
4 5
4 6
8 10
14 16
15 17
16 18
17 19
18 20
19 21
20 22
21 23
22 24
24 25
25 26
26 27
30 31
33 35
34 36
35 37
48 49
49 50
50 51
69 71
77 79
78 80
79 81
80 82
92 93
102 104
109 111
110 112
111 113
112 114
113 115
117 119
118 120
120 121
125 127
126 128
130 132
132 133
133 134
1...

input:

4
4943 2472
1 2
1 3
2 4
4 5
4 6
8 10
14 16
15 17
16 18
17 19
18 20
19 21
20 22
21 23
22 24
24 25
25 26
26 27
30 31
33 35
34 36
35 37
48 49
49 50
50 51
69 71
77 79
78 80
79 81
80 82
92 93
102 104
109 111
110 112
111 113
112 114
113 115
117 119
118 120
120 121
125 127
126 128
130 132
132 133
133 134
1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1750

Test #7:

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

input:

5
4878

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4943
1 2
3 1
4 2
5 4
6 5
7 5
8 7
9 7
10 8
11 9
12 10
13 11
14 13
15 13
16 14
17 15
18 16
19 18
20 18
21 19
22 20
23 21
24 22
25 24
26 25
27 26
28 27
29 28
30 28
31 29
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4943
1 2
3 1
4 2
5 4
6 5
7 5
8 7
9 7
10 8
11 9
12 10
13 11
14 13
15 13
16 14
17 15
18 16
19 18
20 18
21 19
22 20
23 21
24 22
25 24
26 25
27 26
28 27
29 28
30 28
31 29
32...

output:

6
4943 2501
1 3
2 4
5 6
5 7
8 10
9 11
13 14
13 15
16 18
19 21
20 22
24 25
26 27
28 29
28 30
31 32
31 33
34 36
35 37
38 39
38 40
41 42
43 44
43 45
46 47
48 49
50 51
50 52
54 55
54 56
57 58
57 59
61 62
63 64
66 67
66 68
69 71
72 74
76 77
76 78
79 81
80 82
83 84
85 86
85 87
88 89
88 90
92 93
94 95
94 9...

input:

6
4943 2501
1 3
2 4
5 6
5 7
8 10
9 11
13 14
13 15
16 18
19 21
20 22
24 25
26 27
28 29
28 30
31 32
31 33
34 36
35 37
38 39
38 40
41 42
43 44
43 45
46 47
48 49
50 51
50 52
54 55
54 56
57 58
57 59
61 62
63 64
66 67
66 68
69 71
72 74
76 77
76 78
79 81
80 82
83 84
85 86
85 87
88 89
88 90
92 93
94 95
94 9...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4878

Test #8:

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

input:

5
1223

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4943
1 2
3 1
4 2
5 4
6 4
7 5
8 7
9 7
10 8
11 9
12 11
13 11
14 13
15 13
16 14
17 15
18 16
19 17
20 18
21 19
22 20
23 21
24 22
25 24
26 25
27 26
28 26
29 28
30 28
31 30
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4943
1 2
3 1
4 2
5 4
6 4
7 5
8 7
9 7
10 8
11 9
12 11
13 11
14 13
15 13
16 14
17 15
18 16
19 17
20 18
21 19
22 20
23 21
24 22
25 24
26 25
27 26
28 26
29 28
30 28
31 30
32...

output:

6
4943 2485
1 2
4 5
4 6
7 8
7 9
11 12
11 13
14 16
15 17
18 20
19 21
22 24
25 26
28 29
28 30
31 32
33 35
34 36
37 38
40 41
42 43
42 44
46 47
46 48
50 51
52 53
52 54
56 57
59 60
59 61
62 63
64 65
64 66
68 69
68 70
71 72
74 75
74 76
77 79
78 80
82 83
84 85
87 88
89 91
90 92
93 94
96 97
96 98
99 100
99 ...

input:

6
4943 2485
1 2
4 5
4 6
7 8
7 9
11 12
11 13
14 16
15 17
18 20
19 21
22 24
25 26
28 29
28 30
31 32
33 35
34 36
37 38
40 41
42 43
42 44
46 47
46 48
50 51
52 53
52 54
56 57
59 60
59 61
62 63
64 65
64 66
68 69
68 70
71 72
74 75
74 76
77 79
78 80
82 83
84 85
87 88
89 91
90 92
93 94
96 97
96 98
99 100
99 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1223

Test #9:

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

input:

5
648

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4943
1 2
3 1
4 2
5 4
6 4
7 5
8 7
9 7
10 9
11 9
12 11
13 11
14 13
15 13
16 14
17 15
18 16
19 18
20 18
21 20
22 20
23 22
24 22
25 24
26 25
27 26
28 27
29 28
30 28
31 30
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4943
1 2
3 1
4 2
5 4
6 4
7 5
8 7
9 7
10 9
11 9
12 11
13 11
14 13
15 13
16 14
17 15
18 16
19 18
20 18
21 20
22 20
23 22
24 22
25 24
26 25
27 26
28 27
29 28
30 28
31 30
32...

output:

6
4943 2489
1 2
4 5
4 6
7 8
7 9
11 12
11 13
14 16
15 17
18 19
18 20
22 23
22 24
25 26
27 28
30 31
32 33
32 34
35 37
38 39
40 41
42 43
44 46
47 48
49 50
51 52
54 55
54 56
57 58
57 59
61 62
63 64
66 67
66 68
69 71
72 73
72 74
75 77
76 78
79 81
80 82
83 84
85 86
85 87
88 89
88 90
92 93
94 95
94 96
98 9...

input:

6
4943 2489
1 2
4 5
4 6
7 8
7 9
11 12
11 13
14 16
15 17
18 19
18 20
22 23
22 24
25 26
27 28
30 31
32 33
32 34
35 37
38 39
40 41
42 43
44 46
47 48
49 50
51 52
54 55
54 56
57 58
57 59
61 62
63 64
66 67
66 68
69 71
72 73
72 74
75 77
76 78
79 81
80 82
83 84
85 86
85 87
88 89
88 90
92 93
94 95
94 96
98 9...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
648

Test #10:

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

input:

7
4475

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4943
1 2
3 1
4 2
5 4
6 5
7 5
8 7
9 7
10 8
11 9
12 10
13 11
14 13
15 13
16 14
17 15
18 17
19 18
20 18
21 19
22 20
23 21
24 22
25 24
26 25
27 26
28 26
29 28
30 28
31 29
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4943
1 2
3 1
4 2
5 4
6 5
7 5
8 7
9 7
10 8
11 9
12 10
13 11
14 13
15 13
16 14
17 15
18 17
19 18
20 18
21 19
22 20
23 21
24 22
25 24
26 25
27 26
28 26
29 28
30 28
31 29
32...

output:

8
4943 2472
4 5
7 8
7 9
9 11
11 13
13 14
13 15
17 18
18 19
18 20
25 26
28 29
29 31
31 32
31 33
33 35
37 38
38 40
40 41
41 43
43 44
44 46
47 48
50 51
50 52
55 56
56 57
61 63
63 64
66 67
66 68
69 71
71 72
72 74
74 75
74 76
75 77
78 80
80 82
82 83
85 87
87 88
88 89
88 90
93 94
96 98
99 100
100 101
101 ...

input:

8
4943 2472
4 5
7 8
7 9
9 11
11 13
13 14
13 15
17 18
18 19
18 20
25 26
28 29
29 31
31 32
31 33
33 35
37 38
38 40
40 41
41 43
43 44
44 46
47 48
50 51
50 52
55 56
56 57
61 63
63 64
66 67
66 68
69 71
71 72
72 74
74 75
74 76
75 77
78 80
80 82
82 83
85 87
87 88
88 89
88 90
93 94
96 98
99 100
100 101
101 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4475

Test #11:

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

input:

7
4240

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4943
1 2
3 1
4 2
5 4
6 5
7 5
8 7
9 7
10 9
11 9
12 11
13 11
14 13
15 13
16 14
17 15
18 16
19 18
20 18
21 20
22 20
23 22
24 22
25 24
26 25
27 26
28 27
29 28
30 28
31 30
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4943
1 2
3 1
4 2
5 4
6 5
7 5
8 7
9 7
10 9
11 9
12 11
13 11
14 13
15 13
16 14
17 15
18 16
19 18
20 18
21 20
22 20
23 22
24 22
25 24
26 25
27 26
28 27
29 28
30 28
31 30
32...

output:

8
4943 2472
4 5
13 14
13 15
16 18
22 24
26 27
27 28
28 30
31 32
32 33
32 34
33 35
40 41
41 42
41 43
42 44
44 46
48 50
50 51
51 52
54 56
56 57
57 58
57 59
59 61
61 63
63 64
68 69
69 71
71 72
74 75
74 76
80 82
82 83
85 87
87 88
90 92
93 94
96 98
98 99
101 102
101 103
103 105
105 106
106 108
108 109
10...

input:

8
4943 2472
4 5
13 14
13 15
16 18
22 24
26 27
27 28
28 30
31 32
32 33
32 34
33 35
40 41
41 42
41 43
42 44
44 46
48 50
50 51
51 52
54 56
56 57
57 58
57 59
59 61
61 63
63 64
68 69
69 71
71 72
74 75
74 76
80 82
82 83
85 87
87 88
90 92
93 94
96 98
98 99
101 102
101 103
103 105
105 106
106 108
108 109
10...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4240

Test #12:

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

input:

7
1291

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4943
1 2
3 1
4 2
5 4
6 4
7 5
8 7
9 7
10 8
11 9
12 10
13 11
14 13
15 13
16 14
17 15
18 16
19 17
20 18
21 19
22 20
23 21
24 22
25 24
26 25
27 26
28 26
29 28
30 28
31 29
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4943
1 2
3 1
4 2
5 4
6 4
7 5
8 7
9 7
10 8
11 9
12 10
13 11
14 13
15 13
16 14
17 15
18 16
19 17
20 18
21 19
22 20
23 21
24 22
25 24
26 25
27 26
28 26
29 28
30 28
31 29
32...

output:

8
4943 2472
1 2
2 4
4 5
5 7
7 8
7 9
11 13
13 14
13 15
14 16
18 20
25 26
28 29
29 31
31 32
31 33
33 35
37 38
38 40
41 42
42 43
43 44
47 48
50 51
50 52
52 54
54 56
56 57
57 58
57 59
63 64
66 67
66 68
69 71
71 72
72 74
74 75
74 76
80 82
82 83
83 84
84 85
85 87
87 88
88 89
88 90
93 94
96 98
99 100
100 1...

input:

8
4943 2472
1 2
2 4
4 5
5 7
7 8
7 9
11 13
13 14
13 15
14 16
18 20
25 26
28 29
29 31
31 32
31 33
33 35
37 38
38 40
41 42
42 43
43 44
47 48
50 51
50 52
52 54
54 56
56 57
57 58
57 59
63 64
66 67
66 68
69 71
71 72
72 74
74 75
74 76
80 82
82 83
83 84
84 85
85 87
87 88
88 89
88 90
93 94
96 98
99 100
100 1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1291

Subtask #2:

score: 30
Accepted

Test #13:

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

input:

1
17476204

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4943
1 2
3 1
4 2
5 4
6 4
7 6
8 7
9 7
10 9
11 9
12 11
13 11
14 13
15 13
16 14
17 15
18 17
19 18
20 18
21 20
22 20
23 22
24 22
25 24
26 25
27 26
28 27
29 28
30 28
31 30
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4943
1 2
3 1
4 2
5 4
6 4
7 6
8 7
9 7
10 9
11 9
12 11
13 11
14 13
15 13
16 14
17 15
18 17
19 18
20 18
21 20
22 20
23 22
24 22
25 24
26 25
27 26
28 27
29 28
30 28
31 30
32...

output:

2
4943 2632
4 5
4 6
7 8
9 11
13 15
15 17
20 22
22 24
24 25
25 26
26 27
27 28
28 30
31 32
32 33
33 35
34 36
37 38
40 41
40 42
43 44
44 45
45 47
47 48
47 49
49 50
52 54
55 56
59 61
61 62
64 66
66 68
68 70
72 73
74 76
76 78
77 79
80 81
83 84
84 86
85 87
87 88
88 89
90 91
90 92
93 94
94 95
94 96
96 98
1...

input:

2
4943 2632
4 5
4 6
7 8
9 11
13 15
15 17
20 22
22 24
24 25
25 26
26 27
27 28
28 30
31 32
32 33
33 35
34 36
37 38
40 41
40 42
43 44
44 45
45 47
47 48
47 49
49 50
52 54
55 56
59 61
61 62
64 66
66 68
68 70
72 73
74 76
76 78
77 79
80 81
83 84
84 86
85 87
87 88
88 89
90 91
90 92
93 94
94 95
94 96
96 98
1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
17476204

Test #14:

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

input:

1
11926600

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4943
1 2
3 1
4 2
5 4
6 5
7 6
8 7
9 7
10 9
11 9
12 11
13 11
14 13
15 13
16 14
17 15
18 16
19 17
20 18
21 20
22 20
23 22
24 22
25 24
26 25
27 26
28 27
29 28
30 28
31 30
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4943
1 2
3 1
4 2
5 4
6 5
7 6
8 7
9 7
10 9
11 9
12 11
13 11
14 13
15 13
16 14
17 15
18 16
19 17
20 18
21 20
22 20
23 22
24 22
25 24
26 25
27 26
28 27
29 28
30 28
31 30
32...

output:

2
4943 2632
4 5
5 6
7 8
9 11
13 15
15 17
20 22
22 24
24 25
25 26
26 27
27 28
28 30
31 32
32 33
33 35
34 36
37 38
40 41
41 42
43 44
44 45
46 47
47 48
48 49
48 50
53 54
54 56
59 61
61 62
64 66
66 68
68 70
72 73
74 76
76 78
77 79
79 81
83 84
85 86
85 87
87 88
88 89
90 91
90 92
93 94
94 95
95 96
96 98
1...

input:

2
4943 2632
4 5
5 6
7 8
9 11
13 15
15 17
20 22
22 24
24 25
25 26
26 27
27 28
28 30
31 32
32 33
33 35
34 36
37 38
40 41
41 42
43 44
44 45
46 47
47 48
48 49
48 50
53 54
54 56
59 61
61 62
64 66
66 68
68 70
72 73
74 76
76 78
77 79
79 81
83 84
85 86
85 87
87 88
88 89
90 91
90 92
93 94
94 95
95 96
96 98
1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
11926600

Test #15:

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

input:

1
16602378

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4943
1 2
3 1
4 2
5 3
6 5
7 5
8 7
9 7
10 8
11 9
12 10
13 11
14 13
15 13
16 14
17 15
18 16
19 17
20 18
21 19
22 20
23 21
24 22
25 24
26 25
27 26
28 27
29 28
30 28
31 29
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4943
1 2
3 1
4 2
5 3
6 5
7 5
8 7
9 7
10 8
11 9
12 10
13 11
14 13
15 13
16 14
17 15
18 16
19 17
20 18
21 19
22 20
23 21
24 22
25 24
26 25
27 26
28 27
29 28
30 28
31 29
32...

output:

2
4943 2632
3 5
5 6
7 8
9 11
13 15
15 17
20 22
22 24
24 25
25 26
26 27
27 28
28 30
31 32
31 33
33 35
34 36
37 38
40 41
40 42
43 44
43 45
46 47
47 48
48 49
48 50
53 54
54 56
59 61
61 62
64 66
66 68
68 70
71 73
74 76
76 78
77 79
79 81
83 84
85 86
85 87
87 88
88 89
90 91
90 92
93 94
94 95
95 96
96 98
1...

input:

2
4943 2632
3 5
5 6
7 8
9 11
13 15
15 17
20 22
22 24
24 25
25 26
26 27
27 28
28 30
31 32
31 33
33 35
34 36
37 38
40 41
40 42
43 44
43 45
46 47
47 48
48 49
48 50
53 54
54 56
59 61
61 62
64 66
66 68
68 70
71 73
74 76
76 78
77 79
79 81
83 84
85 86
85 87
87 88
88 89
90 91
90 92
93 94
94 95
95 96
96 98
1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
16602378

Test #16:

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

input:

3
13129243

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4943
1 2
3 1
4 2
5 3
6 5
7 5
8 7
9 7
10 8
11 9
12 11
13 11
14 13
15 13
16 14
17 15
18 16
19 17
20 18
21 19
22 20
23 21
24 22
25 24
26 25
27 26
28 26
29 28
30 28
31 30
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4943
1 2
3 1
4 2
5 3
6 5
7 5
8 7
9 7
10 8
11 9
12 11
13 11
14 13
15 13
16 14
17 15
18 16
19 17
20 18
21 19
22 20
23 21
24 22
25 24
26 25
27 26
28 26
29 28
30 28
31 30
32...

output:

4
4943 2472
1 2
1 3
2 4
3 5
5 6
5 7
8 10
14 16
15 17
16 18
17 19
18 20
19 21
20 22
21 23
22 24
24 25
30 31
33 35
34 36
35 37
44 46
46 47
47 48
48 49
49 50
50 51
58 60
69 71
75 77
76 78
77 79
78 80
79 81
80 82
89 91
90 92
92 93
93 94
94 95
102 104
109 111
110 112
114 116
115 117
119 121
125 127
126 1...

input:

4
4943 2472
1 2
1 3
2 4
3 5
5 6
5 7
8 10
14 16
15 17
16 18
17 19
18 20
19 21
20 22
21 23
22 24
24 25
30 31
33 35
34 36
35 37
44 46
46 47
47 48
48 49
49 50
50 51
58 60
69 71
75 77
76 78
77 79
78 80
79 81
80 82
89 91
90 92
92 93
93 94
94 95
102 104
109 111
110 112
114 116
115 117
119 121
125 127
126 1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
13129243

Test #17:

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

input:

3
7892141

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4943
1 2
3 1
4 2
5 3
6 4
7 6
8 7
9 7
10 9
11 9
12 11
13 11
14 13
15 13
16 14
17 15
18 17
19 17
20 18
21 20
22 20
23 22
24 22
25 24
26 25
27 26
28 26
29 28
30 28
31 30
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4943
1 2
3 1
4 2
5 3
6 4
7 6
8 7
9 7
10 9
11 9
12 11
13 11
14 13
15 13
16 14
17 15
18 17
19 17
20 18
21 20
22 20
23 22
24 22
25 24
26 25
27 26
28 26
29 28
30 28
31 30
32...

output:

4
4943 2472
1 2
1 3
2 4
3 5
4 6
6 7
7 8
7 9
14 16
24 25
30 31
33 35
34 36
36 37
37 38
38 39
44 46
46 47
50 51
51 52
52 53
53 54
54 55
55 56
58 60
59 61
61 62
62 63
65 67
69 71
77 79
81 83
83 84
87 88
90 92
92 93
115 117
119 121
125 127
129 131
130 132
132 133
133 134
136 138
137 139
138 140
145 147
...

input:

4
4943 2472
1 2
1 3
2 4
3 5
4 6
6 7
7 8
7 9
14 16
24 25
30 31
33 35
34 36
36 37
37 38
38 39
44 46
46 47
50 51
51 52
52 53
53 54
54 55
55 56
58 60
59 61
61 62
62 63
65 67
69 71
77 79
81 83
83 84
87 88
90 92
92 93
115 117
119 121
125 127
129 131
130 132
132 133
133 134
136 138
137 139
138 140
145 147
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
7892141

Test #18:

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

input:

3
21314775

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4943
1 2
3 1
4 2
5 3
6 5
7 6
8 7
9 7
10 8
11 9
12 11
13 11
14 13
15 13
16 14
17 15
18 16
19 17
20 18
21 19
22 20
23 21
24 22
25 24
26 25
27 26
28 26
29 28
30 28
31 30
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4943
1 2
3 1
4 2
5 3
6 5
7 6
8 7
9 7
10 8
11 9
12 11
13 11
14 13
15 13
16 14
17 15
18 16
19 17
20 18
21 19
22 20
23 21
24 22
25 24
26 25
27 26
28 26
29 28
30 28
31 30
32...

output:

4
4943 2472
1 2
1 3
2 4
3 5
5 6
6 7
7 8
7 9
8 10
14 16
15 17
16 18
17 19
18 20
19 21
20 22
21 23
22 24
24 25
30 31
33 35
34 36
36 37
42 44
44 45
47 49
48 50
50 51
69 71
71 72
72 73
77 79
78 80
79 81
80 82
84 86
85 87
87 88
90 92
92 93
97 99
98 100
115 117
116 118
117 119
118 120
119 121
125 127
126 ...

input:

4
4943 2472
1 2
1 3
2 4
3 5
5 6
6 7
7 8
7 9
8 10
14 16
15 17
16 18
17 19
18 20
19 21
20 22
21 23
22 24
24 25
30 31
33 35
34 36
36 37
42 44
44 45
47 49
48 50
50 51
69 71
71 72
72 73
77 79
78 80
79 81
80 82
84 86
85 87
87 88
90 92
92 93
97 99
98 100
115 117
116 118
117 119
118 120
119 121
125 127
126 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
21314775

Test #19:

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

input:

5
5559540

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4943
1 2
3 1
4 2
5 3
6 5
7 5
8 7
9 7
10 9
11 9
12 11
13 11
14 13
15 13
16 14
17 15
18 17
19 17
20 18
21 20
22 20
23 22
24 22
25 24
26 25
27 26
28 27
29 28
30 28
31 30
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4943
1 2
3 1
4 2
5 3
6 5
7 5
8 7
9 7
10 9
11 9
12 11
13 11
14 13
15 13
16 14
17 15
18 17
19 17
20 18
21 20
22 20
23 22
24 22
25 24
26 25
27 26
28 27
29 28
30 28
31 30
32...

output:

6
4943 2475
1 2
3 5
7 8
7 9
11 12
11 13
14 16
15 17
18 20
22 23
22 24
25 26
27 28
30 31
32 33
32 34
35 37
38 39
40 41
42 44
45 46
48 49
48 50
51 52
54 55
56 57
59 60
59 61
63 64
65 67
66 68
69 71
72 73
74 75
74 76
77 79
78 80
81 83
85 86
85 87
88 89
88 90
92 93
94 95
94 96
98 99
98 100
101 102
101 1...

input:

6
4943 2475
1 2
3 5
7 8
7 9
11 12
11 13
14 16
15 17
18 20
22 23
22 24
25 26
27 28
30 31
32 33
32 34
35 37
38 39
40 41
42 44
45 46
48 49
48 50
51 52
54 55
56 57
59 60
59 61
63 64
65 67
66 68
69 71
72 73
74 75
74 76
77 79
78 80
81 83
85 86
85 87
88 89
88 90
92 93
94 95
94 96
98 99
98 100
101 102
101 1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
5559540

Test #20:

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

input:

5
9424319

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4943
1 2
3 1
4 2
5 4
6 4
7 6
8 7
9 7
10 8
11 9
12 10
13 11
14 13
15 13
16 14
17 15
18 17
19 17
20 18
21 19
22 20
23 21
24 22
25 24
26 25
27 26
28 26
29 28
30 28
31 29
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4943
1 2
3 1
4 2
5 4
6 4
7 6
8 7
9 7
10 8
11 9
12 10
13 11
14 13
15 13
16 14
17 15
18 17
19 17
20 18
21 19
22 20
23 21
24 22
25 24
26 25
27 26
28 26
29 28
30 28
31 29
32...

output:

6
4943 2473
1 3
2 4
6 7
8 10
9 11
13 14
13 15
17 18
17 19
20 22
21 23
24 25
26 27
26 28
29 31
32 34
33 35
36 37
38 39
38 40
41 43
45 46
45 47
48 49
48 50
51 53
52 54
55 56
57 59
58 60
61 62
61 63
64 65
64 66
67 69
68 70
71 72
71 73
74 75
74 76
77 79
78 80
82 83
85 86
85 87
88 89
88 90
92 93
94 95
96...

input:

6
4943 2473
1 3
2 4
6 7
8 10
9 11
13 14
13 15
17 18
17 19
20 22
21 23
24 25
26 27
26 28
29 31
32 34
33 35
36 37
38 39
38 40
41 43
45 46
45 47
48 49
48 50
51 53
52 54
55 56
57 59
58 60
61 62
61 63
64 65
64 66
67 69
68 70
71 72
71 73
74 75
74 76
77 79
78 80
82 83
85 86
85 87
88 89
88 90
92 93
94 95
96...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
9424319

Test #21:

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

input:

5
10955780

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4943
1 2
3 1
4 2
5 4
6 4
7 6
8 7
9 7
10 9
11 9
12 11
13 11
14 13
15 13
16 14
17 15
18 16
19 17
20 18
21 20
22 20
23 22
24 22
25 24
26 25
27 26
28 27
29 28
30 28
31 30
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4943
1 2
3 1
4 2
5 4
6 4
7 6
8 7
9 7
10 9
11 9
12 11
13 11
14 13
15 13
16 14
17 15
18 16
19 17
20 18
21 20
22 20
23 22
24 22
25 24
26 25
27 26
28 27
29 28
30 28
31 30
32...

output:

6
4943 2490
1 3
2 4
6 7
9 10
9 11
13 14
13 15
16 18
17 19
20 21
20 22
24 25
26 27
28 29
28 30
31 32
33 35
34 36
37 38
39 40
41 42
43 45
46 48
49 51
52 53
54 55
54 56
57 59
58 60
61 62
63 64
66 67
66 68
69 71
72 73
74 75
74 76
77 79
78 80
82 83
84 85
87 88
89 90
92 93
94 95
96 97
96 98
99 100
99 101
...

input:

6
4943 2490
1 3
2 4
6 7
9 10
9 11
13 14
13 15
16 18
17 19
20 21
20 22
24 25
26 27
28 29
28 30
31 32
33 35
34 36
37 38
39 40
41 42
43 45
46 48
49 51
52 53
54 55
54 56
57 59
58 60
61 62
63 64
66 67
66 68
69 71
72 73
74 75
74 76
77 79
78 80
82 83
84 85
87 88
89 90
92 93
94 95
96 97
96 98
99 100
99 101
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
10955780

Test #22:

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

input:

7
19938721

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4943
1 2
3 1
4 2
5 4
6 5
7 6
8 7
9 7
10 9
11 9
12 10
13 11
14 13
15 13
16 14
17 15
18 17
19 17
20 18
21 20
22 20
23 22
24 22
25 24
26 25
27 26
28 26
29 28
30 28
31 29
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4943
1 2
3 1
4 2
5 4
6 5
7 6
8 7
9 7
10 9
11 9
12 10
13 11
14 13
15 13
16 14
17 15
18 17
19 17
20 18
21 20
22 20
23 22
24 22
25 24
26 25
27 26
28 26
29 28
30 28
31 29
32...

output:

8
4943 2472
1 2
5 6
6 7
9 10
9 11
11 13
13 14
13 15
15 17
17 18
18 20
22 24
25 26
28 29
29 31
31 32
31 33
41 42
42 43
42 44
44 46
46 47
46 48
48 50
50 51
54 55
56 57
57 58
57 59
63 64
64 65
64 66
69 71
71 72
72 74
74 75
74 76
78 80
80 81
83 84
84 85
88 89
89 90
93 94
96 97
97 99
105 106
106 108
108 ...

input:

8
4943 2472
1 2
5 6
6 7
9 10
9 11
11 13
13 14
13 15
15 17
17 18
18 20
22 24
25 26
28 29
29 31
31 32
31 33
41 42
42 43
42 44
44 46
46 47
46 48
48 50
50 51
54 55
56 57
57 58
57 59
63 64
64 65
64 66
69 71
71 72
72 74
74 75
74 76
78 80
80 81
83 84
84 85
88 89
89 90
93 94
96 97
97 99
105 106
106 108
108 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
19938721

Test #23:

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

input:

7
5129508

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4943
1 2
3 1
4 2
5 3
6 4
7 5
8 7
9 7
10 9
11 9
12 10
13 11
14 13
15 13
16 14
17 15
18 17
19 17
20 18
21 20
22 20
23 22
24 22
25 24
26 25
27 26
28 27
29 28
30 28
31 29
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4943
1 2
3 1
4 2
5 3
6 4
7 5
8 7
9 7
10 9
11 9
12 10
13 11
14 13
15 13
16 14
17 15
18 17
19 17
20 18
21 20
22 20
23 22
24 22
25 24
26 25
27 26
28 27
29 28
30 28
31 29
32...

output:

8
4943 2472
1 2
1 3
5 7
9 10
9 11
11 13
13 14
13 15
15 17
17 18
18 20
22 24
25 26
27 28
28 29
29 31
31 32
31 33
33 35
39 40
42 43
43 45
45 46
46 48
48 49
48 50
50 52
55 56
56 57
56 58
63 64
66 67
66 68
69 71
71 73
73 74
76 77
76 78
78 80
80 82
82 83
83 84
84 85
85 87
87 88
90 92
93 94
98 99
99 101
1...

input:

8
4943 2472
1 2
1 3
5 7
9 10
9 11
11 13
13 14
13 15
15 17
17 18
18 20
22 24
25 26
27 28
28 29
29 31
31 32
31 33
33 35
39 40
42 43
43 45
45 46
46 48
48 49
48 50
50 52
55 56
56 57
56 58
63 64
66 67
66 68
69 71
71 73
73 74
76 77
76 78
78 80
80 82
82 83
83 84
84 85
85 87
87 88
90 92
93 94
98 99
99 101
1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
5129508

Test #24:

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

input:

7
15332941

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4943
1 2
3 1
4 2
5 3
6 5
7 5
8 7
9 7
10 9
11 9
12 11
13 11
14 13
15 13
16 14
17 15
18 16
19 17
20 18
21 20
22 20
23 22
24 22
25 24
26 25
27 26
28 26
29 28
30 28
31 30
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4943
1 2
3 1
4 2
5 3
6 5
7 5
8 7
9 7
10 9
11 9
12 11
13 11
14 13
15 13
16 14
17 15
18 16
19 17
20 18
21 20
22 20
23 22
24 22
25 24
26 25
27 26
28 26
29 28
30 28
31 30
32...

output:

8
4943 2472
1 2
1 3
3 5
13 14
13 15
14 16
18 20
22 24
25 26
28 30
31 32
32 33
32 34
33 35
39 40
40 42
42 43
43 44
44 46
47 48
48 49
49 50
51 52
52 53
53 54
54 56
56 57
59 61
63 64
68 69
69 71
71 72
76 77
76 78
82 83
83 84
84 85
85 87
88 89
89 90
94 95
95 96
98 100
100 101
101 103
103 104
104 105
105...

input:

8
4943 2472
1 2
1 3
3 5
13 14
13 15
14 16
18 20
22 24
25 26
28 30
31 32
32 33
32 34
33 35
39 40
40 42
42 43
43 44
44 46
47 48
48 49
49 50
51 52
52 53
53 54
54 56
56 57
59 61
63 64
68 69
69 71
71 72
76 77
76 78
82 83
83 84
84 85
85 87
88 89
89 90
94 95
95 96
98 100
100 101
101 103
103 104
104 105
105...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
15332941

Subtask #3:

score: 65
Accepted

Test #25:

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

input:

1
355365355024496523

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4943
1 2
3 1
4 2
5 4
6 5
7 5
8 6
9 7
10 8
11 10
12 10
13 12
14 13
15 13
16 15
17 16
18 16
19 17
20 18
21 19
22 20
23 21
24 22
25 23
26 24
27 26
28 26
29 28
30 29
31 29
3...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4943
1 2
3 1
4 2
5 4
6 5
7 5
8 6
9 7
10 8
11 10
12 10
13 12
14 13
15 13
16 15
17 16
18 16
19 17
20 18
21 19
22 20
23 21
24 22
25 23
26 24
27 26
28 26
29 28
30 29
31 29
3...

output:

2
4943 2632
4 5
5 6
6 8
10 11
13 15
16 17
20 22
22 24
23 25
24 26
26 27
26 28
29 30
30 32
31 33
34 35
35 36
37 38
39 41
41 42
43 44
43 45
45 47
47 48
47 49
49 50
53 54
54 56
59 61
61 62
64 66
66 68
69 70
71 73
74 76
76 78
77 79
79 81
83 84
84 86
85 87
87 88
87 89
89 91
91 92
93 94
93 95
95 96
96 98
...

input:

2
4943 2632
4 5
5 6
6 8
10 11
13 15
16 17
20 22
22 24
23 25
24 26
26 27
26 28
29 30
30 32
31 33
34 35
35 36
37 38
39 41
41 42
43 44
43 45
45 47
47 48
47 49
49 50
53 54
54 56
59 61
61 62
64 66
66 68
69 70
71 73
74 76
76 78
77 79
79 81
83 84
84 86
85 87
87 88
87 89
89 91
91 92
93 94
93 95
95 96
96 98
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
355365355024496523

Test #26:

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

input:

1
727827999106414164

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4943
1 2
3 2
4 3
5 3
6 5
7 5
8 7
9 8
10 9
11 9
12 11
13 12
14 13
15 13
16 14
17 15
18 16
19 17
20 19
21 20
22 21
23 22
24 22
25 24
26 25
27 25
28 27
29 27
30 28
31 30
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4943
1 2
3 2
4 3
5 3
6 5
7 5
8 7
9 8
10 9
11 9
12 11
13 12
14 13
15 13
16 14
17 15
18 16
19 17
20 19
21 20
22 21
23 22
24 22
25 24
26 25
27 25
28 27
29 27
30 28
31 30
32...

output:

2
4943 2632
3 5
5 6
7 8
9 11
13 15
15 17
21 22
22 24
24 25
25 26
25 27
27 28
28 30
30 32
32 33
33 35
34 36
37 38
40 41
41 42
42 44
44 45
45 47
46 48
48 49
49 50
52 54
54 56
59 61
61 62
65 66
66 68
68 70
72 73
74 76
77 78
77 79
79 81
83 84
85 86
85 87
86 88
87 89
90 91
90 92
92 94
94 95
94 96
97 98
1...

input:

2
4943 2632
3 5
5 6
7 8
9 11
13 15
15 17
21 22
22 24
24 25
25 26
25 27
27 28
28 30
30 32
32 33
33 35
34 36
37 38
40 41
41 42
42 44
44 45
45 47
46 48
48 49
49 50
52 54
54 56
59 61
61 62
65 66
66 68
68 70
72 73
74 76
77 78
77 79
79 81
83 84
85 86
85 87
86 88
87 89
90 91
90 92
92 94
94 95
94 96
97 98
1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
727827999106414164

Test #27:

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

input:

1
656410143989222955

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4943
1 2
3 1
4 2
5 3
6 4
7 6
8 6
9 7
10 8
11 9
12 11
13 12
14 12
15 14
16 15
17 16
18 17
19 17
20 18
21 19
22 20
23 21
24 22
25 23
26 24
27 26
28 26
29 28
30 28
31 30
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4943
1 2
3 1
4 2
5 3
6 4
7 6
8 6
9 7
10 8
11 9
12 11
13 12
14 12
15 14
16 15
17 16
18 17
19 17
20 18
21 19
22 20
23 21
24 22
25 23
26 24
27 26
28 26
29 28
30 28
31 30
32...

output:

2
4943 2632
3 5
4 6
6 8
9 11
14 15
16 17
20 22
22 24
23 25
24 26
26 27
26 28
28 30
31 32
32 33
33 35
34 36
37 38
40 41
41 42
43 44
43 45
46 47
47 48
47 49
49 50
53 54
55 56
59 61
61 62
64 66
66 68
68 70
72 73
74 76
76 78
78 79
80 81
83 84
84 86
85 87
86 88
88 89
89 91
90 92
92 94
94 95
94 96
97 98
1...

input:

2
4943 2632
3 5
4 6
6 8
9 11
14 15
16 17
20 22
22 24
23 25
24 26
26 27
26 28
28 30
31 32
32 33
33 35
34 36
37 38
40 41
41 42
43 44
43 45
46 47
47 48
47 49
49 50
53 54
55 56
59 61
61 62
64 66
66 68
68 70
72 73
74 76
76 78
78 79
80 81
83 84
84 86
85 87
86 88
88 89
89 91
90 92
92 94
94 95
94 96
97 98
1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
656410143989222955

Test #28:

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

input:

1
410366615149657534

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4943
1 2
3 1
4 2
5 4
6 5
7 6
8 6
9 7
10 8
11 9
12 10
13 11
14 12
15 14
16 14
17 15
18 17
19 17
20 19
21 19
22 21
23 21
24 22
25 23
26 24
27 26
28 27
29 28
30 29
31 29
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4943
1 2
3 1
4 2
5 4
6 5
7 6
8 6
9 7
10 8
11 9
12 10
13 11
14 12
15 14
16 14
17 15
18 17
19 17
20 19
21 19
22 21
23 21
24 22
25 23
26 24
27 26
28 27
29 28
30 29
31 29
32...

output:

2
4943 2632
4 5
5 6
6 8
9 11
14 15
15 17
21 22
22 24
23 25
24 26
26 27
27 28
29 30
30 32
31 33
34 35
35 36
36 38
39 41
40 42
43 44
43 45
46 47
47 48
47 49
48 50
53 54
55 56
60 61
60 62
65 66
66 68
69 70
71 73
75 76
76 78
78 79
80 81
82 84
84 86
85 87
87 88
87 89
90 91
90 92
93 94
94 95
95 96
97 98
1...

input:

2
4943 2632
4 5
5 6
6 8
9 11
14 15
15 17
21 22
22 24
23 25
24 26
26 27
27 28
29 30
30 32
31 33
34 35
35 36
36 38
39 41
40 42
43 44
43 45
46 47
47 48
47 49
48 50
53 54
55 56
60 61
60 62
65 66
66 68
69 70
71 73
75 76
76 78
78 79
80 81
82 84
84 86
85 87
87 88
87 89
90 91
90 92
93 94
94 95
95 96
97 98
1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
410366615149657534

Test #29:

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

input:

1
298090682780948428

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4943
1 2
3 2
4 3
5 4
6 5
7 5
8 6
9 8
10 9
11 10
12 10
13 12
14 13
15 13
16 14
17 15
18 16
19 17
20 19
21 20
22 20
23 22
24 23
25 23
26 24
27 26
28 27
29 28
30 29
31 29
3...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4943
1 2
3 2
4 3
5 4
6 5
7 5
8 6
9 8
10 9
11 10
12 10
13 12
14 13
15 13
16 14
17 15
18 16
19 17
20 19
21 20
22 20
23 22
24 23
25 23
26 24
27 26
28 27
29 28
30 29
31 29
3...

output:

2
4943 2632
4 5
5 6
6 8
10 11
13 15
15 17
20 22
23 24
23 25
24 26
26 27
27 28
29 30
30 32
31 33
33 35
34 36
37 38
39 41
41 42
43 44
44 45
45 47
47 48
48 49
49 50
52 54
54 56
59 61
61 62
65 66
67 68
69 70
71 73
74 76
77 78
77 79
79 81
83 84
85 86
86 87
86 88
87 89
90 91
91 92
93 94
94 95
94 96
96 98
...

input:

2
4943 2632
4 5
5 6
6 8
10 11
13 15
15 17
20 22
23 24
23 25
24 26
26 27
27 28
29 30
30 32
31 33
33 35
34 36
37 38
39 41
41 42
43 44
44 45
45 47
47 48
48 49
49 50
52 54
54 56
59 61
61 62
65 66
67 68
69 70
71 73
74 76
77 78
77 79
79 81
83 84
85 86
86 87
86 88
87 89
90 91
91 92
93 94
94 95
94 96
96 98
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
298090682780948428

Test #30:

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

input:

3
969441916331132577

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4943
1 2
3 1
4 2
5 3
6 4
7 5
8 7
9 7
10 9
11 9
12 11
13 11
14 12
15 13
16 15
17 16
18 17
19 17
20 18
21 20
22 20
23 22
24 23
25 24
26 25
27 26
28 26
29 28
30 29
31 30
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4943
1 2
3 1
4 2
5 3
6 4
7 5
8 7
9 7
10 9
11 9
12 11
13 11
14 12
15 13
16 15
17 16
18 17
19 17
20 18
21 20
22 20
23 22
24 23
25 24
26 25
27 26
28 26
29 28
30 29
31 30
32...

output:

4
4943 2472
1 2
1 3
2 4
3 5
4 6
5 7
7 8
7 9
12 14
13 15
15 16
22 23
23 24
24 25
28 29
33 35
34 36
43 45
44 46
45 47
46 48
56 58
57 59
58 60
60 61
61 62
64 66
66 67
67 68
73 75
74 76
75 77
76 78
77 79
82 83
88 90
89 91
93 95
94 96
98 100
99 101
116 118
120 122
121 123
134 135
135 136
138 140
139 141
...

input:

4
4943 2472
1 2
1 3
2 4
3 5
4 6
5 7
7 8
7 9
12 14
13 15
15 16
22 23
23 24
24 25
28 29
33 35
34 36
43 45
44 46
45 47
46 48
56 58
57 59
58 60
60 61
61 62
64 66
66 67
67 68
73 75
74 76
75 77
76 78
77 79
82 83
88 90
89 91
93 95
94 96
98 100
99 101
116 118
120 122
121 123
134 135
135 136
138 140
139 141
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
969441916331132577

Test #31:

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

input:

3
929489812741933634

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4943
1 2
3 1
4 2
5 3
6 4
7 6
8 6
9 7
10 8
11 10
12 11
13 11
14 13
15 13
16 15
17 16
18 16
19 18
20 18
21 19
22 20
23 21
24 23
25 23
26 24
27 26
28 27
29 28
30 29
31 30
3...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4943
1 2
3 1
4 2
5 3
6 4
7 6
8 6
9 7
10 8
11 10
12 11
13 11
14 13
15 13
16 15
17 16
18 16
19 18
20 18
21 19
22 20
23 21
24 23
25 23
26 24
27 26
28 27
29 28
30 29
31 30
3...

output:

4
4943 2472
1 2
1 3
2 4
3 5
4 6
6 7
6 8
7 9
8 10
19 21
20 22
24 26
26 27
27 28
28 29
34 35
35 36
38 40
39 41
45 47
46 48
55 57
56 58
57 59
59 60
60 61
61 62
64 66
65 67
67 68
68 69
76 78
77 79
78 80
79 81
80 82
81 83
83 84
84 85
85 86
88 90
90 91
93 95
99 101
107 109
109 110
110 111
113 115
117 119
...

input:

4
4943 2472
1 2
1 3
2 4
3 5
4 6
6 7
6 8
7 9
8 10
19 21
20 22
24 26
26 27
27 28
28 29
34 35
35 36
38 40
39 41
45 47
46 48
55 57
56 58
57 59
59 60
60 61
61 62
64 66
65 67
67 68
68 69
76 78
77 79
78 80
79 81
80 82
81 83
83 84
84 85
85 86
88 90
90 91
93 95
99 101
107 109
109 110
110 111
113 115
117 119
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
929489812741933634

Test #32:

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

input:

3
144032041325838295

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4943
1 2
3 2
4 3
5 4
6 5
7 6
8 6
9 8
10 8
11 10
12 10
13 11
14 12
15 13
16 14
17 15
18 16
19 17
20 19
21 19
22 20
23 21
24 22
25 23
26 24
27 26
28 26
29 28
30 29
31 29
3...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4943
1 2
3 2
4 3
5 4
6 5
7 6
8 6
9 8
10 8
11 10
12 10
13 11
14 12
15 13
16 14
17 15
18 16
19 17
20 19
21 19
22 20
23 21
24 22
25 23
26 24
27 26
28 26
29 28
30 29
31 29
3...

output:

4
4943 2472
1 2
2 3
3 4
4 5
5 6
6 7
6 8
11 13
12 14
13 15
14 16
15 17
16 18
20 22
21 23
22 24
23 25
32 34
34 35
47 49
51 53
65 66
71 73
72 74
73 75
74 76
83 85
84 86
86 87
87 88
91 92
92 93
93 94
101 102
102 103
109 110
110 111
111 112
112 113
115 117
116 118
117 119
118 120
119 121
120 122
128 129
...

input:

4
4943 2472
1 2
2 3
3 4
4 5
5 6
6 7
6 8
11 13
12 14
13 15
14 16
15 17
16 18
20 22
21 23
22 24
23 25
32 34
34 35
47 49
51 53
65 66
71 73
72 74
73 75
74 76
83 85
84 86
86 87
87 88
91 92
92 93
93 94
101 102
102 103
109 110
110 111
111 112
112 113
115 117
116 118
117 119
118 120
119 121
120 122
128 129
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
144032041325838295

Test #33:

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

input:

3
832110946250826180

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4943
1 2
3 1
4 2
5 3
6 4
7 5
8 7
9 7
10 9
11 9
12 10
13 11
14 12
15 13
16 15
17 16
18 16
19 18
20 18
21 20
22 21
23 22
24 22
25 24
26 25
27 25
28 27
29 27
30 28
31 29
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4943
1 2
3 1
4 2
5 3
6 4
7 5
8 7
9 7
10 9
11 9
12 10
13 11
14 12
15 13
16 15
17 16
18 16
19 18
20 18
21 20
22 21
23 22
24 22
25 24
26 25
27 25
28 27
29 27
30 28
31 29
32...

output:

4
4943 2472
1 2
1 3
2 4
3 5
4 6
5 7
7 8
7 9
10 12
11 13
12 14
13 15
20 21
28 30
32 34
36 38
37 39
49 51
50 52
51 53
63 65
64 66
65 67
66 68
67 69
68 70
73 74
74 75
77 79
78 80
82 84
87 88
88 89
91 93
92 94
109 111
110 112
111 113
112 114
114 115
117 119
121 123
122 124
127 128
130 132
131 133
132 13...

input:

4
4943 2472
1 2
1 3
2 4
3 5
4 6
5 7
7 8
7 9
10 12
11 13
12 14
13 15
20 21
28 30
32 34
36 38
37 39
49 51
50 52
51 53
63 65
64 66
65 67
66 68
67 69
68 70
73 74
74 75
77 79
78 80
82 84
87 88
88 89
91 93
92 94
109 111
110 112
111 113
112 114
114 115
117 119
121 123
122 124
127 128
130 132
131 133
132 13...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
832110946250826180

Test #34:

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

input:

3
85728715707691821

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4943
1 2
3 1
4 2
5 3
6 5
7 5
8 6
9 7
10 9
11 9
12 10
13 12
14 12
15 13
16 14
17 15
18 17
19 18
20 18
21 20
22 20
23 22
24 23
25 23
26 24
27 26
28 26
29 28
30 29
31 29
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4943
1 2
3 1
4 2
5 3
6 5
7 5
8 6
9 7
10 9
11 9
12 10
13 12
14 12
15 13
16 14
17 15
18 17
19 18
20 18
21 20
22 20
23 22
24 23
25 23
26 24
27 26
28 26
29 28
30 29
31 29
32...

output:

4
4943 2472
1 2
1 3
2 4
3 5
5 6
5 7
6 8
13 15
14 16
15 17
34 36
35 37
37 38
38 39
47 48
50 52
51 53
52 54
54 55
59 61
61 62
62 63
77 79
82 83
83 84
86 88
90 92
103 104
109 111
110 112
111 113
113 114
119 121
120 122
121 123
123 124
132 133
145 147
146 148
158 159
159 160
160 161
161 162
162 163
163 ...

input:

4
4943 2472
1 2
1 3
2 4
3 5
5 6
5 7
6 8
13 15
14 16
15 17
34 36
35 37
37 38
38 39
47 48
50 52
51 53
52 54
54 55
59 61
61 62
62 63
77 79
82 83
83 84
86 88
90 92
103 104
109 111
110 112
111 113
113 114
119 121
120 122
121 123
123 124
132 133
145 147
146 148
158 159
159 160
160 161
161 162
162 163
163 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
85728715707691821

Test #35:

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

input:

5
777434612360931036

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4943
1 2
3 1
4 2
5 3
6 4
7 5
8 7
9 7
10 9
11 10
12 11
13 12
14 13
15 13
16 15
17 16
18 16
19 17
20 18
21 20
22 20
23 22
24 22
25 24
26 25
27 25
28 27
29 27
30 28
31 30
3...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4943
1 2
3 1
4 2
5 3
6 4
7 5
8 7
9 7
10 9
11 10
12 11
13 12
14 13
15 13
16 15
17 16
18 16
19 17
20 18
21 20
22 20
23 22
24 22
25 24
26 25
27 25
28 27
29 27
30 28
31 30
3...

output:

6
4943 2474
1 2
3 5
4 6
7 8
7 9
10 11
12 13
15 16
17 19
18 20
22 23
22 24
25 26
25 27
28 30
31 32
33 34
35 36
35 37
39 40
41 43
44 45
46 47
49 50
51 52
54 55
54 56
57 58
59 60
59 61
62 64
65 67
66 68
70 71
70 72
73 74
73 75
76 77
76 78
79 81
80 82
83 85
84 86
87 88
89 90
91 92
91 93
94 95
96 97
96 9...

input:

6
4943 2474
1 2
3 5
4 6
7 8
7 9
10 11
12 13
15 16
17 19
18 20
22 23
22 24
25 26
25 27
28 30
31 32
33 34
35 36
35 37
39 40
41 43
44 45
46 47
49 50
51 52
54 55
54 56
57 58
59 60
59 61
62 64
65 67
66 68
70 71
70 72
73 74
73 75
76 77
76 78
79 81
80 82
83 85
84 86
87 88
89 90
91 92
91 93
94 95
96 97
96 9...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
777434612360931036

Test #36:

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

input:

5
705262511549880222

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4943
1 2
3 2
4 3
5 3
6 5
7 5
8 6
9 8
10 8
11 9
12 10
13 12
14 12
15 14
16 14
17 15
18 16
19 17
20 19
21 19
22 20
23 21
24 22
25 23
26 24
27 26
28 27
29 28
30 28
31 29
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4943
1 2
3 2
4 3
5 3
6 5
7 5
8 6
9 8
10 8
11 9
12 10
13 12
14 12
15 14
16 14
17 15
18 16
19 17
20 19
21 19
22 20
23 21
24 22
25 23
26 24
27 26
28 27
29 28
30 28
31 29
32...

output:

6
4943 2483
2 3
5 6
5 7
8 9
8 10
12 13
12 14
15 17
16 18
19 20
19 21
22 24
23 25
26 27
28 29
28 30
31 32
31 33
34 35
37 38
40 41
43 44
43 45
46 47
48 49
50 51
50 52
54 55
54 56
57 58
59 61
63 64
65 66
65 67
68 70
71 73
74 76
77 78
79 80
79 81
83 84
83 85
87 88
90 91
90 92
94 95
94 96
98 99
98 100
10...

input:

6
4943 2483
2 3
5 6
5 7
8 9
8 10
12 13
12 14
15 17
16 18
19 20
19 21
22 24
23 25
26 27
28 29
28 30
31 32
31 33
34 35
37 38
40 41
43 44
43 45
46 47
48 49
50 51
50 52
54 55
54 56
57 58
59 61
63 64
65 66
65 67
68 70
71 73
74 76
77 78
79 80
79 81
83 84
83 85
87 88
90 91
90 92
94 95
94 96
98 99
98 100
10...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
705262511549880222

Test #37:

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

input:

5
510318082834167951

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4943
1 2
3 2
4 3
5 3
6 5
7 6
8 7
9 8
10 8
11 9
12 11
13 12
14 12
15 13
16 14
17 15
18 16
19 18
20 19
21 19
22 20
23 21
24 22
25 24
26 25
27 25
28 26
29 27
30 28
31 30
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4943
1 2
3 2
4 3
5 3
6 5
7 6
8 7
9 8
10 8
11 9
12 11
13 12
14 12
15 13
16 14
17 15
18 16
19 18
20 19
21 19
22 20
23 21
24 22
25 24
26 25
27 25
28 26
29 27
30 28
31 30
32...

output:

6
4943 2485
2 3
5 6
7 8
9 11
12 13
12 14
15 17
16 18
19 20
19 21
22 24
25 26
25 27
28 30
32 33
34 36
37 39
38 40
42 43
44 46
47 48
47 49
50 51
52 53
52 54
55 57
58 59
58 60
62 63
62 64
65 66
68 69
68 70
71 72
74 75
76 77
79 80
79 81
82 83
82 84
85 87
86 88
89 90
89 91
93 94
95 96
97 98
97 99
100 101...

input:

6
4943 2485
2 3
5 6
7 8
9 11
12 13
12 14
15 17
16 18
19 20
19 21
22 24
25 26
25 27
28 30
32 33
34 36
37 39
38 40
42 43
44 46
47 48
47 49
50 51
52 53
52 54
55 57
58 59
58 60
62 63
62 64
65 66
68 69
68 70
71 72
74 75
76 77
79 80
79 81
82 83
82 84
85 87
86 88
89 90
89 91
93 94
95 96
97 98
97 99
100 101...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
510318082834167951

Test #38:

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

input:

5
914858813253258744

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4943
1 2
3 1
4 2
5 4
6 4
7 6
8 6
9 7
10 9
11 10
12 10
13 11
14 13
15 14
16 15
17 16
18 17
19 17
20 18
21 20
22 20
23 22
24 22
25 23
26 24
27 26
28 27
29 28
30 29
31 29
3...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4943
1 2
3 1
4 2
5 4
6 4
7 6
8 6
9 7
10 9
11 10
12 10
13 11
14 13
15 14
16 15
17 16
18 17
19 17
20 18
21 20
22 20
23 22
24 22
25 23
26 24
27 26
28 27
29 28
30 29
31 29
3...

output:

6
4943 2478
1 2
4 5
4 6
7 9
10 11
10 12
13 14
15 16
17 18
17 19
20 21
20 22
23 25
24 26
27 28
29 30
29 31
32 34
35 36
37 38
37 39
40 42
41 43
44 45
44 46
47 48
47 49
50 51
50 52
54 55
57 58
57 59
60 61
63 64
65 67
66 68
69 70
71 72
71 73
74 75
76 78
80 81
80 82
83 84
83 85
86 88
87 89
90 91
92 93
92...

input:

6
4943 2478
1 2
4 5
4 6
7 9
10 11
10 12
13 14
15 16
17 18
17 19
20 21
20 22
23 25
24 26
27 28
29 30
29 31
32 34
35 36
37 38
37 39
40 42
41 43
44 45
44 46
47 48
47 49
50 51
50 52
54 55
57 58
57 59
60 61
63 64
65 67
66 68
69 70
71 72
71 73
74 75
76 78
80 81
80 82
83 84
83 85
86 88
87 89
90 91
92 93
92...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
914858813253258744

Test #39:

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

input:

5
659635316746638238

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4943
1 2
3 1
4 2
5 3
6 5
7 5
8 6
9 7
10 8
11 10
12 10
13 12
14 12
15 14
16 14
17 15
18 16
19 18
20 19
21 19
22 21
23 21
24 23
25 23
26 24
27 26
28 27
29 28
30 29
31 29
3...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4943
1 2
3 1
4 2
5 3
6 5
7 5
8 6
9 7
10 8
11 10
12 10
13 12
14 12
15 14
16 14
17 15
18 16
19 18
20 19
21 19
22 21
23 21
24 23
25 23
26 24
27 26
28 27
29 28
30 29
31 29
3...

output:

6
4943 2475
1 3
2 4
5 6
5 7
8 10
12 13
12 14
15 17
16 18
19 20
19 21
23 24
23 25
26 27
28 29
30 32
31 33
34 36
35 37
38 40
41 43
45 46
47 48
47 49
50 51
50 52
53 54
55 57
58 59
58 60
61 62
61 63
65 66
65 67
69 70
69 71
73 74
75 76
78 79
78 80
81 82
81 83
84 86
87 88
87 89
90 91
92 93
92 94
95 96
95 ...

input:

6
4943 2475
1 3
2 4
5 6
5 7
8 10
12 13
12 14
15 17
16 18
19 20
19 21
23 24
23 25
26 27
28 29
30 32
31 33
34 36
35 37
38 40
41 43
45 46
47 48
47 49
50 51
50 52
53 54
55 57
58 59
58 60
61 62
61 63
65 66
65 67
69 70
69 71
73 74
75 76
78 79
78 80
81 82
81 83
84 86
87 88
87 89
90 91
92 93
92 94
95 96
95 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
659635316746638238

Test #40:

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

input:

7
858490260563149759

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4943
1 2
3 2
4 3
5 3
6 4
7 5
8 6
9 8
10 8
11 9
12 10
13 11
14 12
15 14
16 14
17 15
18 17
19 18
20 19
21 19
22 21
23 21
24 23
25 23
26 24
27 25
28 26
29 27
30 29
31 29
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4943
1 2
3 2
4 3
5 3
6 4
7 5
8 6
9 8
10 8
11 9
12 10
13 11
14 12
15 14
16 14
17 15
18 17
19 18
20 19
21 19
22 21
23 21
24 23
25 23
26 24
27 25
28 26
29 27
30 29
31 29
32...

output:

8
4943 2472
2 3
3 4
3 5
4 6
6 8
8 9
8 10
10 12
12 14
14 15
18 19
23 24
23 25
24 26
27 29
31 32
34 35
35 36
36 38
40 41
41 43
49 50
49 51
54 55
55 56
56 57
56 58
58 60
60 61
60 62
62 64
64 65
65 66
65 67
69 70
70 71
71 73
73 75
77 78
80 81
81 82
81 83
82 84
85 87
87 88
88 89
88 90
93 95
95 96
95 97
9...

input:

8
4943 2472
2 3
3 4
3 5
4 6
6 8
8 9
8 10
10 12
12 14
14 15
18 19
23 24
23 25
24 26
27 29
31 32
34 35
35 36
36 38
40 41
41 43
49 50
49 51
54 55
55 56
56 57
56 58
58 60
60 61
60 62
62 64
64 65
65 66
65 67
69 70
70 71
71 73
73 75
77 78
80 81
81 82
81 83
82 84
85 87
87 88
88 89
88 90
93 95
95 96
95 97
9...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
858490260563149759

Test #41:

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

input:

7
860058643727731209

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4943
1 2
3 2
4 3
5 3
6 4
7 6
8 7
9 8
10 9
11 10
12 11
13 12
14 12
15 14
16 14
17 15
18 16
19 18
20 19
21 20
22 20
23 22
24 23
25 24
26 25
27 25
28 26
29 27
30 29
31 30
3...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4943
1 2
3 2
4 3
5 3
6 4
7 6
8 7
9 8
10 9
11 10
12 11
13 12
14 12
15 14
16 14
17 15
18 16
19 18
20 19
21 20
22 20
23 22
24 23
25 24
26 25
27 25
28 26
29 27
30 29
31 30
3...

output:

8
4943 2472
2 3
3 4
4 6
6 7
8 9
11 12
14 15
14 16
19 20
20 22
24 25
25 26
25 27
29 30
30 32
34 35
35 36
36 37
37 39
42 43
43 45
46 47
47 49
49 50
50 51
51 52
53 54
54 55
57 58
58 59
61 62
62 63
65 66
66 68
69 70
70 72
72 73
75 77
78 79
79 80
80 82
82 83
83 84
84 85
85 87
87 88
87 89
89 91
91 92
92 9...

input:

8
4943 2472
2 3
3 4
4 6
6 7
8 9
11 12
14 15
14 16
19 20
20 22
24 25
25 26
25 27
29 30
30 32
34 35
35 36
36 37
37 39
42 43
43 45
46 47
47 49
49 50
50 51
51 52
53 54
54 55
57 58
58 59
61 62
62 63
65 66
66 68
69 70
70 72
72 73
75 77
78 79
79 80
80 82
82 83
83 84
84 85
85 87
87 88
87 89
89 91
91 92
92 9...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
860058643727731209

Test #42:

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

input:

7
718861404514377808

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4943
1 2
3 2
4 3
5 3
6 4
7 5
8 6
9 8
10 9
11 9
12 11
13 12
14 12
15 14
16 14
17 15
18 16
19 18
20 19
21 20
22 21
23 22
24 22
25 23
26 24
27 26
28 27
29 28
30 29
31 30
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4943
1 2
3 2
4 3
5 3
6 4
7 5
8 6
9 8
10 9
11 9
12 11
13 12
14 12
15 14
16 14
17 15
18 16
19 18
20 19
21 20
22 21
23 22
24 22
25 23
26 24
27 26
28 27
29 28
30 29
31 30
32...

output:

8
4943 2472
2 3
3 4
3 5
4 6
8 9
9 11
11 12
14 15
14 16
16 18
18 19
19 20
20 21
21 22
22 23
22 24
28 29
29 30
34 35
35 37
37 38
40 41
41 42
42 44
48 50
51 52
54 56
57 58
58 59
59 60
60 61
61 63
63 64
64 65
65 66
69 70
72 73
73 75
75 77
78 79
85 87
87 88
88 89
89 90
92 94
94 95
95 96
96 97
97 98
98 99...

input:

8
4943 2472
2 3
3 4
3 5
4 6
8 9
9 11
11 12
14 15
14 16
16 18
18 19
19 20
20 21
21 22
22 23
22 24
28 29
29 30
34 35
35 37
37 38
40 41
41 42
42 44
48 50
51 52
54 56
57 58
58 59
59 60
60 61
61 63
63 64
64 65
65 66
69 70
72 73
73 75
75 77
78 79
85 87
87 88
88 89
89 90
92 94
94 95
95 96
96 97
97 98
98 99...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
718861404514377808

Test #43:

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

input:

7
659192688464047828

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4943
1 2
3 2
4 3
5 3
6 4
7 6
8 6
9 8
10 9
11 9
12 11
13 11
14 12
15 14
16 14
17 15
18 16
19 17
20 19
21 20
22 21
23 22
24 22
25 23
26 24
27 26
28 27
29 28
30 29
31 30
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4943
1 2
3 2
4 3
5 3
6 4
7 6
8 6
9 8
10 9
11 9
12 11
13 11
14 12
15 14
16 14
17 15
18 16
19 17
20 19
21 20
22 21
23 22
24 22
25 23
26 24
27 26
28 27
29 28
30 29
31 30
32...

output:

8
4943 2472
2 3
3 4
4 6
6 8
8 9
11 12
12 14
14 15
14 16
15 17
20 21
21 22
22 23
22 24
27 28
29 30
31 32
32 33
32 34
34 36
36 37
39 40
40 41
40 42
42 44
44 45
45 46
48 49
49 51
51 52
53 54
56 57
57 59
59 60
60 61
61 63
63 65
68 69
69 71
73 74
74 76
78 79
79 81
81 82
82 83
87 88
88 89
89 90
94 95
94 9...

input:

8
4943 2472
2 3
3 4
4 6
6 8
8 9
11 12
12 14
14 15
14 16
15 17
20 21
21 22
22 23
22 24
27 28
29 30
31 32
32 33
32 34
34 36
36 37
39 40
40 41
40 42
42 44
44 45
45 46
48 49
49 51
51 52
53 54
56 57
57 59
59 60
60 61
61 63
63 65
68 69
69 71
73 74
74 76
78 79
79 81
81 82
82 83
87 88
88 89
89 90
94 95
94 9...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
659192688464047828

Test #44:

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

input:

7
685730986714800201

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4943
1 2
3 1
4 2
5 4
6 4
7 5
8 6
9 7
10 9
11 9
12 11
13 12
14 12
15 13
16 14
17 15
18 16
19 18
20 18
21 20
22 20
23 22
24 22
25 23
26 24
27 26
28 26
29 28
30 28
31 30
32...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4943
1 2
3 1
4 2
5 4
6 4
7 5
8 6
9 7
10 9
11 9
12 11
13 12
14 12
15 13
16 14
17 15
18 16
19 18
20 18
21 20
22 20
23 22
24 22
25 23
26 24
27 26
28 26
29 28
30 28
31 30
32...

output:

8
4943 2472
1 2
2 4
4 5
4 6
7 9
9 11
11 12
12 13
12 14
16 18
22 23
22 24
24 26
28 30
34 35
35 37
37 38
39 40
40 42
42 43
44 45
47 48
48 50
50 51
51 52
54 56
58 59
59 60
62 63
63 64
63 65
65 67
67 68
68 70
70 71
71 72
74 75
75 76
75 77
81 83
84 85
85 86
87 88
88 89
89 90
90 92
92 94
94 95
95 96
96 98...

input:

8
4943 2472
1 2
2 4
4 5
4 6
7 9
9 11
11 12
12 13
12 14
16 18
22 23
22 24
24 26
28 30
34 35
35 37
37 38
39 40
40 42
42 43
44 45
47 48
48 50
50 51
51 52
54 56
58 59
59 60
62 63
63 64
63 65
65 67
67 68
68 70
70 71
71 72
74 75
75 76
75 77
81 83
84 85
85 86
87 88
88 89
89 90
90 92
92 94
94 95
95 96
96 98...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
685730986714800201