QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#421458#8726. Magic Showcqbzly100 ✓0ms1776kbC++14709b2024-05-25 19:19:242024-05-25 19:19:24

Judging History

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

  • [2024-05-25 19:19:24]
  • 评测
  • 测评结果:100
  • 用时:0ms
  • 内存:1776kb
  • [2024-05-25 19:19:24]
  • 提交

Alice

#include<bits/stdc++.h>
#include "Alice.h"
#define ll long long
#define pb push_back
using namespace std;
vector<pair<int,int>>Alice(){
    int n=500;
    ll x=setN(n);
    vector<pair<int,int>>vec;
    for(int i=1;i<n;i++){
        vec.pb({i+1,x%i+1});
    }
    return vec;
}

Bob

#include<bits/stdc++.h>
#include "Bob.h"
#define ll long long
#define pb push_back
#define fi first
#define se second
using namespace std;
ll Bob(vector<pair<int,int>>V){
    __int128 lcm=1,x=0;
    for(auto e:V){
        e.fi--,e.se--;
        __int128 llcm=lcm*e.se/__gcd(lcm,(__int128)e.se);
        while(x%e.se!=e.fi)x=(x+lcm)%llcm;
        if(llcm>=1e18)return (ll)x;
        lcm=llcm;
    }
}

详细

Subtask #1:

score: 5
Accepted

Test #1:

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

input:

1
4005

output:

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

input:

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

output:

2
500 351
1 2
1 4
1 16
1 46
1 90
1 446
2 3
2 5
2 8
2 12
2 14
2 15
2 27
2 29
2 78
2 92
2 144
2 155
2 183
2 287
2 309
4 24
4 30
4 47
4 59
4 70
4 175
6 9
6 11
6 17
6 21
6 33
6 101
6 161
6 201
6 401
7 32
7 94
10 19
10 28
10 37
10 38
10 109
10 112
10 149
10 223
10 445
11 18
11 86
11 236
13 34
13 122
13 3...

input:

2
500 351
1 2
1 4
1 16
1 46
1 90
1 446
2 3
2 5
2 8
2 12
2 14
2 15
2 27
2 29
2 78
2 92
2 144
2 155
2 183
2 287
2 309
4 24
4 30
4 47
4 59
4 70
4 175
6 9
6 11
6 17
6 21
6 33
6 101
6 161
6 201
6 401
7 32
7 94
10 19
10 28
10 37
10 38
10 109
10 112
10 149
10 223
10 445
11 18
11 86
11 236
13 34
13 122
13 3...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4005

Test #2:

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

input:

1
459

output:

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

input:

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

output:

2
500 351
1 2
1 4
1 18
1 28
1 52
1 154
1 460
2 3
2 230
3 458
4 5
4 9
4 20
4 25
4 39
4 58
4 153
4 457
5 8
5 14
5 36
5 66
5 92
6 228
8 227
8 453
9 12
9 42
9 452
10 11
10 16
10 19
10 31
10 46
10 76
10 91
10 151
10 226
11 450
12 15
12 17
12 29
12 33
12 57
12 65
12 225
13 150
13 448
14 224
14 447
15 90
1...

input:

2
500 351
1 2
1 4
1 18
1 28
1 52
1 154
1 460
2 3
2 230
3 458
4 5
4 9
4 20
4 25
4 39
4 58
4 153
4 457
5 8
5 14
5 36
5 66
5 92
6 228
8 227
8 453
9 12
9 42
9 452
10 11
10 16
10 19
10 31
10 46
10 76
10 91
10 151
10 226
11 450
12 15
12 17
12 29
12 33
12 57
12 65
12 225
13 150
13 448
14 224
14 447
15 90
1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
459

Test #3:

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

input:

1
2495

output:

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

input:

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

output:

2
500 351
1 2
2 3
2 30
2 59
2 87
3 4
3 278
4 5
4 8
4 15
4 29
4 90
4 179
4 357
6 11
6 16
6 31
6 84
6 250
6 416
7 20
8 9
8 312
10 12
10 227
11 36
11 356
11 498
12 19
12 24
12 28
12 37
12 47
12 70
12 109
12 208
12 277
13 14
13 192
14 18
14 35
14 147
16 17
16 21
16 32
16 63
16 125
16 156
16 311
17 38
18...

input:

2
500 351
1 2
2 3
2 30
2 59
2 87
3 4
3 278
4 5
4 8
4 15
4 29
4 90
4 179
4 357
6 11
6 16
6 31
6 84
6 250
6 416
7 20
8 9
8 312
10 12
10 227
11 36
11 356
11 498
12 19
12 24
12 28
12 37
12 47
12 70
12 109
12 208
12 277
13 14
13 192
14 18
14 35
14 147
16 17
16 21
16 32
16 63
16 125
16 156
16 311
17 38
18...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
2495

Test #4:

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

input:

3
1560

output:

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

input:

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

output:

4
500 250
1 2
1 3
1 4
1 5
1 6
1 7
1 9
1 11
1 13
1 14
1 16
1 21
1 25
1 27
1 31
1 40
1 41
1 53
1 61
1 66
1 79
1 105
1 121
1 131
1 157
1 196
1 261
1 313
1 391
5 390
6 312
17 387
19 258
20 24
20 68
24 30
24 54
26 308
27 60
27 119
28 74
28 220
29 384
32 140
33 192
33 383
35 110
35 219
36 62
36 306
40 118...

input:

4
500 250
1 2
1 3
1 4
1 5
1 6
1 7
1 9
1 11
1 13
1 14
1 16
1 21
1 25
1 27
1 31
1 40
1 41
1 53
1 61
1 66
1 79
1 105
1 121
1 131
1 157
1 196
1 261
1 313
1 391
5 390
6 312
17 387
19 258
20 24
20 68
24 30
24 54
26 308
27 60
27 119
28 74
28 220
29 384
32 140
33 192
33 383
35 110
35 219
36 62
36 306
40 118...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1560

Test #5:

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

input:

3
3594

output:

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

input:

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

output:

4
500 250
6 38
6 98
8 18
8 212
10 16
10 240
18 50
18 74
19 25
22 398
25 31
25 35
25 36
25 43
25 52
25 71
25 86
25 103
25 106
25 120
25 171
25 211
25 239
25 256
25 358
26 44
26 84
27 224
27 447
33 138
33 275
39 128
39 255
42 188
42 324
44 54
44 68
49 198
49 395
51 444
58 132
58 394
60 102
64 108
64 3...

