QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#421487#8726. Magic ShowZ_301100 ✓0ms1808kbC++1714.3kb2024-05-25 19:55:362024-05-25 19:55:37

詳細信息

Subtask #1:

score: 5
Accepted

Test #1:

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

input:

1
4005

output:

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

input:

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

output:

2
94 71
1 2
1 31
3 4
3 40
3 56
4 5
4 24
4 32
4 71
4 81
5 6
5 35
5 44
6 7
6 34
6 45
6 65
7 8
7 63
7 89
10 11
11 12
11 48
11 57
12 13
12 26
12 30
13 85
14 15
14 27
14 29
15 16
15 70
16 17
16 61
17 38
17 41
18 19
18 36
19 20
20 21
21 22
21 46
21 58
21 94
22 23
22 37
22 42
27 75
27 77
28 83
29 64
29 88
...

input:

2
94 71
1 2
1 31
3 4
3 40
3 56
4 5
4 24
4 32
4 71
4 81
5 6
5 35
5 44
6 7
6 34
6 45
6 65
7 8
7 63
7 89
10 11
11 12
11 48
11 57
12 13
12 26
12 30
13 85
14 15
14 27
14 29
15 16
15 70
16 17
16 61
17 38
17 41
18 19
18 36
19 20
20 21
21 22
21 46
21 58
21 94
22 23
22 37
22 42
27 75
27 77
28 83
29 64
29 88
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4005

Test #2:

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

input:

1
459

output:

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

input:

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

output:

2
94 71
1 2
1 41
2 35
2 65
3 4
3 29
3 86
4 5
4 46
5 6
5 40
5 81
6 7
6 34
6 55
7 8
8 45
8 50
9 71
10 11
10 92
11 12
11 27
11 66
12 13
12 44
13 38
13 61
14 15
14 32
15 16
15 26
15 56
16 17
16 77
17 37
17 51
18 19
18 31
18 72
19 20
19 93
20 21
20 42
21 22
21 36
21 88
22 23
22 30
22 62
23 24
23 83
24 57...

input:

2
94 71
1 2
1 41
2 35
2 65
3 4
3 29
3 86
4 5
4 46
5 6
5 40
5 81
6 7
6 34
6 55
7 8
8 45
8 50
9 71
10 11
10 92
11 12
11 27
11 66
12 13
12 44
13 38
13 61
14 15
14 32
15 16
15 26
15 56
16 17
16 77
17 37
17 51
18 19
18 31
18 72
19 20
19 93
20 21
20 42
21 22
21 36
21 88
22 23
22 30
22 62
23 24
23 83
24 57...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
459

Test #3:

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

input:

1
2495

output:

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

input:

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

output:

2
94 71
1 2
2 55
3 4
3 62
3 75
4 5
4 27
4 40
4 78
5 6
5 32
5 35
5 48
5 89
6 7
7 8
8 29
8 38
8 68
9 42
10 11
10 70
11 12
12 13
12 24
12 88
13 53
14 15
14 26
14 41
14 66
14 71
15 16
16 17
17 61
18 19
19 20
19 45
20 21
20 34
20 65
20 72
21 22
21 31
21 36
21 50
22 23
22 30
22 37
23 44
23 46
23 56
23 81
...

input:

2
94 71
1 2
2 55
3 4
3 62
3 75
4 5
4 27
4 40
4 78
5 6
5 32
5 35
5 48
5 89
6 7
7 8
8 29
8 38
8 68
9 42
10 11
10 70
11 12
12 13
12 24
12 88
13 53
14 15
14 26
14 41
14 66
14 71
15 16
16 17
17 61
18 19
19 20
19 45
20 21
20 34
20 65
20 72
21 22
21 31
21 36
21 50
22 23
22 30
22 37
23 44
23 46
23 56
23 81
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
2495

Test #4:

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

input:

3
1560

output:

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

input:

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

output:

4
94 47
1 2
1 26
2 3
3 4
3 33
3 39
3 72
4 5
4 82
5 6
5 92
6 7
6 55
7 65
13 78
15 51
18 19
18 81
19 91
22 23
22 74
23 84
24 94
25 57
26 67
27 77
28 87
29 50
30 60
31 70
32 80
33 90
34 53
35 63
36 73
37 83
38 93
39 56
40 66
41 76
42 86
43 49
44 59
45 69
46 47
46 79
47 89

input:

4
94 47
1 2
1 26
2 3
3 4
3 33
3 39
3 72
4 5
4 82
5 6
5 92
6 7
6 55
7 65
13 78
15 51
18 19
18 81
19 91
22 23
22 74
23 84
24 94
25 57
26 67
27 77
28 87
29 50
30 60
31 70
32 80
33 90
34 53
35 63
36 73
37 83
38 93
39 56
40 66
41 76
42 86
43 49
44 59
45 69
46 47
46 79
47 89

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1560

Test #5:

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

input:

3
3594

output:

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

input:

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

output:

4
94 47
1 2
1 80
1 81
5 6
6 7
6 32
6 36
6 49
6 65
10 73
11 12
11 33
11 35
14 15
14 28
14 40
15 16
16 68
16 93
18 19
18 45
18 46
19 20
25 51
25 63
26 72
26 89
31 75
31 86
36 57
37 56
37 58
38 50
38 64
39 69
39 92
40 55
40 59
42 67
42 94
43 74
43 87
44 71
44 90
45 54
45 60
46 47

input:

4
94 47
1 2
1 80
1 81
5 6
6 7
6 32
6 36
6 49
6 65
10 73
11 12
11 33
11 35
14 15
14 28
14 40
15 16
16 68
16 93
18 19
18 45
18 46
19 20
25 51
25 63
26 72
26 89
31 75
31 86
36 57
37 56
37 58
38 50
38 64
39 69
39 92
40 55
40 59
42 67
42 94
43 74
43 87
44 71
44 90
45 54
45 60
46 47

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
3594

Test #6:

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

input:

3
1750

output:

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

input:

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

output:

4
94 47
2 3
2 49
3 4
3 24
3 37
3 63
4 77
7 8
7 72
8 86
11 12
11 81
12 48
14 76
16 17
16 57
17 18
17 71
18 19
18 85
23 43
23 61
24 75
25 89
26 56
27 70
28 84
29 51
30 65
31 79
32 93
33 60
34 74
35 88
36 55
37 69
38 83
39 50
40 64
41 78
42 92
43 59
44 73
45 87
46 47
46 54
47 68

input:

4
94 47
2 3
2 49
3 4
3 24
3 37
3 63
4 77
7 8
7 72
8 86
11 12
11 81
12 48
14 76
16 17
16 57
17 18
17 71
18 19
18 85
23 43
23 61
24 75
25 89
26 56
27 70
28 84
29 51
30 65
31 79
32 93
33 60
34 74
35 88
36 55
37 69
38 83
39 50
40 64
41 78
42 92
43 59
44 73
45 87
46 47
46 54
47 68

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1750

Test #7:

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

input:

5
4878

output:

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

input:

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

output:

6
94 52
1 2
3 4
3 24
3 26
3 56
3 59
5 6
7 8
7 27
7 46
7 77
7 85
9 10
9 73
9 89
11 12
11 55
11 60
13 14
15 16
17 18
17 25
17 50
17 65
19 20
19 31
19 42
21 22
21 32
21 41
23 29
23 44
23 54
23 61
28 69
28 93
30 79
30 83
34 71
34 91
36 51
36 64
38 48
38 67
39 53
39 62
40 78
40 84
43 72
43 90
47 75
47 87

input:

6
94 52
1 2
3 4
3 24
3 26
3 56
3 59
5 6
7 8
7 27
7 46
7 77
7 85
9 10
9 73
9 89
11 12
11 55
11 60
13 14
15 16
17 18
17 25
17 50
17 65
19 20
19 31
19 42
21 22
21 32
21 41
23 29
23 44
23 54
23 61
28 69
28 93
30 79
30 83
34 71
34 91
36 51
36 64
38 48
38 67
39 53
39 62
40 78
40 84
43 72
43 90
47 75
47 87

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4878

Test #8:

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

input:

5
1223

output:

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

input:

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

output:

6
94 47
1 57
2 48
3 4
3 86
5 6
5 24
5 32
5 68
7 8
7 50
9 10
9 36
9 43
9 79
11 12
11 61
13 14
13 90
15 16
15 72
17 18
17 54
19 20
19 28
19 83
21 22
21 27
21 29
21 65
23 33
23 46
23 94
25 76
26 67
30 78
31 69
34 89
35 80
37 62
38 53
39 91
40 82
41 73
42 64
44 93
45 84
47 66

input:

6
94 47
1 57
2 48
3 4
3 86
5 6
5 24
5 32
5 68
7 8
7 50
9 10
9 36
9 43
9 79
11 12
11 61
13 14
13 90
15 16
15 72
17 18
17 54
19 20
19 28
19 83
21 22
21 27
21 29
21 65
23 33
23 46
23 94
25 76
26 67
30 78
31 69
34 89
35 80
37 62
38 53
39 91
40 82
41 73
42 64
44 93
45 84
47 66

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1223

Test #9:

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

input:

5
648

output:

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

input:

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

output:

6
94 47
1 2
2 30
2 36
2 85
3 4
4 49
5 6
6 27
6 39
6 60
7 8
8 71
9 10
10 82
11 12
12 93
13 14
14 57
15 16
16 33
16 68
17 18
18 19
18 28
18 79
20 21
20 31
20 35
20 90
22 23
22 44
22 45
22 54
24 65
25 94
26 76
29 69
32 62
34 73
37 66
38 48
40 59
41 88
42 70
43 52
46 47
46 92

input:

6
94 47
1 2
2 30
2 36
2 85
3 4
4 49
5 6
6 27
6 39
6 60
7 8
8 71
9 10
10 82
11 12
12 93
13 14
14 57
15 16
16 33
16 68
17 18
18 19
18 28
18 79
20 21
20 31
20 35
20 90
22 23
22 44
22 45
22 54
24 65
25 94
26 76
29 69
32 62
34 73
37 66
38 48
40 59
41 88
42 70
43 52
46 47
46 92

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
648

Test #10:

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

input:

7
4475

output:

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

input:

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

output:

8
94 47
1 27
3 45
5 83
9 25
9 76
9 90
10 43
11 35
11 48
11 71
12 72
12 94
14 24
14 40
14 49
14 70
17 34
17 73
17 93
21 28
21 36
21 50
21 69
22 55
22 64
23 80
23 86
26 74
26 92
29 59
29 60
30 77
30 89
32 51
32 68
33 58
33 61
37 79
37 87
39 75
39 91
41 57
41 62
42 54
42 65
47 52
47 67

input:

8
94 47
1 27
3 45
5 83
9 25
9 76
9 90
10 43
11 35
11 48
11 71
12 72
12 94
14 24
14 40
14 49
14 70
17 34
17 73
17 93
21 28
21 36
21 50
21 69
22 55
22 64
23 80
23 86
26 74
26 92
29 59
29 60
30 77
30 89
32 51
32 68
33 58
33 61
37 79
37 87
39 75
39 91
41 57
41 62
42 54
42 65
47 52
47 67

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4475

Test #11:

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

input:

7
4240

output:

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

input:

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

output:

8
94 47
1 2
2 29
2 42
2 68
2 79
7 50
8 51
10 40
10 62
10 85
11 36
11 48
11 52
13 33
13 38
13 60
13 87
15 64
15 83
18 45
21 30
21 72
21 75
23 54
23 93
24 58
24 89
25 71
25 76
28 66
28 81
31 70
31 77
32 55
32 92
34 61
34 86
35 63
35 84
39 69
39 78
41 59
41 88
43 56
43 91
44 65
44 82

input:

8
94 47
1 2
2 29
2 42
2 68
2 79
7 50
8 51
10 40
10 62
10 85
11 36
11 48
11 52
13 33
13 38
13 60
13 87
15 64
15 83
18 45
21 30
21 72
21 75
23 54
23 93
24 58
24 89
25 71
25 76
28 66
28 81
31 70
31 77
32 55
32 92
34 61
34 86
35 63
35 84
39 69
39 78
41 59
41 88
43 56
43 91
44 65
44 82

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4240