input:

4
500 250
6 38
6 98
8 18
8 212
10 16
10 240
18 50
18 74
19 25
22 398
25 31
25 35
25 36
25 43
25 52
25 71
25 86
25 103
25 106
25 120
25 171
25 211
25 239
25 256
25 358
26 44
26 84
27 224
27 447
33 138
33 275
39 128
39 255
42 188
42 324
44 54
44 68
49 198
49 395
51 444
58 132
58 394
60 102
64 108
64 3...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
3594

Test #6:

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

input:

3
1750

output:

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

input:

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

output:

4
500 250
6 350
12 38
12 48
13 23
14 194
16 348
19 434
21 174
21 347
23 25
23 28
23 33
23 37
23 49
23 55
23 65
23 73
23 97
23 109
23 145
23 193
23 217
23 289
23 433
24 158
27 432
32 192
34 102
40 60
48 132
49 75
53 284
56 114
56 340
60 90
63 212
63 423
64 242
65 282
66 338
67 422
72 74
75 420
76 336...

input:

4
500 250
6 350
12 38
12 48
13 23
14 194
16 348
19 434
21 174
21 347
23 25
23 28
23 33
23 37
23 49
23 55
23 65
23 73
23 97
23 109
23 145
23 193
23 217
23 289
23 433
24 158
27 432
32 192
34 102
40 60
48 132
49 75
53 284
56 114
56 340
60 90
63 212
63 423
64 242
65 282
66 338
67 422
72 74
75 420
76 336...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1750

Test #7:

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

input:

5
4878

output:

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

input:

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

output:

6
500 266
1 2
3 5
3 24
3 47
3 54
3 93
3 107
3 213
4 6
4 14
4 16
4 26
4 40
4 66
4 76
4 126
4 196
4 326
4 376
7 8
7 9
7 13
7 15
7 22
7 25
7 29
7 30
7 43
7 57
7 59
7 85
7 88
7 117
7 169
7 175
7 204
7 233
7 349
7 407
12 32
12 158
17 18
17 23
17 27
17 35
17 144
17 188
17 222
17 287
17 375
17 443
19 21
19...

input:

6
500 266
1 2
3 5
3 24
3 47
3 54
3 93
3 107
3 213
4 6
4 14
4 16
4 26
4 40
4 66
4 76
4 126
4 196
4 326
4 376
7 8
7 9
7 13
7 15
7 22
7 25
7 29
7 30
7 43
7 57
7 59
7 85
7 88
7 117
7 169
7 175
7 204
7 233
7 349
7 407
12 32
12 158
17 18
17 23
17 27
17 35
17 144
17 188
17 222
17 287
17 375
17 443
19 21
19...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4878

Test #8:

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

input:

5
1223

output:

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

input:

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

output:

6
500 251
2 3
2 14
2 27
2 48
2 95
4 5
4 6
4 11
4 21
4 62
4 123
4 245
4 306
8 9
8 17
8 20
8 33
8 39
8 65
8 77
8 153
8 305
12 13
12 102
12 203
12 304
12 405
15 32
15 40
15 94
15 404
16 152
16 303
18 19
18 68
18 135
18 202
18 403
24 25
24 26
24 31
24 41
24 49
24 51
24 61
24 76
24 81
24 101
24 121
24 15...

input:

6
500 251
2 3
2 14
2 27
2 48
2 95
4 5
4 6
4 11
4 21
4 62
4 123
4 245
4 306
8 9
8 17
8 20
8 33
8 39
8 65
8 77
8 153
8 305
12 13
12 102
12 203
12 304
12 405
15 32
15 40
15 94
15 404
16 152
16 303
18 19
18 68
18 135
18 202
18 403
24 25
24 26
24 31
24 41
24 49
24 51
24 61
24 76
24 81
24 101
24 121
24 15...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1223

Test #9:

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

input:

5
648

output:

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

input:

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

output:

6
500 252
1 2
3 18
3 20
3 35
3 39
3 324
4 6
4 16
4 44
4 130
4 216
5 8
5 15
5 24
5 29
5 47
5 93
5 162
5 323
7 108
7 215
7 322
9 11
9 17
9 21
9 33
9 41
9 65
9 81
9 129
9 161
9 321
10 72
10 214
12 14
12 50
12 92
13 54
13 107
13 160
13 213
13 319
19 22
19 31
19 36
19 43
19 46
19 64
19 71
19 91
19 106
19...

input:

6
500 252
1 2
3 18
3 20
3 35
3 39
3 324
4 6
4 16
4 44
4 130
4 216
5 8
5 15
5 24
5 29
5 47
5 93
5 162
5 323
7 108
7 215
7 322
9 11
9 17
9 21
9 33
9 41
9 65
9 81
9 129
9 161
9 321
10 72
10 214
12 14
12 50
12 92
13 54
13 107
13 160
13 213
13 319
19 22
19 31
19 36
19 43
19 46
19 64
19 71
19 91
19 106
19...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
648

Test #10:

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

input:

7
4475

output:

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

input:

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

output:

8
500 250
5 18
7 42
7 110
16 224
16 447
17 50
17 344
22 35
23 62
23 74
24 29
24 85
24 213
24 319
28 33
28 279
31 128
37 194
38 318
39 88
39 154
39 494
43 342
43 404
44 278
45 212
46 444
47 104
49 234
52 317
54 67
54 135
54 202
54 403
56 222
56 341
56 443
57 492
58 95
60 70
60 139
60 185
60 193
60 36...

input:

8
500 250
5 18
7 42
7 110
16 224
16 447
17 50
17 344
22 35
23 62
23 74
24 29
24 85
24 213
24 319
28 33
28 279
31 128
37 194
38 318
39 88
39 154
39 494
43 342
43 404
44 278
45 212
46 444
47 104
49 234
52 317
54 67
54 135
54 202
54 403
56 222
56 341
56 443
57 492
58 95
60 70
60 139
60 185
60 193
60 36...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4475

Test #11:

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

input:

7
4240

output:

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

input:

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

output:

8
500 250
3 14
3 164
3 327
4 224
5 354
7 30
7 74
7 147
8 84
9 24
13 15
13 152
13 303
16 26
16 66
16 170
16 326
18 104
21 212
21 423
26 282
28 384
31 422
32 184
33 264
36 146
38 468
39 192
39 383
42 222
42 324
47 234
47 467
49 132
50 128
50 382
51 420
52 60
52 72
53 350
58 90
59 103
59 124
59 247
60 ...

input:

8
500 250
3 14
3 164
3 327
4 224
5 354
7 30
7 74
7 147
8 84
9 24
13 15
13 152
13 303
16 26
16 66
16 170
16 326
18 104
21 212
21 423
26 282
28 384
31 422
32 184
33 264
36 146
38 468
39 192
39 383
42 222
42 324
47 234
47 467
49 132
50 128
50 382
51 420
52 60
52 72
53 350
58 90
59 103
59 124
59 247
60 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4240

Test #12:

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

input:

7
1291

output:

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

input:

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

output:

8
500 250
7 258
22 255
24 318
26 423
28 159
29 422
31 98
34 75
35 420
36 315
37 252
39 180
40 314
41 418
42 126
46 90
46 179
47 250
48 312
49 114
53 178
57 66
59 138
59 412
64 308
65 410
67 246
76 153
81 174
82 111
82 243
83 94
83 404
84 303
86 135
86 403
87 242
88 173
89 402
93 110
96 300
97 240
98...

input:

8
500 250
7 258
22 255
24 318
26 423
28 159
29 422
31 98
34 75
35 420
36 315
37 252
39 180
40 314
41 418
42 126
46 90
46 179
47 250
48 312
49 114
53 178
57 66
59 138
59 412
64 308
65 410
67 246
76 153
81 174
82 111
82 243
83 94
83 404
84 303
86 135
86 403
87 242
88 173
89 402
93 110
96 300
97 240
98...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1291

Subtask #2:

score: 30
Accepted

Test #13:

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

input:

1
17476204

output:

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

input:

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

output:

2
500 351
1 2
1 3
1 5
1 18
1 35
2 4
2 108
5 8
5 9
5 11
5 15
5 16
5 19
5 20
5 21
5 22
5 25
5 29
5 31
5 36
5 37
5 39
5 43
5 46
5 57
5 58
5 64
5 71
5 76
5 85
5 91
5 101
5 106
5 121
5 127
5 134
5 141
5 147
5 151
5 153
5 169
5 172
5 181
5 191
5 201
5 211
5 220
5 226
5 253
5 267
5 281
5 286
5 293
5 301
5 ...

input:

2
500 351
1 2
1 3
1 5
1 18
1 35
2 4
2 108
5 8
5 9
5 11
5 15
5 16
5 19
5 20
5 21
5 22
5 25
5 29
5 31
5 36
5 37
5 39
5 43
5 46
5 57
5 58
5 64
5 71
5 76
5 85
5 91
5 101
5 106
5 121
5 127
5 134
5 141
5 147
5 151
5 153
5 169
5 172
5 181
5 191
5 201
5 211
5 220
5 226
5 253
5 267
5 281
5 286
5 293
5 301
5 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
17476204

Test #14:

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

input:

1
11926600

output:

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

input:

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

output:

2
500 351
1 2
1 3
1 5
1 8
1 9
1 11
1 15
1 21
1 29
1 36
1 50
1 57
1 71
1 99
1 101
1 141
1 197
1 201
1 246
1 281
1 351
1 393
1 491
2 4
2 32
2 94
3 30
3 59
3 62
3 123
5 12
5 34
5 67
7 147
8 22
8 64
9 17
9 33
9 65
9 332
10 180
11 14
11 16
11 27
11 31
11 40
11 66
11 131
11 160
11 196
11 266
11 319
13 18
...

input:

2
500 351
1 2
1 3
1 5
1 8
1 9
1 11
1 15
1 21
1 29
1 36
1 50
1 57
1 71
1 99
1 101
1 141
1 197
1 201
1 246
1 281
1 351
1 393
1 491
2 4
2 32
2 94
3 30
3 59
3 62
3 123
5 12
5 34
5 67
7 147
8 22
8 64
9 17
9 33
9 65
9 332
10 180
11 14
11 16
11 27
11 31
11 40
11 66
11 131
11 160
11 196
11 266
11 319
13 18
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
11926600

Test #15:

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

input:

1
16602378

output:

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

input:

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

output:

2
500 351
1 2
1 3
1 4
1 14
1 27
1 40
2 12
3 5
3 8
3 9
3 15
3 29
3 42
3 50
3 57
3 83
3 99
3 165
3 197
3 288
3 329
3 393
4 16
4 76
4 376
5 240
5 479
7 19
7 37
7 395
8 20
8 200
9 11
9 18
9 35
9 62
9 86
9 123
9 171
10 22
11 17
11 33
11 65
11 129
11 257
13 24
13 34
13 47
13 67
13 70
13 254
14 66
14 164
1...

input:

2
500 351
1 2
1 3
1 4
1 14
1 27
1 40
2 12
3 5
3 8
3 9
3 15
3 29
3 42
3 50
3 57
3 83
3 99
3 165
3 197
3 288
3 329
3 393
4 16
4 76
4 376
5 240
5 479
7 19
7 37
7 395
8 20
8 200
9 11
9 18
9 35
9 62
9 86
9 123
9 171
10 22
11 17
11 33
11 65
11 129
11 257
13 24
13 34
13 47
13 67
13 70
13 254
14 66
14 164
1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
16602378

Test #16:

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

input:

3
13129243

output:

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

input:

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

output:

4
500 250
3 98
6 468
7 12
9 36
11 44
12 17
17 374
19 26
19 42
20 25
20 200
20 399
21 264
23 108
23 322
33 60
37 50
38 168
38 335
39 116
44 46
44 49
44 51
44 57
44 61
44 64
44 71
44 73
44 76
44 81
44 85
44 91
44 101
44 106
44 113
44 121
44 127
44 141
44 145
44 151
44 169
44 176
44 181
44 201
44 211
4...

input:

4
500 250
3 98
6 468
7 12
9 36
11 44
12 17
17 374
19 26
19 42
20 25
20 200
20 399
21 264
23 108
23 322
33 60
37 50
38 168
38 335
39 116
44 46
44 49
44 51
44 57
44 61
44 64
44 71
44 73
44 76
44 81
44 85
44 91
44 101
44 106
44 113
44 121
44 127
44 141
44 145
44 151
44 169
44 176
44 181
44 201
44 211
4...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
13129243

Test #17:

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

input:

3
7892141

output:

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

input:

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

output:

4
500 250
1 200
3 4
4 84
4 167
5 12
5 408
11 42
12 16
15 28
16 23
22 41
22 192
22 383
28 35
28 98
28 195
30 49
32 180
32 359
33 228
37 116
37 300
39 74
39 220
42 46
42 51
42 55
42 61
42 75
42 76
42 80
42 91
42 101
42 109
42 112
42 136
42 149
42 151
42 159
42 181
42 186
42 223
42 226
42 238
42 271
42...

input:

4
500 250
1 200
3 4
4 84
4 167
5 12
5 408
11 42
12 16
15 28
16 23
22 41
22 192
22 383
28 35
28 98
28 195
30 49
32 180
32 359
33 228
37 116
37 300
39 74
39 220
42 46
42 51
42 55
42 61
42 75
42 76
42 80
42 91
42 101
42 109
42 112
42 136
42 149
42 151
42 159
42 181
42 186
42 223
42 226
42 238
42 271
42...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
7892141

Test #18:

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

input:

3
21314775

output:

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

input:

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

output:

4
500 250
2 3
2 14
2 27
4 28
7 22
9 440
14 15
17 74
20 87
20 173
22 402
23 60
23 80
23 270
25 58
26 51
26 126
26 251
28 29
28 40
28 43
28 53
28 79
28 85
28 92
28 132
28 150
28 157
28 183
28 263
28 274
28 299
28 365
28 394
28 448
35 182
38 75
38 114
38 227
39 102
39 240
41 48
41 236
42 138
42 275
49 ...

input:

4
500 250
2 3
2 14
2 27
4 28
7 22
9 440
14 15
17 74
20 87
20 173
22 402
23 60
23 80
23 270
25 58
26 51
26 126
26 251
28 29
28 40
28 43
28 53
28 79
28 85
28 92
28 132
28 150
28 157
28 183
28 263
28 274
28 299
28 365
28 394
28 448
35 182
38 75
38 114
38 227
39 102
39 240
41 48
41 236
42 138
42 275
49 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
21314775

Test #19:

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

input:

5
5559540

output:

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

input:

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

output:

6
500 259
1 2
4 24
4 70
4 198
4 410
5 9
5 17
5 48
5 95
5 189
5 377
6 284
7 10
7 19
7 74
7 147
7 220
7 439
8 20
8 134
13 14
13 25
13 27
13 40
13 53
13 79
13 104
13 105
13 157
13 174
13 207
13 310
13 313
13 347
13 413
15 68
15 135
15 470
16 26
16 46
16 76
16 226
21 33
21 41
21 81
21 161
23 42
23 83
23...

input:

6
500 259
1 2
4 24
4 70
4 198
4 410
5 9
5 17
5 48
5 95
5 189
5 377
6 284
7 10
7 19
7 74
7 147
7 220
7 439
8 20
8 134
13 14
13 25
13 27
13 40
13 53
13 79
13 104
13 105
13 157
13 174
13 207
13 310
13 313
13 347
13 413
15 68
15 135
15 470
16 26
16 46
16 76
16 226
21 33
21 41
21 81
21 161
23 42
23 83
23...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
5559540

Test #20:

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

input:

5
9424319

output:

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

input:

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

output:

6
500 275
1 2
2 84
2 167
3 4
4 12
4 23
4 45
5 6
6 7
6 19
8 9
10 11
13 18
13 38
14 60
14 119
15 16
15 34
15 46
15 56
15 80
15 100
15 166
15 238
15 242
15 396
15 496
17 390
20 21
20 26
20 51
20 74
20 101
20 147
20 293
20 366
22 27
24 25
24 28
24 29
24 37
24 43
24 47
24 55
24 57
24 64
24 70
24 73
24 85...

input:

6
500 275
1 2
2 84
2 167
3 4
4 12
4 23
4 45
5 6
6 7
6 19
8 9
10 11
13 18
13 38
14 60
14 119
15 16
15 34
15 46
15 56
15 80
15 100
15 166
15 238
15 242
15 396
15 496
17 390
20 21
20 26
20 51
20 74
20 101
20 147
20 293
20 366
22 27
24 25
24 28
24 29
24 37
24 43
24 47
24 55
24 57
24 64
24 70
24 73
24 85...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
9424319

Test #21:

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

input:

5
10955780

output:

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

input:

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

output:

6
500 251
1 5
2 284
3 4
3 7
5 14
5 17
5 27
5 33
5 53
5 65
5 105
5 129
5 209
5 257
5 417
6 16
6 26
6 76
8 68
8 102
9 10
11 15
11 36
11 71
12 18
12 34
12 52
12 60
12 178
12 188
12 332
19 98
19 195
20 198
21 25
21 31
21 41
21 49
21 61
21 81
21 121
21 192
21 240
21 241
21 383
21 479
28 138
28 212
28 380...

input:

6
500 251
1 5
2 284
3 4
3 7
5 14
5 17
5 27
5 33
5 53
5 65
5 105
5 129
5 209
5 257
5 417
6 16
6 26
6 76
8 68
8 102
9 10
11 15
11 36
11 71
12 18
12 34
12 52
12 60
12 178
12 188
12 332
19 98
19 195
20 198
21 25
21 31
21 41
21 49
21 61
21 81
21 121
21 192
21 240
21 241
21 383
21 479
28 138
28 212
28 380...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
10955780

Test #22:

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

input:

7
19938721

output:

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

input:

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

output:

8
500 250
4 30
4 59
5 10
5 28
5 82
5 214
7 374
8 39
8 115
9 44
11 40
11 462
13 74
14 19
14 38
14 75
14 112
14 334
14 445
16 54
16 107
17 256
18 63
18 123
18 245
18 249
18 489
18 497
20 43
21 108
22 51
22 93
22 101
22 461
27 96
27 134
32 55
32 136
32 271
35 252
36 158
36 315
41 64
45 254
46 77
47 84
...

input:

8
500 250
4 30
4 59
5 10
5 28
5 82
5 214
7 374
8 39
8 115
9 44
11 40
11 462
13 74
14 19
14 38
14 75
14 112
14 334
14 445
16 54
16 107
17 256
18 63
18 123
18 245
18 249
18 489
18 497
20 43
21 108
22 51
22 93
22 101
22 461
27 96
27 134
32 55
32 136
32 271
35 252
36 158
36 315
41 64
45 254
46 77
47 84
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
19938721

Test #23:

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

input:

7
5129508

output:

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

input:

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

output:

8
500 250
2 332
3 20
3 24
3 438
4 16
5 17
5 158
5 315
7 15
10 54
10 160
12 444
18 30
18 74
22 28
22 58
22 102
22 210
22 244
22 298
22 304
23 95
23 198
23 278
32 338
32 492
34 196
34 326
35 150
35 299
36 108
40 124
40 370
42 50
43 72
43 214
43 427
44 56
45 422
46 258
47 378
48 290
49 61
49 64
49 71
4...

input:

8
500 250
2 332
3 20
3 24
3 438
4 16
5 17
5 158
5 315
7 15
10 54
10 160
12 444
18 30
18 74
22 28
22 58
22 102
22 210
22 244
22 298
22 304
23 95
23 198
23 278
32 338
32 492
34 196
34 326
35 150
35 299
36 108
40 124
40 370
42 50
43 72
43 214
43 427
44 56
45 422
46 258
47 378
48 290
49 61
49 64
49 71
4...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
5129508

Test #24:

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

input:

7
15332941

output:

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

input:

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

output:

8
500 250
2 3
2 5
2 7
2 10
2 16
2 19
2 36
2 44
2 46
2 61
2 71
2 87
2 91
2 106
2 127
2 141
2 173
2 181
2 216
2 253
2 259
2 316
2 388
2 421
2 431
4 168
4 335
8 83
8 124
8 158
8 247
8 315
8 472
15 24
17 26
17 76
18 77
18 230
18 459
21 164
29 332
31 102
31 374
31 408
33 272
37 96
39 138
40 483
41 450
42...

input:

8
500 250
2 3
2 5
2 7
2 10
2 16
2 19
2 36
2 44
2 46
2 61
2 71
2 87
2 91
2 106
2 127
2 141
2 173
2 181
2 216
2 253
2 259
2 316
2 388
2 421
2 431
4 168
4 335
8 83
8 124
8 158
8 247
8 315
8 472
15 24
17 26
17 76
18 77
18 230
18 459
21 164
29 332
31 102
31 374
31 408
33 272
37 96
39 138
40 483
41 450
42...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
15332941

Subtask #3:

score: 65
Accepted

Test #25:

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

input:

1
355365355024496523

output:

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

input:

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

output:

2
500 351
1 2
1 4
1 8
1 22
2 3
4 5
4 9
4 11
4 12
4 16
4 19
4 21
4 25
4 31
4 34
4 37
4 46
4 56
4 67
4 89
4 91
4 111
4 121
4 181
4 199
4 221
4 265
4 284
4 361
4 397
4 441
4 496
6 14
6 27
7 32
7 94
8 15
8 29
10 24
10 38
10 47
10 70
10 84
10 112
10 223
10 250
11 30
12 17
12 33
12 65
12 129
13 28
15 18
1...

input:

2
500 351
1 2
1 4
1 8
1 22
2 3
4 5
4 9
4 11
4 12
4 16
4 19
4 21
4 25
4 31
4 34
4 37
4 46
4 56
4 67
4 89
4 91
4 111
4 121
4 181
4 199
4 221
4 265
4 284
4 361
4 397
4 441
4 496
6 14
6 27
7 32
7 94
8 15
8 29
10 24
10 38
10 47
10 70
10 84
10 112
10 223
10 250
11 30
12 17
12 33
12 65
12 129
13 28
15 18
1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
355365355024496523

Test #26:

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

input:

1
727827999106414164

output:

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

input:

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

output:

2
500 351
1 2
1 3
1 4
1 5
1 8
1 15
1 22
1 29
1 43
1 85
1 219
1 263
1 328
3 12
3 122
4 62
4 184
5 9
5 11
5 17
5 21
6 138
7 19
10 16
11 14
11 27
11 194
11 387
12 18
12 290
13 25
14 20
15 36
15 71
15 227
15 351
16 240
18 90
19 38
19 112
19 135
19 202
19 223
19 403
20 30
20 146
21 33
21 65
23 24
23 47
2...

input:

2
500 351
1 2
1 3
1 4
1 5
1 8
1 15
1 22
1 29
1 43
1 85
1 219
1 263
1 328
3 12
3 122
4 62
4 184
5 9
5 11
5 17
5 21
6 138
7 19
10 16
11 14
11 27
11 194
11 387
12 18
12 290
13 25
14 20
15 36
15 71
15 227
15 351
16 240
18 90
19 38
19 112
19 135
19 202
19 223
19 403
20 30
20 146
21 33
21 65
23 24
23 47
2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
727827999106414164

Test #27:

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

input:

1
656410143989222955

output:

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

input:

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

output:

2
500 351
1 2
1 4
1 16
1 28
1 46
1 82
1 84
1 136
1 250
1 406
1 416
2 3
2 18
2 35
3 12
4 5
4 8
4 9
4 15
4 22
4 25
4 29
4 43
4 57
4 85
4 169
6 11
7 160
7 348
8 14
8 27
9 38
9 42
10 19
10 24
10 47
10 70
10 208
10 402
11 36
12 17
12 33
16 20
16 21
16 31
16 39
16 58
16 191
16 286
16 381
18 50
18 99
18 10...

input:

2
500 351
1 2
1 4
1 16
1 28
1 46
1 82
1 84
1 136
1 250
1 406
1 416
2 3
2 18
2 35
3 12
4 5
4 8
4 9
4 15
4 22
4 25
4 29
4 43
4 57
4 85
4 169
6 11
7 160
7 348
8 14
8 27
9 38
9 42
10 19
10 24
10 47
10 70
10 208
10 402
11 36
12 17
12 33
16 20
16 21
16 31
16 39
16 58
16 191
16 286
16 381
18 50
18 99
18 10...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
656410143989222955

Test #28:

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