Test #12:

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

input:

7
1291

output:

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

input:

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

output:

8
94 47
1 82
4 24
4 42
5 32
5 34
6 27
6 39
7 28
7 38
9 10
9 26
9 40
11 31
11 35
12 29
12 37
15 44
15 45
16 25
16 41
19 43
21 30
21 36
23 48
24 55
25 62
26 69
27 76
28 83
29 90
30 50
31 57
32 64
33 71
34 78
35 85
36 92
37 52
38 59
39 66
40 73
41 80
42 87
43 94
44 54
45 61
47 75

input:

8
94 47
1 82
4 24
4 42
5 32
5 34
6 27
6 39
7 28
7 38
9 10
9 26
9 40
11 31
11 35
12 29
12 37
15 44
15 45
16 25
16 41
19 43
21 30
21 36
23 48
24 55
25 62
26 69
27 76
28 83
29 90
30 50
31 57
32 64
33 71
34 78
35 85
36 92
37 52
38 59
39 66
40 73
41 80
42 87
43 94
44 54
45 61
47 75

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1291

Subtask #2:

score: 30
Accepted

Test #13:

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

input:

1
17476204

output:

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

input:

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

output:

2
94 71
1 2
1 65
1 70
2 42
2 56
2 71
3 4
3 27
3 35
3 36
4 5
4 80
5 6
5 89
6 7
6 37
6 46
6 93
7 8
7 26
7 48
8 34
8 38
9 62
10 11
10 41
11 12
11 73
12 13
13 85
14 15
14 72
15 16
16 17
16 77
17 30
17 31
17 32
17 45
18 19
18 81
19 20
19 44
19 90
20 21
20 29
20 40
21 22
21 58
22 23
22 88
23 24
26 68
28 6...

input:

2
94 71
1 2
1 65
1 70
2 42
2 56
2 71
3 4
3 27
3 35
3 36
4 5
4 80
5 6
5 89
6 7
6 37
6 46
6 93
7 8
7 26
7 48
8 34
8 38
9 62
10 11
10 41
11 12
11 73
12 13
13 85
14 15
14 72
15 16
16 17
16 77
17 30
17 31
17 32
17 45
18 19
18 81
19 20
19 44
19 90
20 21
20 29
20 40
21 22
21 58
22 23
22 88
23 24
26 68
28 6...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
17476204

Test #14:

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

input:

1
11926600

output:

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

input:

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

output:

2
94 71
1 2
1 35
1 42
1 62
1 92
3 4
3 31
3 93
4 5
4 29
4 44
4 73
5 6
5 34
6 7
6 26
6 83
7 8
7 27
7 56
10 11
10 50
11 12
12 13
12 61
12 90
14 15
14 41
14 57
15 16
15 38
15 45
15 74
15 81
16 17
16 86
17 37
17 46
18 19
18 36
18 40
19 20
19 66
20 21
20 24
21 22
21 63
22 23
22 32
22 48
22 71
23 30
23 53
...

input:

2
94 71
1 2
1 35
1 42
1 62
1 92
3 4
3 31
3 93
4 5
4 29
4 44
4 73
5 6
5 34
6 7
6 26
6 83
7 8
7 27
7 56
10 11
10 50
11 12
12 13
12 61
12 90
14 15
14 41
14 57
15 16
15 38
15 45
15 74
15 81
16 17
16 86
17 37
17 46
18 19
18 36
18 40
19 20
19 66
20 21
20 24
21 22
21 63
22 23
22 32
22 48
22 71
23 30
23 53
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
11926600

Test #15:

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

input:

1
16602378

output:

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

input:

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

output:

2
94 71
1 2
1 51
1 55
3 4
3 31
3 93
4 5
5 6
5 48
6 7
6 34
6 56
6 83
7 8
7 40
7 53
8 35
8 41
9 30
9 44
9 80
10 11
10 72
11 12
12 13
12 62
13 24
13 37
13 88
14 15
14 45
14 64
15 16
16 17
16 27
16 50
17 36
17 38
18 19
18 26
18 32
19 20
19 29
19 46
19 52
19 70
20 21
20 81
21 22
21 42
21 65
22 23
25 77
2...

input:

2
94 71
1 2
1 51
1 55
3 4
3 31
3 93
4 5
5 6
5 48
6 7
6 34
6 56
6 83
7 8
7 40
7 53
8 35
8 41
9 30
9 44
9 80
10 11
10 72
11 12
12 13
12 62
13 24
13 37
13 88
14 15
14 45
14 64
15 16
16 17
16 27
16 50
17 36
17 38
18 19
18 26
18 32
19 20
19 29
19 46
19 52
19 70
20 21
20 81
21 22
21 42
21 65
22 23
25 77
2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
16602378

Test #16:

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

input:

3
13129243

output:

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

input:

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

output:

4
94 47
1 82
2 3
3 4
3 33
3 41
3 42
3 86
5 6
6 78
8 92
11 12
11 40
12 13
13 14
13 73
14 15
14 49
18 37
18 46
19 20
20 21
20 26
20 45
21 22
21 72
22 23
23 32
24 81
26 50
27 88
29 48
29 93
33 64
33 83
34 89
34 90
36 71
37 55
37 58
43 94
44 57
44 63
45 61
46 47
46 54
46 60
47 51

input:

4
94 47
1 82
2 3
3 4
3 33
3 41
3 42
3 86
5 6
6 78
8 92
11 12
11 40
12 13
13 14
13 73
14 15
14 49
18 37
18 46
19 20
20 21
20 26
20 45
21 22
21 72
22 23
23 32
24 81
26 50
27 88
29 48
29 93
33 64
33 83
34 89
34 90
36 71
37 55
37 58
43 94
44 57
44 63
45 61
46 47
46 54
46 60
47 51

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
13129243

Test #17:

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

input:

3
7892141

output:

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

input:

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

output:

4
94 47
1 63
4 5
5 6
5 26
6 46
10 76
12 49
13 44
17 18
18 19
18 68
18 86
19 20
19 27
19 45
19 51
19 59
21 22
21 84
21 88
22 23
22 33
22 83
25 72
25 87
26 55
26 66
27 70
27 90
29 94
30 57
30 85
34 58
35 60
35 79
37 69
39 74
40 53
40 64
41 82
41 92
43 48
43 93
45 75
46 47
46 54
47 89

input:

4
94 47
1 63
4 5
5 6
5 26
6 46
10 76
12 49
13 44
17 18
18 19
18 68
18 86
19 20
19 27
19 45
19 51
19 59
21 22
21 84
21 88
22 23
22 33
22 83
25 72
25 87
26 55
26 66
27 70
27 90
29 94
30 57
30 85
34 58
35 60
35 79
37 69
39 74
40 53
40 64
41 82
41 92
43 48
43 93
45 75
46 47
46 54
47 89

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
7892141

Test #18:

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

input:

3
21314775

output:

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

input:

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

output:

4
94 47
1 2
1 34
1 80
4 90
6 7
6 32
7 61
10 11
11 39
14 15
14 77
15 86
20 21
20 69
21 22
21 26
21 37
21 38
21 57
21 79
21 88
21 93
22 23
23 29
24 68
24 71
24 89
26 92
27 75
28 81
28 85
31 49
34 66
34 82
37 63
39 76
40 58
40 59
40 94
41 48
41 64
42 65
42 72
44 53
46 47
47 83
47 87

input:

4
94 47
1 2
1 34
1 80
4 90
6 7
6 32
7 61
10 11
11 39
14 15
14 77
15 86
20 21
20 69
21 22
21 26
21 37
21 38
21 57
21 79
21 88
21 93
22 23
23 29
24 68
24 71
24 89
26 92
27 75
28 81
28 85
31 49
34 66
34 82
37 63
39 76
40 58
40 59
40 94
41 48
41 64
42 65
42 72
44 53
46 47
47 83
47 87

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
21314775

Test #19:

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

input:

5
5559540

output:

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

input:

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

output:

6
94 47
1 2
2 41
3 4
4 24
4 27
4 29
4 38
4 65
4 67
5 28
6 7
6 25
6 50
8 9
8 31
8 40
10 11
10 42
10 44
12 13
12 63
12 82
14 15
14 52
16 17
16 26
18 19
18 58
20 21
22 23
30 84
32 60
32 77
33 72
33 81
34 68
35 57
35 62
35 76
35 85
36 94
37 56
39 86
39 91
43 69
43 90
46 47

input:

6
94 47
1 2
2 41
3 4
4 24
4 27
4 29
4 38
4 65
4 67
5 28
6 7
6 25
6 50
8 9
8 31
8 40
10 11
10 42
10 44
12 13
12 63
12 82
14 15
14 52
16 17
16 26
18 19
18 58
20 21
22 23
30 84
32 60
32 77
33 72
33 81
34 68
35 57
35 62
35 76
35 85
36 94
37 56
39 86
39 91
43 69
43 90
46 47

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
5559540

Test #20:

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

input:

5
9424319

output:

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

input:

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

output:

6
94 50
1 2
1 28
1 29
1 88
3 4
3 44
3 67
3 89
5 6
5 55
7 8
7 65
7 70
9 10
11 12
11 32
13 14
13 26
13 27
15 16
15 91
17 18
17 43
17 80
19 20
19 41
19 79
19 82
19 84
19 92
21 22
21 30
21 37
21 48
23 36
23 46
25 73
31 69
33 60
34 51
34 85
35 61
35 77
38 50
40 53
40 72
42 58
42 93
47 81
47 94

input:

6
94 50
1 2
1 28
1 29
1 88
3 4
3 44
3 67
3 89
5 6
5 55
7 8
7 65
7 70
9 10
11 12
11 32
13 14
13 26
13 27
15 16
15 91
17 18
17 43
17 80
19 20
19 41
19 79
19 82
19 84
19 92
21 22
21 30
21 37
21 48
23 36
23 46
25 73
31 69
33 60
34 51
34 85
35 61
35 77
38 50
40 53
40 72
42 58
42 93
47 81
47 94

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
9424319

Test #21:

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

input:

5
10955780

output:

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

input:

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

output:

6
94 47
1 34
1 42
1 45
1 73
1 76
2 3
3 38
3 83
4 5
5 49
5 87
6 7
7 24
7 26
7 36
7 52
8 9
10 11
11 75
12 13
13 37
13 71
14 15
15 53
15 58
15 61
15 85
16 17
17 55
17 65
18 19
19 70
19 78
20 21
21 46
21 82
21 94
22 23
27 77
28 59
31 92
32 69
32 72
33 63
35 68
40 90
41 51

input:

6
94 47
1 34
1 42
1 45
1 73
1 76
2 3
3 38
3 83
4 5
5 49
5 87
6 7
7 24
7 26
7 36
7 52
8 9
10 11
11 75
12 13
13 37
13 71
14 15
15 53
15 58
15 61
15 85
16 17
17 55
17 65
18 19
19 70
19 78
20 21
21 46
21 82
21 94
22 23
27 77
28 59
31 92
32 69
32 72
33 63
35 68
40 90
41 51

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
10955780

Test #22:

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

input:

7
19938721

output:

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

input:

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

output:

8
94 47
2 56
2 94
4 44
4 51
5 41
5 54
5 90
6 48
7 57
9 64
10 25
11 62
12 37
14 33
14 78
15 69
15 71
17 63
18 45
18 73
19 77
19 82
20 35
20 70
26 52
27 68
28 50
28 81
29 60
29 74
30 55
30 84
30 91
31 53
32 61
32 66
34 92
34 93
36 75
36 86
38 67
38 89
39 58
40 87
42 65
43 79
47 59

input:

8
94 47
2 56
2 94
4 44
4 51
5 41
5 54
5 90
6 48
7 57
9 64
10 25
11 62
12 37
14 33
14 78
15 69
15 71
17 63
18 45
18 73
19 77
19 82
20 35
20 70
26 52
27 68
28 50
28 81
29 60
29 74
30 55
30 84
30 91
31 53
32 61
32 66
34 92
34 93
36 75
36 86
38 67
38 89
39 58
40 87
42 65
43 79
47 59

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
19938721