input:

1
410366615149657534

output:

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

input:

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

output:

2
500 351
1 2
1 3
1 147
1 410
2 4
3 5
3 24
3 47
3 143
3 285
5 8
5 11
5 14
5 15
5 16
5 19
5 22
5 27
5 28
5 31
5 36
5 40
5 43
5 46
5 64
5 66
5 71
5 91
5 92
5 106
5 118
5 127
5 131
5 136
5 183
5 190
5 196
5 211
5 235
5 316
5 379
6 12
7 9
9 20
9 32
9 39
9 63
10 284
12 30
12 204
14 202
15 17
15 21
16 18
...

input:

2
500 351
1 2
1 3
1 147
1 410
2 4
3 5
3 24
3 47
3 143
3 285
5 8
5 11
5 14
5 15
5 16
5 19
5 22
5 27
5 28
5 31
5 36
5 40
5 43
5 46
5 64
5 66
5 71
5 91
5 92
5 106
5 118
5 127
5 131
5 136
5 183
5 190
5 196
5 211
5 235
5 316
5 379
6 12
7 9
9 20
9 32
9 39
9 63
10 284
12 30
12 204
14 202
15 17
15 21
16 18
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
410366615149657534

Test #29:

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

input:

1
298090682780948428

output:

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

input:

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

output:

2
500 351
1 2
1 3
1 5
1 8
1 15
1 29
1 32
1 50
1 63
1 99
1 125
1 158
1 197
1 315
1 344
2 4
5 9
5 19
5 24
5 25
5 37
5 47
5 70
5 185
5 208
5 277
6 128
8 14
8 22
8 38
8 40
8 92
8 112
8 482
9 11
9 12
9 21
9 56
9 111
9 122
9 221
9 296
9 464
9 485
11 284
12 20
13 17
13 33
13 65
14 16
14 28
14 46
14 136
15 ...

input:

2
500 351
1 2
1 3
1 5
1 8
1 15
1 29
1 32
1 50
1 63
1 99
1 125
1 158
1 197
1 315
1 344
2 4
5 9
5 19
5 24
5 25
5 37
5 47
5 70
5 185
5 208
5 277
6 128
8 14
8 22
8 38
8 40
8 92
8 112
8 482
9 11
9 12
9 21
9 56
9 111
9 122
9 221
9 296
9 464
9 485
11 284
12 20
13 17
13 33
13 65
14 16
14 28
14 46
14 136
15 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
298090682780948428

Test #30:

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

input:

3
969441916331132577

output:

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

input:

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

output:

4
500 250
1 70
5 390
7 62
7 184
7 488
12 15
18 21
18 41
18 81
23 86
24 47
31 32
31 94
32 39
33 36
33 110
41 44
44 84
44 167
45 54
46 55
46 109
47 162
51 60
52 164
52 327
52 490
57 80
57 108
58 61
58 121
60 132
60 263
61 92
61 274
62 63
62 125
64 450
65 440
67 88
67 90
67 268
70 77
70 93
70 115
70 13...

input:

4
500 250
1 70
5 390
7 62
7 184
7 488
12 15
18 21
18 41
18 81
23 86
24 47
31 32
31 94
32 39
33 36
33 110
41 44
44 84
44 167
45 54
46 55
46 109
47 162
51 60
52 164
52 327
52 490
57 80
57 108
58 61
58 121
60 132
60 263
61 92
61 274
62 63
62 125
64 450
65 440
67 88
67 90
67 268
70 77
70 93
70 115
70 13...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
969441916331132577

Test #31:

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

input:

3
929489812741933634

output:

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

input:

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

output:

4
500 250
1 3
2 98
3 4
3 5
3 7
3 8
3 9
3 10
3 13
3 15
3 17
3 19
3 22
3 25
3 28
3 29
3 33
3 43
3 49
3 55
3 57
3 64
3 65
3 73
3 85
3 97
3 109
3 113
3 127
3 145
3 169
3 190
3 193
3 217
3 225
3 253
3 289
3 337
3 379
3 433
3 449
7 32
7 63
7 125
14 54
16 180
23 53
24 58
24 134
24 400
26 150
29 200
29 399
...

input:

4
500 250
1 3
2 98
3 4
3 5
3 7
3 8
3 9
3 10
3 13
3 15
3 17
3 19
3 22
3 25
3 28
3 29
3 33
3 43
3 49
3 55
3 57
3 64
3 65
3 73
3 85
3 97
3 109
3 113
3 127
3 145
3 169
3 190
3 193
3 217
3 225
3 253
3 289
3 337
3 379
3 433
3 449
7 32
7 63
7 125
14 54
16 180
23 53
24 58
24 134
24 400
26 150
29 200
29 399
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
929489812741933634

Test #32:

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

input:

3
144032041325838295

output:

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

input:

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

output:

4
500 250
1 6
1 36
3 42
6 140
6 279
7 14
10 18
10 35
13 90
13 164
15 78
16 41
25 62
25 458
29 64
29 82
29 190
29 244
31 450
34 59
35 98
35 292
36 141
36 360
41 84
41 250
41 416
43 134
52 234
52 467
53 94
53 138
53 412
54 159
57 162
59 144
59 170
59 430
62 115
63 252
64 147
64 293
68 230
68 459
71 17...

input:

4
500 250
1 6
1 36
3 42
6 140
6 279
7 14
10 18
10 35
13 90
13 164
15 78
16 41
25 62
25 458
29 64
29 82
29 190
29 244
31 450
34 59
35 98
35 292
36 141
36 360
41 84
41 250
41 416
43 134
52 234
52 467
53 94
53 138
53 412
54 159
57 162
59 144
59 170
59 430
62 115
63 252
64 147
64 293
68 230
68 459
71 17...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
144032041325838295

Test #33:

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

input:

3
832110946250826180

output:

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

input:

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

output:

4
500 250
1 13
2 8
6 26
6 182
7 108
7 215
7 322
13 19
13 25
13 28
13 32
13 37
13 44
13 54
13 55
13 63
13 73
13 82
13 87
13 94
13 107
13 109
13 125
13 160
13 163
13 173
13 187
13 213
13 217
13 249
13 259
13 280
13 319
13 325
13 345
13 373
13 388
13 425
13 478
14 278
15 282
17 53
18 24
18 98
18 270
21...