Test #23:

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

input:

7
5129508

output:

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

input:

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

output:

8
94 47
1 64
2 49
2 62
2 86
2 87
4 39
4 58
4 61
6 38
6 81
7 90
10 28
14 70
14 77
15 54
15 75
16 73
16 83
16 84
16 91
21 36
21 60
21 92
22 52
22 63
23 48
23 59
25 69
27 55
27 68
29 57
30 53
32 80
33 66
33 67
33 72
33 79
34 76
37 94
40 78
41 65
42 82
43 89
44 93
45 50
46 47
46 56

input:

8
94 47
1 64
2 49
2 62
2 86
2 87
4 39
4 58
4 61
6 38
6 81
7 90
10 28
14 70
14 77
15 54
15 75
16 73
16 83
16 84
16 91
21 36
21 60
21 92
22 52
22 63
23 48
23 59
25 69
27 55
27 68
29 57
30 53
32 80
33 66
33 67
33 72
33 79
34 76
37 94
40 78
41 65
42 82
43 89
44 93
45 50
46 47
46 56

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
5129508

Test #24:

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

input:

7
15332941

output:

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

input:

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

output:

8
94 47
1 2
2 56
3 4
3 42
4 5
6 62
7 8
13 28
13 46
14 60
16 17
17 18
18 19
18 25
19 20
20 27
21 44
23 72
24 70
24 75
26 81
26 83
27 77
28 67
29 87
30 52
30 84
31 79
33 65
33 78
34 86
36 57
36 61
37 49
37 50
38 48
38 59
39 63
39 89
40 64
40 71
41 51
42 88
43 58
44 80
45 55
46 47

input:

8
94 47
1 2
2 56
3 4
3 42
4 5
6 62
7 8
13 28
13 46
14 60
16 17
17 18
18 19
18 25
19 20
20 27
21 44
23 72
24 70
24 75
26 81
26 83
27 77
28 67
29 87
30 52
30 84
31 79
33 65
33 78
34 86
36 57
36 61
37 49
37 50
38 48
38 59
39 63
39 89
40 64
40 71
41 51
42 88
43 58
44 80
45 55
46 47

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
15332941

Subtask #3:

score: 65
Accepted

Test #25:

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

input:

1
355365355024496523

output:

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

input:

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

output:

2
94 71
1 2
1 57
3 4
3 80
4 5
4 56
4 90
5 6
5 42
5 86
6 7
7 8
7 30
7 46
7 50
8 29
8 93
9 66
10 11
10 24
11 12
11 35
12 13
12 36
13 37
14 15
15 16
15 26
16 17
16 31
16 40
17 32
17 41
17 45
18 19
19 20
19 44
19 55
20 21
20 27
20 38
21 22
21 34
21 65
21 81
22 23
22 85
23 89
24 68
24 88
25 74
27 62
27 9...

input:

2
94 71
1 2
1 57
3 4
3 80
4 5
4 56
4 90
5 6
5 42
5 86
6 7
7 8
7 30
7 46
7 50
8 29
8 93
9 66
10 11
10 24
11 12
11 35
12 13
12 36
13 37
14 15
15 16
15 26
16 17
16 31
16 40
17 32
17 41
17 45
18 19
19 20
19 44
19 55
20 21
20 27
20 38
21 22
21 34
21 65
21 81
22 23
22 85
23 89
24 68
24 88
25 74
27 62
27 9...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
355365355024496523

Test #26:

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

input:

1
727827999106414164

output:

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

input:

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

output:

2
94 71
1 2
1 36
1 62
3 4
3 34
3 50
4 5
4 52
5 6
5 71
6 7
6 86
7 8
7 77
7 83
8 26
8 81
10 11
10 31
11 12
12 13
12 42
13 75
14 15
14 35
14 44
14 46
15 16
15 37
15 72
15 78
15 92
16 17
16 30
16 32
16 40
16 53
17 27
18 19
19 20
19 65
20 21
20 29
21 22
21 38
21 41
21 51
21 90
22 23
22 56
22 74
23 24
23 ...

input:

2
94 71
1 2
1 36
1 62
3 4
3 34
3 50
4 5
4 52
5 6
5 71
6 7
6 86
7 8
7 77
7 83
8 26
8 81
10 11
10 31
11 12
12 13
12 42
13 75
14 15
14 35
14 44
14 46
15 16
15 37
15 72
15 78
15 92
16 17
16 30
16 32
16 40
16 53
17 27
18 19
19 20
19 65
20 21
20 29
21 22
21 38
21 41
21 51
21 90
22 23
22 56
22 74
23 24
23 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
727827999106414164

Test #27:

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

input:

1
656410143989222955

output:

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

input:

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

output:

2
94 71
1 2
1 29
1 42
1 45
1 86
3 4
3 88
4 5
5 6
5 27
5 32
5 35
5 46
5 55
6 7
6 38
7 8
7 41
7 68
7 81
7 92
8 52
8 53
8 57
10 11
10 24
10 34
11 12
11 65
12 13
12 56
13 64
14 15
14 26
14 58
15 16
15 44
16 17
16 50
16 66
18 19
19 20
19 37
19 40
20 21
20 30
21 22
21 31
22 23
22 36
27 70
27 85
28 62
28 9...

input:

2
94 71
1 2
1 29
1 42
1 45
1 86
3 4
3 88
4 5
5 6
5 27
5 32
5 35
5 46
5 55
6 7
6 38
7 8
7 41
7 68
7 81
7 92
8 52
8 53
8 57
10 11
10 24
10 34
11 12
11 65
12 13
12 56
13 64
14 15
14 26
14 58
15 16
15 44
16 17
16 50
16 66
18 19
19 20
19 37
19 40
20 21
20 30
21 22
21 31
22 23
22 36
27 70
27 85
28 62
28 9...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
656410143989222955

Test #28:

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

input:

1
410366615149657534

output:

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

input:

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

output:

2
94 71
1 2
1 35
2 34
2 42
3 4
3 24
3 40
4 5
5 6
5 45
6 7
6 51
6 90
7 8
8 66
10 11
10 85
11 12
11 32
11 37
11 58
12 13
12 41
13 56
13 57
13 77
13 83
14 15
14 29
14 31
15 16
15 44
16 17
16 26
17 36
17 55
17 63
17 73
17 81
18 19
18 30
18 88
19 20
19 50
19 64
20 21
21 22
21 38
22 23
22 46
23 27
23 80
2...

input:

2
94 71
1 2
1 35
2 34
2 42
3 4
3 24
3 40
4 5
5 6
5 45
6 7
6 51
6 90
7 8
8 66
10 11
10 85
11 12
11 32
11 37
11 58
12 13
12 41
13 56
13 57
13 77
13 83
14 15
14 29
14 31
15 16
15 44
16 17
16 26
17 36
17 55
17 63
17 73
17 81
18 19
18 30
18 88
19 20
19 50
19 64
20 21
21 22
21 38
22 23
22 46
23 27
23 80
2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
410366615149657534

Test #29:

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

input:

1
298090682780948428

output:

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

input:

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

output:

2
94 71
1 2
1 31
2 64
2 74
2 89
3 4
4 5
4 51
5 6
5 24
5 27
5 46
5 53
5 56
6 7
6 40
6 86
7 8
7 62
8 58
8 70
9 26
10 11
10 30
11 12
11 44
11 75
12 13
13 32
13 34
13 45
13 61
14 15
14 38
14 52
15 16
15 37
15 42
16 17
16 66
16 72
17 55
18 19
19 20
19 29
19 35
19 92
20 21
20 77
21 22
21 36
21 41
22 23
22...

input:

2
94 71
1 2
1 31
2 64
2 74
2 89
3 4
4 5
4 51
5 6
5 24
5 27
5 46
5 53
5 56
6 7
6 40
6 86
7 8
7 62
8 58
8 70
9 26
10 11
10 30
11 12
11 44
11 75
12 13
13 32
13 34
13 45
13 61
14 15
14 38
14 52
15 16
15 37
15 42
16 17
16 66
16 72
17 55
18 19
19 20
19 29
19 35
19 92
20 21
20 77
21 22
21 36
21 41
22 23
22...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
298090682780948428

Test #30:

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

input:

3
969441916331132577

output:

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

input:

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

output:

4
94 47
1 2
1 24
1 28
1 31
1 32
1 38
1 92
6 69
10 86
15 16
15 75
16 27
17 18
17 67
17 85
20 21
20 26
21 22
21 35
22 23
22 25
22 50
23 34
25 60
25 66
25 82
27 83
28 87
29 70
29 74
29 90
31 51
31 91
34 94
37 56
37 65
37 73
39 54
40 63
42 59
43 79
45 76
45 81
46 47
46 64
47 58
47 93

input:

4
94 47
1 2
1 24
1 28
1 31
1 32
1 38
1 92
6 69
10 86
15 16
15 75
16 27
17 18
17 67
17 85
20 21
20 26
21 22
21 35
22 23
22 25
22 50
23 34
25 60
25 66
25 82
27 83
28 87
29 70
29 74
29 90
31 51
31 91
34 94
37 56
37 65
37 73
39 54
40 63
42 59
43 79
45 76
45 81
46 47
46 64
47 58
47 93

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
969441916331132577

Test #31:

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

input:

3
929489812741933634

output:

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

input:

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

output:

4
94 47
3 61
3 66
5 6
8 9
8 89
9 10
9 49
9 71
10 11
11 12
11 45
12 13
12 65
13 14
13 24
13 30
13 31
13 35
13 48
14 50
16 17
16 34
16 58
17 41
17 67
19 20
19 42
20 26
26 77
29 60
29 69
30 70
30 93
34 57
34 73
34 82
35 53
35 78
37 64
37 90
39 56
39 68
40 85
43 83
44 81
46 47
46 80

input:

4
94 47
3 61
3 66
5 6
8 9
8 89
9 10
9 49
9 71
10 11
11 12
11 45
12 13
12 65
13 14
13 24
13 30
13 31
13 35
13 48
14 50
16 17
16 34
16 58
17 41
17 67
19 20
19 42
20 26
26 77
29 60
29 69
30 70
30 93
34 57
34 73
34 82
35 53
35 78
37 64
37 90
39 56
39 68
40 85
43 83
44 81
46 47
46 80

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
929489812741933634

Test #32:

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

input:

3
144032041325838295

output:

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

input:

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

output:

4
94 47
1 2
2 3
2 28
2 29
2 34
2 36
2 38
2 51
2 58
2 59
2 92
5 6
5 27
8 94
10 11
10 40
11 12
11 24
12 13
13 71
18 19
18 86
19 85
21 32
21 66
25 74
26 50
26 70
27 48
27 67
29 90
30 49
31 61
31 69
33 73
36 64
36 91
37 93
38 63
39 55
39 77
39 78
40 72
44 57
44 80
46 47
46 65

input:

4
94 47
1 2
2 3
2 28
2 29
2 34
2 36
2 38
2 51
2 58
2 59
2 92
5 6
5 27
8 94
10 11
10 40
11 12
11 24
12 13
13 71
18 19
18 86
19 85
21 32
21 66
25 74
26 50
26 70
27 48
27 67
29 90
30 49
31 61
31 69
33 73
36 64
36 91
37 93
38 63
39 55
39 77
39 78
40 72
44 57
44 80
46 47
46 65

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
144032041325838295

Test #33:

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

input:

3
832110946250826180

output:

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

input:

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

output:

4
94 47
1 2
1 29
1 39
2 3
3 4
3 28
3 44
3 45
3 86
3 91
6 7
7 8
7 93
8 9
8 61
9 41
12 13
13 14
13 46
13 50
18 24
20 21
20 35
21 22
21 25
22 23
22 63
22 76
26 54
26 90
27 89
28 68
29 73
30 88
32 77
33 48
33 65
38 53
38 92
41 72
41 74
42 55
44 60
45 59
45 67
46 51
46 75

input:

4
94 47
1 2
1 29
1 39
2 3
3 4
3 28
3 44
3 45
3 86
3 91
6 7
7 8
7 93
8 9
8 61
9 41
12 13
13 14
13 46
13 50
18 24
20 21
20 35
21 22
21 25
22 23
22 63
22 76
26 54
26 90
27 89
28 68
29 73
30 88
32 77
33 48
33 65
38 53
38 92
41 72
41 74
42 55
44 60
45 59
45 67
46 51
46 75

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
832110946250826180

Test #34:

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

input:

3
85728715707691821

output:

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

input:

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

output:

4
94 47
1 26
1 64
4 90
9 10
9 58
10 76
11 43
11 59
13 14
13 60
14 15
15 16
15 73
15 81
16 17
16 27
17 18
17 34
17 36
17 38
17 41
17 44
17 53
17 77
18 19
19 42
22 23
24 56
26 51
26 55
29 78
30 50
30 70
31 86
34 67
34 74
35 65
36 57
39 93
40 63
40 79
42 66
43 82
44 94
46 47
46 84
46 91

input:

4
94 47
1 26
1 64
4 90
9 10
9 58
10 76
11 43
11 59
13 14
13 60
14 15
15 16
15 73
15 81
16 17
16 27
17 18
17 34
17 36
17 38
17 41
17 44
17 53
17 77
18 19
19 42
22 23
24 56
26 51
26 55
29 78
30 50
30 70
31 86
34 67
34 74
35 65
36 57
39 93
40 63
40 79
42 66
43 82
44 94
46 47
46 84
46 91

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
85728715707691821

Test #35:

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

input:

5
777434612360931036

output:

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

input:

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

output:

6
94 47
1 2
3 4
3 53
3 70
5 6
5 27
5 42
5 77
7 8
7 37
7 56
9 10
9 29
9 31
9 86
11 12
11 63
13 14
13 30
13 32
13 46
13 48
13 54
13 55
13 61
15 16
15 38
15 75
17 18
19 20
19 26
21 22
21 34
21 57
21 82
23 25
23 28
23 88
24 50
33 51
33 65
33 74
35 68
40 72
41 62
41 78
47 76

input:

6
94 47
1 2
3 4
3 53
3 70
5 6
5 27
5 42
5 77
7 8
7 37
7 56
9 10
9 29
9 31
9 86
11 12
11 63
13 14
13 30
13 32
13 46
13 48
13 54
13 55
13 61
15 16
15 38
15 75
17 18
19 20
19 26
21 22
21 34
21 57
21 82
23 25
23 28
23 88
24 50
33 51
33 65
33 74
35 68
40 72
41 62
41 78
47 76

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
777434612360931036

Test #36:

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

input:

5
705262511549880222

output:

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

input:

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

output:

6
94 48
1 2
2 38
2 67
2 74
2 80
3 4
4 52
4 82
5 6
6 45
6 48
7 8
8 46
9 10
10 37
10 51
11 24
12 13
12 27
12 50
14 15
14 26
14 29
14 34
14 39
14 41
16 17
16 44
18 19
18 31
18 32
18 70
18 71
20 21
22 23
22 58
25 62
25 65
25 87
30 57
35 54
35 89
36 90
40 55
42 56
42 77
42 85
47 60

input:

6
94 48
1 2
2 38
2 67
2 74
2 80
3 4
4 52
4 82
5 6
6 45
6 48
7 8
8 46
9 10
10 37
10 51
11 24
12 13
12 27
12 50
14 15
14 26
14 29
14 34
14 39
14 41
16 17
16 44
18 19
18 31
18 32
18 70
18 71
20 21
22 23
22 58
25 62
25 65
25 87
30 57
35 54
35 89
36 90
40 55
42 56
42 77
42 85
47 60

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
705262511549880222

Test #37:

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

input:

5
510318082834167951

output:

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

input:

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

output:

6
94 49
2 3
2 76
4 5
6 7
8 9
8 25
8 38
8 44
8 54
10 11
10 67
10 80
12 13
12 42
12 59
14 15
14 36
14 79
16 17
16 56
16 94
18 19
18 30
20 21
20 27
20 64
22 23
22 32
22 35
22 40
22 57
22 62
22 74
28 55
28 82
31 85
31 89
34 49
34 65
34 71
34 92
37 75
39 78
41 87
41 88
43 48
45 61
45 83
46 47

input:

6
94 49
2 3
2 76
4 5
6 7
8 9
8 25
8 38
8 44
8 54
10 11
10 67
10 80
12 13
12 42
12 59
14 15
14 36
14 79
16 17
16 56
16 94
18 19
18 30
20 21
20 27
20 64
22 23
22 32
22 35
22 40
22 57
22 62
22 74
28 55
28 82
31 85
31 89
34 49
34 65
34 71
34 92
37 75
39 78
41 87
41 88
43 48
45 61
45 83
46 47

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
510318082834167951

Test #38:

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

input:

5
914858813253258744

output:

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

input:

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

output:

6
94 47
1 2
3 4
4 49
4 63
4 82
5 29
6 7
6 55
8 9
8 37
8 68
10 11
10 36
10 41
12 13
12 39
12 90
14 15
14 34
14 59
16 17
18 19
18 28
18 44
20 21
22 23
22 80
24 64
25 71
25 73
25 83
26 51
26 94
27 65
27 67
30 53
30 54
30 69
31 77
32 85
38 66
40 58
42 79
42 93
43 89
45 76
46 47

input:

6
94 47
1 2
3 4
4 49
4 63
4 82
5 29
6 7
6 55
8 9
8 37
8 68
10 11
10 36
10 41
12 13
12 39
12 90
14 15
14 34
14 59
16 17
18 19
18 28
18 44
20 21
22 23
22 80
24 64
25 71
25 73
25 83
26 51
26 94
27 65
27 67
30 53
30 54
30 69
31 77
32 85
38 66
40 58
42 79
42 93
43 89
45 76
46 47

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
914858813253258744

Test #39:

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

input:

5
659635316746638238

output:

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

input:

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

output:

6
94 50
1 2
3 4
3 25
3 61
5 6
5 43
5 44
5 55
5 60
5 86
7 8
7 74
9 10
9 27
9 58
9 63
9 64
9 70
11 12
11 37
11 92
13 14
13 31
13 33
13 38
13 90
15 16
15 34
15 40
15 84
15 89
17 18
17 42
19 20
19 45
21 22
21 35
23 48
23 79
24 71
26 75
26 76
29 69
30 53
30 56
32 51
46 47
46 82
46 91
46 94

input:

6
94 50
1 2
3 4
3 25
3 61
5 6
5 43
5 44
5 55
5 60
5 86
7 8
7 74
9 10
9 27
9 58
9 63
9 64
9 70
11 12
11 37
11 92
13 14
13 31
13 33
13 38
13 90
15 16
15 34
15 40
15 84
15 89
17 18
17 42
19 20
19 45
21 22
21 35
23 48
23 79
24 71
26 75
26 76
29 69
30 53
30 56
32 51
46 47
46 82
46 91
46 94

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
659635316746638238

Test #40:

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

input:

7
858490260563149759

output:

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

input:

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

output:

8
94 47
2 58
5 75
6 79
7 87
9 71
11 25
11 26
11 48
11 91
12 45
12 78
14 36
14 62
15 41
16 73
18 59
19 51
19 82
20 56
20 65
20 93
21 88
22 77
23 64
24 74
27 57
27 80
28 55
28 66
28 92
29 69
30 67
31 94
32 52
32 70
33 90
34 72
34 85
35 49
37 53
38 50
39 63
40 61
42 60
42 76
44 86
47 84

input:

8
94 47
2 58
5 75
6 79
7 87
9 71
11 25
11 26
11 48
11 91
12 45
12 78
14 36
14 62
15 41
16 73
18 59
19 51
19 82
20 56
20 65
20 93
21 88
22 77
23 64
24 74
27 57
27 80
28 55
28 66
28 92
29 69
30 67
31 94
32 52
32 70
33 90
34 72
34 85
35 49
37 53
38 50
39 63
40 61
42 60
42 76
44 86
47 84

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
858490260563149759

Test #41:

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

input:

7
860058643727731209

output:

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

input:

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

output:

8
94 47
1 2
2 61
3 4
3 40
7 35
7 65
8 28
8 29
8 37
8 83
9 44
10 69
10 79
10 85
10 90
11 94
13 33
13 55
14 15
14 67
17 88
18 53
18 74
18 93
19 43
19 58
19 77
19 80
20 21
21 22
21 25
22 23
23 70
23 82
24 76
24 84
26 56
26 68
26 92
38 50
38 62
38 78
39 81
39 91
47 48
47 75
47 89

input:

8
94 47
1 2
2 61
3 4
3 40
7 35
7 65
8 28
8 29
8 37
8 83
9 44
10 69
10 79
10 85
10 90
11 94
13 33
13 55
14 15
14 67
17 88
18 53
18 74
18 93
19 43
19 58
19 77
19 80
20 21
21 22
21 25
22 23
23 70
23 82
24 76
24 84
26 56
26 68
26 92
38 50
38 62
38 78
39 81
39 91
47 48
47 75
47 89

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
860058643727731209

Test #42:

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

input:

7
718861404514377808

output:

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

input:

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

output:

8
94 47
1 80
2 70
9 31
9 88
12 53
14 24
15 55
15 89
15 93
16 42
16 52
17 83
18 62
18 85
20 72
22 57
23 64
23 92
25 81
26 65
26 84
27 51
28 74
29 69
30 59
32 49
32 87
33 73
34 54
36 61
36 79
36 86
37 58
38 50
38 60
38 63
38 71
39 48
39 67
39 78
40 56
41 90
44 76
45 68
46 66
47 77
47 91

input:

8
94 47
1 80
2 70
9 31
9 88
12 53
14 24
15 55
15 89
15 93
16 42
16 52
17 83
18 62
18 85
20 72
22 57
23 64
23 92
25 81
26 65
26 84
27 51
28 74
29 69
30 59
32 49
32 87
33 73
34 54
36 61
36 79
36 86
37 58
38 50
38 60
38 63
38 71
39 48
39 67
39 78
40 56
41 90
44 76
45 68
46 66
47 77
47 91

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
718861404514377808

Test #43:

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

input:

7
659192688464047828

output:

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

input:

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

output:

8
94 47
3 86
4 5
5 6
5 30
5 94
6 46
8 41
9 33
9 82
11 12
11 39
12 43
12 60
14 93
18 28
18 87
19 20
19 32
20 21
20 25
21 63
23 44
23 65
23 73
24 55
24 75
24 78
26 51
26 52
26 54
27 50
27 92
28 57
28 79
30 81
30 84
34 49
34 72
34 85
35 59
35 88
41 56
41 77
44 62
44 68
46 48
46 66

input:

8
94 47
3 86
4 5
5 6
5 30
5 94
6 46
8 41
9 33
9 82
11 12
11 39
12 43
12 60
14 93
18 28
18 87
19 20
19 32
20 21
20 25
21 63
23 44
23 65
23 73
24 55
24 75
24 78
26 51
26 52
26 54
27 50
27 92
28 57
28 79
30 81
30 84
34 49
34 72
34 85
35 59
35 88
41 56
41 77
44 62
44 68
46 48
46 66

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
659192688464047828

Test #44:

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

input:

7
685730986714800201

output:

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

input:

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

output:

8
94 47
3 30
3 31
3 73
4 5
4 44
5 6
5 28
5 77
5 90
6 65
9 10
9 48
10 37
10 46
10 57
11 29
11 33
11 94
13 24
13 68
13 81
14 15
14 36
15 60
15 62
16 25
16 78
18 89
19 67
22 66
23 93
25 71
25 72
29 75
29 88
31 54
31 74
32 49
32 53
35 79
35 91
37 64
37 69
39 61
39 83
46 47
46 76

input:

8
94 47
3 30
3 31
3 73
4 5
4 44
5 6
5 28
5 77
5 90
6 65
9 10
9 48
10 37
10 46
10 57
11 29
11 33
11 94
13 24
13 68
13 81
14 15
14 36
15 60
15 62
16 25
16 78
18 89
19 67
22 66
23 93
25 71
25 72
29 75
29 88
31 54
31 74
32 49
32 53
35 79
35 91
37 64
37 69
39 61
39 83
46 47
46 76

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
685730986714800201