input:

4
500 250
1 13
2 8
6 26
6 182
7 108
7 215
7 322
13 19
13 25
13 28
13 32
13 37
13 44
13 54
13 55
13 63
13 73
13 82
13 87
13 94
13 107
13 109
13 125
13 160
13 163
13 173
13 187
13 213
13 217
13 249
13 259
13 280
13 319
13 325
13 345
13 373
13 388
13 425
13 478
14 278
15 282
17 53
18 24
18 98
18 270
21...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
832110946250826180

Test #34:

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

input:

3
85728715707691821

output:

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

input:

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

output:

4
500 250
1 4
4 19
5 32
5 464
6 9
9 228
10 22
17 36
17 440
22 25
22 26
22 28
22 31
22 37
22 41
22 46
22 51
22 55
22 61
22 73
22 76
22 82
22 91
22 101
22 109
22 121
22 136
22 151
22 163
22 181
22 201
22 217
22 226
22 271
22 301
22 325
22 361
22 406
22 451
28 98
28 195
28 292
29 314
36 63
36 299
37 72...

input:

4
500 250
1 4
4 19
5 32
5 464
6 9
9 228
10 22
17 36
17 440
22 25
22 26
22 28
22 31
22 37
22 41
22 46
22 51
22 55
22 61
22 73
22 76
22 82
22 91
22 101
22 109
22 121
22 136
22 151
22 163
22 181
22 201
22 217
22 226
22 271
22 301
22 325
22 361
22 406
22 451
28 98
28 195
28 292
29 314
36 63
36 299
37 72...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
85728715707691821

Test #35:

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

input:

5
777434612360931036

output:

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

input:

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

output:

6
500 254
1 2
1 4
1 5
1 7
1 10
1 13
1 19
1 37
1 158
1 264
1 315
1 472
6 14
6 38
6 482
9 15
9 29
12 26
12 138
12 168
16 22
17 21
18 368
23 39
23 134
23 267
27 47
27 116
27 231
28 44
28 84
28 130
28 250
28 388
30 68
30 470
31 35
31 52
31 59
31 88
31 103
31 140
31 175
31 279
31 290
31 418
31 494
32 66
...

input:

6
500 254
1 2
1 4
1 5
1 7
1 10
1 13
1 19
1 37
1 158
1 264
1 315
1 472
6 14
6 38
6 482
9 15
9 29
12 26
12 138
12 168
16 22
17 21
18 368
23 39
23 134
23 267
27 47
27 116
27 231
28 44
28 84
28 130
28 250
28 388
30 68
30 470
31 35
31 52
31 59
31 88
31 103
31 140
31 175
31 279
31 290
31 418
31 494
32 66
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
777434612360931036

Test #36:

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

input:

5
705262511549880222

output:

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

input:

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

output:

6
500 259
1 2
3 5
3 6
3 11
3 21
3 102
3 203
3 405
4 14
4 40
4 170
7 9
7 10
7 13
7 19
7 25
7 37
7 73
7 114
7 227
7 340
7 453
12 62
12 104
15 17
15 18
15 35
15 69
15 137
15 174
15 273
15 347
16 20
16 22
16 34
16 58
16 64
16 78
16 100
16 134
16 172
16 210
16 232
16 400
23 26
23 29
23 36
23 41
23 50
23 ...

input:

6
500 259
1 2
3 5
3 6
3 11
3 21
3 102
3 203
3 405
4 14
4 40
4 170
7 9
7 10
7 13
7 19
7 25
7 37
7 73
7 114
7 227
7 340
7 453
12 62
12 104
15 17
15 18
15 35
15 69
15 137
15 174
15 273
15 347
16 20
16 22
16 34
16 58
16 64
16 78
16 100
16 134
16 172
16 210
16 232
16 400
23 26
23 29
23 36
23 41
23 50
23 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
705262511549880222

Test #37:

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

input:

5
510318082834167951

output:

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

input:

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

output:

6
500 254
1 4
2 3
2 6
2 11
2 26
2 51
4 7
4 13
4 68
4 135
4 202
4 269
4 403
8 9
8 15
8 29
8 57
10 19
12 21
14 23
14 30
14 38
14 59
14 75
14 320
14 408
16 17
16 25
16 33
16 49
16 65
16 97
16 129
16 193
16 385
18 72
18 143
22 31
22 36
22 43
22 71
22 106
22 211
24 60
24 119
24 198
24 237
24 312
24 395
2...

input:

6
500 254
1 4
2 3
2 6
2 11
2 26
2 51
4 7
4 13
4 68
4 135
4 202
4 269
4 403
8 9
8 15
8 29
8 57
10 19
12 21
14 23
14 30
14 38
14 59
14 75
14 320
14 408
16 17
16 25
16 33
16 49
16 65
16 97
16 129
16 193
16 385
18 72
18 143
22 31
22 36
22 43
22 71
22 106
22 211
24 60
24 119
24 198
24 237
24 312
24 395
2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
510318082834167951

Test #38:

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

input:

5
914858813253258744

output:

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

input:

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

output:

6
500 266
1 2
3 12
3 23
4 8
4 22
4 50
4 148
5 6
5 11
5 18
5 21
5 35
5 69
5 86
5 171
5 341
7 10
7 19
7 28
7 55
9 17
9 24
9 42
9 47
9 62
9 83
9 93
9 123
9 165
9 185
9 228
9 245
9 329
9 369
9 450
9 455
9 489
14 144
15 20
15 39
15 96
15 98
15 150
15 191
15 195
15 299
15 368
15 486
25 29
25 31
25 33
25 3...

input:

6
500 266
1 2
3 12
3 23
4 8
4 22
4 50
4 148
5 6
5 11
5 18
5 21
5 35
5 69
5 86
5 171
5 341
7 10
7 19
7 28
7 55
9 17
9 24
9 42
9 47
9 62
9 83
9 93
9 123
9 165
9 185
9 228
9 245
9 329
9 369
9 450
9 455
9 489
14 144
15 20
15 39
15 96
15 98
15 150
15 191
15 195
15 299
15 368
15 486
25 29
25 31
25 33
25 3...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
914858813253258744

Test #39:

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

input:

5
659635316746638238

output:

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

input:

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

output:

6
500 257
1 3
1 450
2 4
4 20
4 96
4 108
4 224
5 7
5 18
5 35
5 52
5 103
9 11
14 16
14 22
14 26
14 36
14 38
14 76
14 102
14 106
14 112
14 168
14 176
14 186
14 260
14 304
15 17
19 21
23 25
23 39
23 48
23 58
23 60
23 77
23 95
23 98
23 115
23 119
23 142
23 153
23 178
23 189
23 195
23 229
23 237
23 283
23...

input:

6
500 257
1 3
1 450
2 4
4 20
4 96
4 108
4 224
5 7
5 18
5 35
5 52
5 103
9 11
14 16
14 22
14 26
14 36
14 38
14 76
14 102
14 106
14 112
14 168
14 176
14 186
14 260
14 304
15 17
19 21
23 25
23 39
23 48
23 58
23 60
23 77
23 95
23 98
23 115
23 119
23 142
23 153
23 178
23 189
23 195
23 229
23 237
23 283
23...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
659635316746638238

Test #40:

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

input:

7
858490260563149759

output:

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

input:

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

output:

8
500 250
6 360
8 9
8 13
11 48
11 424
12 63
12 219
12 437
17 24
17 54
18 23
22 39
22 87
22 174
22 347
25 90
25 446
29 82
29 122
29 298
31 68
34 399
35 36
35 76
35 106
38 363
41 58
41 454
44 278
46 75
47 164
47 490
49 204
49 434
49 494
53 198
55 366
55 422
56 57
56 73
56 109
56 169
56 190
56 217
56 2...

input:

8
500 250
6 360
8 9
8 13
11 48
11 424
12 63
12 219
12 437
17 24
17 54
18 23
22 39
22 87
22 174
22 347
25 90
25 446
29 82
29 122
29 298
31 68
34 399
35 36
35 76
35 106
38 363
41 58
41 454
44 278
46 75
47 164
47 490
49 204
49 434
49 494
53 198
55 366
55 422
56 57
56 73
56 109
56 169
56 190
56 217
56 2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
858490260563149759

Test #41:

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

input:

7
860058643727731209

output:

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

input:

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

output:

8
500 250
5 20
10 31
10 33
10 38
10 51
10 65
10 76
10 97
10 101
10 112
10 121
10 149
10 161
10 186
10 193
10 201
10 223
10 241
10 257
10 297
10 301
10 321
10 371
10 401
10 445
10 481
12 440
14 29
16 19
17 390
21 54
21 372
24 39
24 324
24 410
25 46
26 177
34 73
41 90
41 462
42 57
42 113
42 225
42 380...

input:

8
500 250
5 20
10 31
10 33
10 38
10 51
10 65
10 76
10 97
10 101
10 112
10 121
10 149
10 161
10 186
10 193
10 201
10 223
10 241
10 257
10 297
10 301
10 321
10 371
10 401
10 445
10 481
12 440
14 29
16 19
17 390
21 54
21 372
24 39
24 324
24 410
25 46
26 177
34 73
41 90
41 462
42 57
42 113
42 225
42 380...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
860058643727731209

Test #42:

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

input:

7
718861404514377808

output:

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

input:

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

output:

8
500 250
2 4
3 12
3 102
3 203
4 6
5 198
5 395
6 8
6 140
7 90
8 368
11 19
14 16
14 24
14 70
14 116
14 166
14 254
14 346
15 80
15 108
15 159
15 215
25 89
27 207
28 72
30 200
32 164
32 490
33 335
34 36
34 176
35 40
35 79
38 82
39 471
42 114
42 420
45 332
45 398
47 52
47 67
47 100
47 103
47 154
47 188
...

input:

8
500 250
2 4
3 12
3 102
3 203
4 6
5 198
5 395
6 8
6 140
7 90
8 368
11 19
14 16
14 24
14 70
14 116
14 166
14 254
14 346
15 80
15 108
15 159
15 215
25 89
27 207
28 72
30 200
32 164
32 490
33 335
34 36
34 176
35 40
35 79
38 82
39 471
42 114
42 420
45 332
45 398
47 52
47 67
47 100
47 103
47 154
47 188
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
718861404514377808

Test #43:

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

input:

7
659192688464047828

output:

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

input:

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

output:

8
500 250
1 363
3 23
3 432
4 138
6 72
6 444
8 10
8 292
8 500
9 11
12 450
17 19
17 28
17 55
18 20
21 33
21 57
21 317
24 86
26 118
27 308
36 108
38 282
39 66
42 50
44 136
44 350
45 338
46 48
47 62
47 123
47 184
47 367
49 347
53 73
53 97
56 134
56 400
58 188
59 60
59 167
59 178
59 296
59 416
59 499
61 ...

input:

8
500 250
1 363
3 23
3 432
4 138
6 72
6 444
8 10
8 292
8 500
9 11
12 450
17 19
17 28
17 55
18 20
21 33
21 57
21 317
24 86
26 118
27 308
36 108
38 282
39 66
42 50
44 136
44 350
45 338
46 48
47 62
47 123
47 184
47 367
49 347
53 73
53 97
56 134
56 400
58 188
59 60
59 167
59 178
59 296
59 416
59 499
61 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
659192688464047828

Test #44:

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

input:

7
685730986714800201

output:

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

input:

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

output:

8
500 250
2 26
2 41
2 87
2 101
2 114
2 117
2 173
2 216
2 227
2 233
2 291
2 345
2 431
2 453
3 282
4 19
6 152
6 303
8 18
8 99
9 132
11 12
14 39
17 68
17 336
20 27
20 198
20 395
21 422
22 23
22 43
22 45
22 60
22 61
22 91
22 111
22 119
22 133
22 141
22 181
22 199
22 211
22 237
22 253
22 296
22 309
22 31...

input:

8
500 250
2 26
2 41
2 87
2 101
2 114
2 117
2 173
2 216
2 227
2 233
2 291
2 345
2 431
2 453
3 282
4 19
6 152
6 303
8 18
8 99
9 132
11 12
14 39
17 68
17 336
20 27
20 198
20 395
21 422
22 23
22 43
22 45
22 60
22 61
22 91
22 111
22 119
22 133
22 141
22 181
22 199
22 211
22 237
22 253
22 296
22 309
22 31...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
685730986714800201