QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#555731#8726. Magic Showeill100 ✓3ms2292kbC++141.3kb2024-09-10 08:47:492024-09-10 08:47:50

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 5
Accepted

Test #1:

score: 5
Accepted
time: 3ms = 1ms + 2ms
memory: 1916kb,2292kb

input:

1
4005

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
2631 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
4822 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
3884 622
2670 868
4313 2876
2379 3894
1353 275
2...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
2631 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
4822 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
3884 622
2670 868
4313 2876
2379 3894
1353 275
2...

output:

2
4982 4375
1 696
1 1030
1 2306
2 1744
4 3578
4 3862
5 1718
5 2032
6 1406
6 1636
6 2259
6 3756
6 4450
6 4834
7 3444
8 225
8 3376
8 3864
9 671
9 972
9 1221
9 1611
10 3414
11 791
11 2459
11 4741
12 4672
13 2817
15 2799
15 3358
15 4719
16 4183
17 332
18 589
18 2388
18 4078
18 4105
19 332
19 1327
19 480...

input:

2
4982 4375
1 696
1 1030
1 2306
2 1744
4 3578
4 3862
5 1718
5 2032
6 1406
6 1636
6 2259
6 3756
6 4450
6 4834
7 3444
8 225
8 3376
8 3864
9 671
9 972
9 1221
9 1611
10 3414
11 791
11 2459
11 4741
12 4672
13 2817
15 2799
15 3358
15 4719
16 4183
17 332
18 589
18 2388
18 4078
18 4105
19 332
19 1327
19 480...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4005

Test #2:

score: 5
Accepted
time: 3ms = 1ms + 2ms
memory: 1912kb,2292kb

input:

1
459

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
2631 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
3662 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
4313 2876
2379 3894
1353 275
2...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
2631 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
3662 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
4313 2876
2379 3894
1353 275
2...

output:

2
4982 4375
1 696
1 1030
1 2306
2 1744
2 3296
4 3578
4 3862
5 1718
5 2032
6 1406
6 1636
6 2259
6 4450
6 4834
7 3444
8 225
8 3376
8 3864
9 671
9 972
9 1221
9 1611
10 3414
11 791
11 2459
11 4741
12 4672
13 2817
15 3358
15 4719
16 4183
17 332
18 589
18 2388
18 4078
18 4105
18 4447
19 719
19 1327
19 352...

input:

2
4982 4375
1 696
1 1030
1 2306
2 1744
2 3296
4 3578
4 3862
5 1718
5 2032
6 1406
6 1636
6 2259
6 4450
6 4834
7 3444
8 225
8 3376
8 3864
9 671
9 972
9 1221
9 1611
10 3414
11 791
11 2459
11 4741
12 4672
13 2817
15 3358
15 4719
16 4183
17 332
18 589
18 2388
18 4078
18 4105
18 4447
19 719
19 1327
19 352...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
459

Test #3:

score: 5
Accepted
time: 3ms = 1ms + 2ms
memory: 1912kb,2288kb

input:

1
2495

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
4791 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
3662 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
3884 622
2670 868
4313 2876
2379 3894
1353 275
2...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
4791 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
3662 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
3884 622
2670 868
4313 2876
2379 3894
1353 275
2...

output:

2
4982 4375
1 696
1 1030
1 2306
2 1744
4 2844
4 3578
5 1718
5 2032
6 1406
6 1636
6 2259
6 4450
6 4834
7 3444
8 225
8 3376
8 3864
9 671
9 972
9 1221
9 1611
10 3414
11 791
11 2459
11 4741
12 4672
13 2817
15 2799
15 3358
15 4719
16 4183
17 332
18 589
18 2388
18 4078
18 4105
19 719
19 1327
19 3520
19 48...

input:

2
4982 4375
1 696
1 1030
1 2306
2 1744
4 2844
4 3578
5 1718
5 2032
6 1406
6 1636
6 2259
6 4450
6 4834
7 3444
8 225
8 3376
8 3864
9 671
9 972
9 1221
9 1611
10 3414
11 791
11 2459
11 4741
12 4672
13 2817
15 2799
15 3358
15 4719
16 4183
17 332
18 589
18 2388
18 4078
18 4105
19 719
19 1327
19 3520
19 48...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
2495

Test #4:

score: 5
Accepted
time: 2ms = 1ms + 1ms
memory: 1920kb,2240kb

input:

3
1560

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
4791 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
4822 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
4313 2876
520 3894
1353 275
22...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
4791 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
4822 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
4313 2876
520 3894
1353 275
22...

output:

4
4982 2491
2 3296
2 3319
3 4632
4 2844
4 3578
5 1718
5 2032
7 3444
8 225
8 3864
10 3414
11 2459
11 4741
12 4672
13 2817
14 3689
15 3358
15 4719
16 4183
19 1327
19 4808
20 1070
21 531
22 3277
22 3790
22 4673
25 987
25 4520
28 2668
30 1084
30 3462
33 325
33 2231
34 1849
35 1689
36 3517
36 4698
39 452...

input:

4
4982 2491
2 3296
2 3319
3 4632
4 2844
4 3578
5 1718
5 2032
7 3444
8 225
8 3864
10 3414
11 2459
11 4741
12 4672
13 2817
14 3689
15 3358
15 4719
16 4183
19 1327
19 4808
20 1070
21 531
22 3277
22 3790
22 4673
25 987
25 4520
28 2668
30 1084
30 3462
33 325
33 2231
34 1849
35 1689
36 3517
36 4698
39 452...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1560

Test #5:

score: 5
Accepted
time: 1ms = 0ms + 1ms
memory: 1916kb,2240kb

input:

3
3594

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
2631 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
4822 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
3884 622
2670 868
4313 2876
520 3894
1353 275
22...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
2631 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
4822 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
3884 622
2670 868
4313 2876
520 3894
1353 275
22...

output:

4
4982 2491
2 3319
3 4632
4 3578
5 1718
5 2032
7 3444
8 225
8 3864
10 3414
11 2459
11 4741
12 4672
13 2817
14 3689
15 3358
15 4719
16 4183
19 1327
19 4808
20 1070
21 531
22 3277
22 3790
22 4673
25 987
25 4520
27 2461
28 2668
30 1084
30 3462
33 325
33 2231
34 1849
36 3517
36 4698
39 4526
41 3672
42 3...

input:

4
4982 2491
2 3319
3 4632
4 3578
5 1718
5 2032
7 3444
8 225
8 3864
10 3414
11 2459
11 4741
12 4672
13 2817
14 3689
15 3358
15 4719
16 4183
19 1327
19 4808
20 1070
21 531
22 3277
22 3790
22 4673
25 987
25 4520
27 2461
28 2668
30 1084
30 3462
33 325
33 2231
34 1849
36 3517
36 4698
39 4526
41 3672
42 3...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
3594

Test #6:

score: 5
Accepted
time: 2ms = 1ms + 1ms
memory: 1916kb,2240kb

input:

3
1750

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
4791 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
4822 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
4313 2876
2379 3894
1353 275
2...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
4791 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
4822 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
4313 2876
2379 3894
1353 275
2...

output:

4
4982 2491
2 3296
2 3319
3 4632
4 2844
4 3578
5 1718
5 2032
7 3444
8 225
8 3864
10 3414
11 2459
11 4741
12 4672
13 2817
14 3689
15 3358
15 4719
16 4183
19 1327
19 4808
20 1070
21 531
22 3277
22 3790
22 4673
25 987
25 4520
27 2461
27 4867
28 2668
30 3462
33 325
33 2231
34 1849
39 4526
40 2928
41 367...

input:

4
4982 2491
2 3296
2 3319
3 4632
4 2844
4 3578
5 1718
5 2032
7 3444
8 225
8 3864
10 3414
11 2459
11 4741
12 4672
13 2817
14 3689
15 3358
15 4719
16 4183
19 1327
19 4808
20 1070
21 531
22 3277
22 3790
22 4673
25 987
25 4520
27 2461
27 4867
28 2668
30 3462
33 325
33 2231
34 1849
39 4526
40 2928
41 367...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1750

Test #7:

score: 5
Accepted
time: 2ms = 1ms + 1ms
memory: 1912kb,2244kb

input:

5
4878

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
2631 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
3662 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
4313 2876
520 3894
1353 275
22...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
2631 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
3662 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
4313 2876
520 3894
1353 275
22...

output:

6
4982 2536
1 661
1 1030
1 2306
2 1744
3 4632
4 3578
5 2032
6 1636
6 2259
6 4450
6 4834
7 3444
8 3376
9 671
9 972
9 1611
11 2459
11 4741
13 2817
15 3358
17 332
18 2388
19 3520
20 1070
21 531
22 4673
23 996
24 1972
25 987
27 608
27 4867
29 135
29 460
29 491
29 2969
30 3462
31 1270
31 2123
32 2433
32 ...

input:

6
4982 2536
1 661
1 1030
1 2306
2 1744
3 4632
4 3578
5 2032
6 1636
6 2259
6 4450
6 4834
7 3444
8 3376
9 671
9 972
9 1611
11 2459
11 4741
13 2817
15 3358
17 332
18 2388
19 3520
20 1070
21 531
22 4673
23 996
24 1972
25 987
27 608
27 4867
29 135
29 460
29 491
29 2969
30 3462
31 1270
31 2123
32 2433
32 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4878

Test #8:

score: 5
Accepted
time: 1ms = 0ms + 1ms
memory: 1912kb,2236kb

input:

5
1223

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
2631 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
4822 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
4313 2876
2379 3894
1353 275
2...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
2631 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
4822 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
4313 2876
2379 3894
1353 275
2...

output:

6
4982 2518
1 696
2 3296
3 4632
4 3578
5 1718
6 1636
6 2259
6 3756
6 4450
6 4834
7 3444
8 3376
9 671
9 972
9 1611
11 2459
11 4741
13 2817
14 3689
15 3358
16 4183
17 332
18 2388
19 332
20 3392
21 531
22 3277
22 3790
23 996
25 4520
27 608
27 4867
29 460
29 491
29 2969
30 3462
31 2403
32 2433
32 2544
3...

input:

6
4982 2518
1 696
2 3296
3 4632
4 3578
5 1718
6 1636
6 2259
6 3756
6 4450
6 4834
7 3444
8 3376
9 671
9 972
9 1611
11 2459
11 4741
13 2817
14 3689
15 3358
16 4183
17 332
18 2388
19 332
20 3392
21 531
22 3277
22 3790
23 996
25 4520
27 608
27 4867
29 460
29 491
29 2969
30 3462
31 2403
32 2433
32 2544
3...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1223

Test #9:

score: 5
Accepted
time: 2ms = 1ms + 1ms
memory: 1912kb,2244kb

input:

5
648

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
2631 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
3662 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
4313 2876
2379 3894
1353 275
2...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
2631 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
3662 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
4313 2876
2379 3894
1353 275
2...

output:

6
4982 2525
1 661
1 1030
1 2306
2 3296
3 4632
4 3578
5 2032
6 1636
6 2259
6 4450
6 4834
7 3444
8 3376
9 671
9 972
9 1611
11 2459
11 4741
13 2817
15 3358
17 332
18 2388
19 3520
20 1070
21 531
22 4673
23 996
24 1972
25 987
27 608
29 135
29 460
29 491
30 3462
31 1270
31 2123
31 4436
32 1929
32 2433
32 ...

input:

6
4982 2525
1 661
1 1030
1 2306
2 3296
3 4632
4 3578
5 2032
6 1636
6 2259
6 4450
6 4834
7 3444
8 3376
9 671
9 972
9 1611
11 2459
11 4741
13 2817
15 3358
17 332
18 2388
19 3520
20 1070
21 531
22 4673
23 996
24 1972
25 987
27 608
29 135
29 460
29 491
30 3462
31 1270
31 2123
31 4436
32 1929
32 2433
32 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
648

Test #10:

score: 5
Accepted
time: 2ms = 1ms + 1ms
memory: 1916kb,2236kb

input:

7
4475

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
4791 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
3662 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
4313 2876
520 3894
1353 275
22...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
4791 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
3662 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
4313 2876
520 3894
1353 275
22...

output:

8
4982 2491
1 661
1 1030
3 4632
4 2844
4 3578
5 1718
5 2032
7 3444
8 3864
9 671
9 972
10 3414
11 2459
11 4741
12 4672
13 2817
14 3689
15 2799
15 4719
16 4183
17 332
20 1070
21 1021
22 3277
22 4673
23 996
24 1972
25 987
25 4520
27 2461
28 2668
30 3462
31 1270
33 325
33 2231
35 1689
41 3672
42 3083
42...

input:

8
4982 2491
1 661
1 1030
3 4632
4 2844
4 3578
5 1718
5 2032
7 3444
8 3864
9 671
9 972
10 3414
11 2459
11 4741
12 4672
13 2817
14 3689
15 2799
15 4719
16 4183
17 332
20 1070
21 1021
22 3277
22 4673
23 996
24 1972
25 987
25 4520
27 2461
28 2668
30 3462
31 1270
33 325
33 2231
35 1689
41 3672
42 3083
42...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4475

Test #11:

score: 5
Accepted
time: 1ms = 1ms + 0ms
memory: 1916kb,2240kb

input:

7
4240

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
4791 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
3662 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
4313 2876
2379 3894
1353 275
2...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
4791 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
3662 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
4313 2876
2379 3894
1353 275
2...

output:

8
4982 2491
1 661
1 1030
2 3319
3 4632
4 2844
4 3578
5 1718
5 2032
7 3444
8 3864
9 671
9 972
10 3414
11 2459
11 4741
12 4672
13 2817
14 3689
15 3358
15 4719
16 4183
17 332
20 1070
21 531
22 3277
23 996
24 1972
25 4520
27 2461
28 2668
29 460
30 3462
31 1270
33 325
33 2231
34 1849
35 1689
36 4698
39 4...

input:

8
4982 2491
1 661
1 1030
2 3319
3 4632
4 2844
4 3578
5 1718
5 2032
7 3444
8 3864
9 671
9 972
10 3414
11 2459
11 4741
12 4672
13 2817
14 3689
15 3358
15 4719
16 4183
17 332
20 1070
21 531
22 3277
23 996
24 1972
25 4520
27 2461
28 2668
29 460
30 3462
31 1270
33 325
33 2231
34 1849
35 1689
36 4698
39 4...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4240

Test #12:

score: 5
Accepted
time: 2ms = 1ms + 1ms
memory: 1920kb,2240kb

input:

7
1291

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
2631 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
4822 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
4313 2876
520 3894
1353 275
22...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
2631 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
4822 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
4313 2876
520 3894
1353 275
22...

output:

8
4982 2491
1 661
1 1030
2 3296
3 4632
4 3578
5 1718
5 2032
7 3444
8 225
8 3864
9 671
9 972
10 3414
11 2459
11 4741
12 4672
13 2817
14 3689
15 3358
15 4719
16 4183
19 719
19 4808
20 1070
21 531
21 1021
22 3277
22 3790
23 996
25 987
25 4520
28 2668
30 1084
30 3462
31 1270
33 325
33 2231
35 1689
36 46...

input:

8
4982 2491
1 661
1 1030
2 3296
3 4632
4 3578
5 1718
5 2032
7 3444
8 225
8 3864
9 671
9 972
10 3414
11 2459
11 4741
12 4672
13 2817
14 3689
15 3358
15 4719
16 4183
19 719
19 4808
20 1070
21 531
21 1021
22 3277
22 3790
23 996
25 987
25 4520
28 2668
30 1084
30 3462
31 1270
33 325
33 2231
35 1689
36 46...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1291

Subtask #2:

score: 30
Accepted

Test #13:

score: 30
Accepted
time: 3ms = 1ms + 2ms
memory: 1912kb,2284kb

input:

1
17476204

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
2631 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
3662 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
3884 622
2670 868
4313 2876
520 3894
1353 275
22...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
2631 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
3662 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
3884 622
2670 868
4313 2876
520 3894
1353 275
22...

output:

2
4982 4375
1 696
1 1030
1 2306
2 3319
4 3862
5 2032
5 2143
6 1406
6 1636
6 2259
6 4450
6 4834
7 3444
8 225
8 3376
8 3864
9 671
9 972
9 1611
9 4467
10 3414
11 1512
11 2459
11 4741
12 4672
13 2817
15 2799
15 3358
15 4719
16 4183
17 332
18 2388
18 4105
19 1327
19 3520
19 4808
20 1070
20 3392
21 531
22...

input:

2
4982 4375
1 696
1 1030
1 2306
2 3319
4 3862
5 2032
5 2143
6 1406
6 1636
6 2259
6 4450
6 4834
7 3444
8 225
8 3376
8 3864
9 671
9 972
9 1611
9 4467
10 3414
11 1512
11 2459
11 4741
12 4672
13 2817
15 2799
15 3358
15 4719
16 4183
17 332
18 2388
18 4105
19 1327
19 3520
19 4808
20 1070
20 3392
21 531
22...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
17476204

Test #14:

score: 30
Accepted
time: 3ms = 1ms + 2ms
memory: 1912kb,2280kb

input:

1
11926600

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
2631 870
2768 4303
3627 1732
4161 2514
868 457
454 3918
4822 3968
4426 2873
504 3400
3575 1492
3211 2849
2717 2236
3884 622
2670 868
3549 2876
520 3894
1353 275
221...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
2631 870
2768 4303
3627 1732
4161 2514
868 457
454 3918
4822 3968
4426 2873
504 3400
3575 1492
3211 2849
2717 2236
3884 622
2670 868
3549 2876
520 3894
1353 275
221...

output:

2
4982 4375
1 628
1 696
1 1030
1 2306
2 3319
4 3578
4 3862
5 1718
5 2032
6 1636
6 2259
6 2791
6 3756
6 4450
6 4834
7 3444
8 2246
8 3864
9 671
9 972
9 4467
10 3414
11 1512
11 2459
11 4741
12 4672
13 2817
15 2198
16 4183
17 332
18 2388
18 4078
19 332
19 719
19 1327
19 1963
19 2237
19 4808
20 1070
20 3...

input:

2
4982 4375
1 628
1 696
1 1030
1 2306
2 3319
4 3578
4 3862
5 1718
5 2032
6 1636
6 2259
6 2791
6 3756
6 4450
6 4834
7 3444
8 2246
8 3864
9 671
9 972
9 4467
10 3414
11 1512
11 2459
11 4741
12 4672
13 2817
15 2198
16 4183
17 332
18 2388
18 4078
19 332
19 719
19 1327
19 1963
19 2237
19 4808
20 1070
20 3...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
11926600

Test #15:

score: 30
Accepted
time: 3ms = 1ms + 2ms
memory: 1912kb,2280kb

input:

1
16602378

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
2631 870
2768 4303
3627 1732
4161 2514
868 457
454 3918
4822 3968
4426 2873
504 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
3549 2876
520 3894
1353 275
221...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
2631 870
2768 4303
3627 1732
4161 2514
868 457
454 3918
4822 3968
4426 2873
504 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
3549 2876
520 3894
1353 275
221...

output:

2
4982 4375
1 628
1 1030
1 1182
1 2306
2 1744
2 3296
4 3862
5 1718
5 2032
6 1636
6 2259
6 2791
6 3756
6 4450
6 4834
7 3444
8 2246
8 3864
9 671
9 972
9 4467
10 3414
11 791
11 2459
11 4741
12 4672
13 2817
15 2198
16 4183
17 332
18 2388
18 4078
18 4447
19 332
19 719
19 1327
19 1963
19 2237
19 4808
20 1...

input:

2
4982 4375
1 628
1 1030
1 1182
1 2306
2 1744
2 3296
4 3862
5 1718
5 2032
6 1636
6 2259
6 2791
6 3756
6 4450
6 4834
7 3444
8 2246
8 3864
9 671
9 972
9 4467
10 3414
11 791
11 2459
11 4741
12 4672
13 2817
15 2198
16 4183
17 332
18 2388
18 4078
18 4447
19 332
19 719
19 1327
19 1963
19 2237
19 4808
20 1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
16602378

Test #16:

score: 30
Accepted
time: 2ms = 1ms + 1ms
memory: 1916kb,2232kb

input:

3
13129243

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
4791 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
4822 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
3549 2876
520 3894
1353 275
22...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
4791 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
4822 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
3549 2876
520 3894
1353 275
22...

output:

4
4982 2491
2 3296
2 3319
3 4632
4 2844
5 1718
5 2032
7 3444
8 3864
10 3414
11 791
11 2459
11 4741
12 4672
13 2817
14 3689
15 3358
16 4183
20 1070
20 3392
21 52
21 1021
22 3277
22 3790
22 4673
24 1972
25 4520
26 4010
27 2461
28 2833
30 3462
33 325
33 2231
34 1849
36 3517
36 4554
36 4698
39 4526
40 2...

input:

4
4982 2491
2 3296
2 3319
3 4632
4 2844
5 1718
5 2032
7 3444
8 3864
10 3414
11 791
11 2459
11 4741
12 4672
13 2817
14 3689
15 3358
16 4183
20 1070
20 3392
21 52
21 1021
22 3277
22 3790
22 4673
24 1972
25 4520
26 4010
27 2461
28 2833
30 3462
33 325
33 2231
34 1849
36 3517
36 4554
36 4698
39 4526
40 2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
13129243

Test #17:

score: 30
Accepted
time: 2ms = 1ms + 1ms
memory: 1912kb,2228kb

input:

3
7892141

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
2631 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
4822 3968
4426 2873
504 3400
3575 1492
3211 2849
2717 2236
3884 622
2670 868
4313 2876
2379 3894
1353 275
2...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
2631 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
4822 3968
4426 2873
504 3400
3575 1492
3211 2849
2717 2236
3884 622
2670 868
4313 2876
2379 3894
1353 275
2...

output:

4
4982 2491
3 4632
5 1718
5 2032
7 3444
8 225
8 3864
10 3414
11 791
11 2459
11 4741
12 4672
13 2817
14 3689
15 2799
15 3358
16 4183
20 1070
21 531
21 1021
22 3277
22 3790
22 4673
25 987
25 4520
26 4010
27 4867
28 2833
31 2123
31 2403
31 4436
33 325
33 2231
34 1849
35 1689
39 4526
40 2239
41 3672
42 ...

input:

4
4982 2491
3 4632
5 1718
5 2032
7 3444
8 225
8 3864
10 3414
11 791
11 2459
11 4741
12 4672
13 2817
14 3689
15 2799
15 3358
16 4183
20 1070
21 531
21 1021
22 3277
22 3790
22 4673
25 987
25 4520
26 4010
27 4867
28 2833
31 2123
31 2403
31 4436
33 325
33 2231
34 1849
35 1689
39 4526
40 2239
41 3672
42 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
7892141

Test #18:

score: 30
Accepted
time: 2ms = 1ms + 1ms
memory: 1916kb,2224kb

input:

3
21314775

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
4791 870
2768 4303
3627 1732
4161 2514
868 457
454 3918
4822 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
3884 622
2670 868
4313 2876
2379 3894
1353 275
22...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
4791 870
2768 4303
3627 1732
4161 2514
868 457
454 3918
4822 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
3884 622
2670 868
4313 2876
2379 3894
1353 275
22...

output:

4
4982 2491
2 3319
3 4632
4 2844
4 3578
5 2032
5 2143
7 3444
8 3864
9 671
9 972
10 3414
11 2459
11 4741
12 4672
13 2817
14 3689
15 4719
16 4183
20 1070
21 531
21 1021
22 3277
22 3790
22 4673
27 2461
27 4867
28 2668
30 3462
31 2403
31 4436
33 325
33 2231
34 1849
36 720
39 3906
39 4526
40 2239
41 3672...

input:

4
4982 2491
2 3319
3 4632
4 2844
4 3578
5 2032
5 2143
7 3444
8 3864
9 671
9 972
10 3414
11 2459
11 4741
12 4672
13 2817
14 3689
15 4719
16 4183
20 1070
21 531
21 1021
22 3277
22 3790
22 4673
27 2461
27 4867
28 2668
30 3462
31 2403
31 4436
33 325
33 2231
34 1849
36 720
39 3906
39 4526
40 2239
41 3672...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
21314775

Test #19:

score: 30
Accepted
time: 1ms = 0ms + 1ms
memory: 1912kb,2232kb

input:

5
5559540

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
4791 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
4822 3968
4426 2873
504 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
4313 2876
2379 3894
1353 275
2...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
4791 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
4822 3968
4426 2873
504 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
4313 2876
2379 3894
1353 275
2...

output:

6
4982 2493
1 1182
2 3296
3 4632
4 3578
5 2032
6 1636
6 2259
6 3756
6 4450
6 4834
7 3444
8 3864
9 671
9 972
11 2459
11 4741
13 2817
15 2799
16 4183
17 332
18 2388
19 332
20 3392
21 531
22 3277
22 3790
24 1972
25 2804
27 608
27 4867
29 460
29 491
30 1159
30 3462
31 1270
31 2123
31 4436
32 2433
32 254...

input:

6
4982 2493
1 1182
2 3296
3 4632
4 3578
5 2032
6 1636
6 2259
6 3756
6 4450
6 4834
7 3444
8 3864
9 671
9 972
11 2459
11 4741
13 2817
15 2799
16 4183
17 332
18 2388
19 332
20 3392
21 531
22 3277
22 3790
24 1972
25 2804
27 608
27 4867
29 460
29 491
30 1159
30 3462
31 1270
31 2123
31 4436
32 2433
32 254...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
5559540

Test #20:

score: 30
Accepted
time: 2ms = 1ms + 1ms
memory: 1912kb,2220kb

input:

5
9424319

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
4791 870
2768 4303
3627 1732
4161 2514
868 457
454 3918
4822 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
3884 622
2670 868
3549 2876
2379 3894
1353 275
22...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
4791 870
2768 4303
3627 1732
4161 2514
868 457
454 3918
4822 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
3884 622
2670 868
3549 2876
2379 3894
1353 275
22...

output:

6
4982 2495
1 628
1 1030
1 2306
2 1744
3 4632
4 2844
5 2032
6 1636
6 2259
6 3756
6 4450
6 4834
8 2246
9 1221
10 3414
11 1512
12 4672
13 2817
14 3689
15 2198
16 4183
18 408
18 589
18 4105
19 719
19 1327
19 2237
19 4808
20 3392
21 1021
22 4673
24 1972
25 2804
27 2461
29 3698
30 1084
31 1270
31 2123
32...

input:

6
4982 2495
1 628
1 1030
1 2306
2 1744
3 4632
4 2844
5 2032
6 1636
6 2259
6 3756
6 4450
6 4834
8 2246
9 1221
10 3414
11 1512
12 4672
13 2817
14 3689
15 2198
16 4183
18 408
18 589
18 4105
19 719
19 1327
19 2237
19 4808
20 3392
21 1021
22 4673
24 1972
25 2804
27 2461
29 3698
30 1084
31 1270
31 2123
32...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
9424319

Test #21:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 1912kb,2240kb

input:

5
10955780

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
2631 870
2768 4303
3627 1732
4161 2514
868 457
454 3918
4822 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
3884 622
2670 868
3549 2876
520 3894
1353 275
221...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
2631 870
2768 4303
3627 1732
4161 2514
868 457
454 3918
4822 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
3884 622
2670 868
3549 2876
520 3894
1353 275
221...

output:

6
4982 2498
1 661
1 1030
1 2306
2 3319
4 3578
5 1718
6 2791
7 3444
8 225
8 3864
9 671
9 972
11 2459
11 4741
13 2817
14 3689
15 4719
16 4183
18 2388
19 719
19 1327
19 2237
19 4808
20 1070
22 3277
22 3790
23 996
24 1972
25 4520
26 4010
27 608
27 4867
29 460
29 491
31 2123
31 4436
32 2520
33 2231
34 18...

input:

6
4982 2498
1 661
1 1030
1 2306
2 3319
4 3578
5 1718
6 2791
7 3444
8 225
8 3864
9 671
9 972
11 2459
11 4741
13 2817
14 3689
15 4719
16 4183
18 2388
19 719
19 1327
19 2237
19 4808
20 1070
22 3277
22 3790
23 996
24 1972
25 4520
26 4010
27 608
27 4867
29 460
29 491
31 2123
31 4436
32 2520
33 2231
34 18...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
10955780

Test #22:

score: 30
Accepted
time: 2ms = 1ms + 1ms
memory: 1916kb,2232kb

input:

7
19938721

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
2631 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
4822 3968
4426 2873
504 3400
3575 1492
3211 2849
2717 2236
3884 622
2670 868
4313 2876
2379 3894
1353 275
2...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
2631 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
4822 3968
4426 2873
504 3400
3575 1492
3211 2849
2717 2236
3884 622
2670 868
4313 2876
2379 3894
1353 275
2...

output:

8
4982 2491
1 661
1 1030
3 4632
4 3578
5 2032
7 3444
8 3864
9 671
9 972
10 3414
11 2459
11 4741
12 4672
13 2817
14 3689
15 2799
15 4719
16 4183
18 4078
20 1070
21 1021
22 3277
22 3790
23 996
25 987
28 2668
29 460
33 325
33 2231
35 1689
36 4535
38 342
38 1441
39 3906
41 3672
42 3083
42 3558
43 2428
4...

input:

8
4982 2491
1 661
1 1030
3 4632
4 3578
5 2032
7 3444
8 3864
9 671
9 972
10 3414
11 2459
11 4741
12 4672
13 2817
14 3689
15 2799
15 4719
16 4183
18 4078
20 1070
21 1021
22 3277
22 3790
23 996
25 987
28 2668
29 460
33 325
33 2231
35 1689
36 4535
38 342
38 1441
39 3906
41 3672
42 3083
42 3558
43 2428
4...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
19938721

Test #23:

score: 30
Accepted
time: 2ms = 1ms + 1ms
memory: 1912kb,2232kb

input:

7
5129508

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
2631 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
4822 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
4313 2876
520 3894
1353 275
22...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
2631 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
4822 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
4313 2876
520 3894
1353 275
22...

output:

8
4982 2491
1 1030
3 4632
4 3862
5 1718
5 2032
7 3444
8 225
8 3864
9 671
9 972
10 3414
11 2459
11 4741
12 4672
13 2817
14 3689
15 2198
15 2799
16 4183
18 4105
20 1070
21 531
22 3277
22 4673
25 4520
26 4010
27 4867
28 2833
29 460
30 3462
31 1270
33 325
33 2231
35 1689
36 4698
37 106
40 2239
41 3672
4...

input:

8
4982 2491
1 1030
3 4632
4 3862
5 1718
5 2032
7 3444
8 225
8 3864
9 671
9 972
10 3414
11 2459
11 4741
12 4672
13 2817
14 3689
15 2198
15 2799
16 4183
18 4105
20 1070
21 531
22 3277
22 4673
25 4520
26 4010
27 4867
28 2833
29 460
30 3462
31 1270
33 325
33 2231
35 1689
36 4698
37 106
40 2239
41 3672
4...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
5129508

Test #24:

score: 30
Accepted
time: 2ms = 1ms + 1ms
memory: 1916kb,2224kb

input:

7
15332941

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
2631 870
2768 4303
3627 1732
4161 2514
868 457
454 3918
4822 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
3549 2876
520 3894
1353 275
221...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
2631 870
2768 4303
3627 1732
4161 2514
868 457
454 3918
4822 3968
1655 2873
504 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
3549 2876
520 3894
1353 275
221...

output:

8
4982 2491
1 1030
3 4632
4 3862
5 1718
5 2032
7 3444
8 3864
9 671
9 972
10 3414
11 2459
11 4741
12 4672
13 2817
14 3689
15 3358
16 4183
17 332
18 4078
19 1963
20 1070
20 3392
21 52
21 1021
22 3277
24 1972
25 987
25 4520
26 4010
27 4867
28 2833
29 460
29 491
30 1159
31 4436
32 1363
32 4161
33 325
33...

input:

8
4982 2491
1 1030
3 4632
4 3862
5 1718
5 2032
7 3444
8 3864
9 671
9 972
10 3414
11 2459
11 4741
12 4672
13 2817
14 3689
15 3358
16 4183
17 332
18 4078
19 1963
20 1070
20 3392
21 52
21 1021
22 3277
24 1972
25 987
25 4520
26 4010
27 4867
28 2833
29 460
29 491
30 1159
31 4436
32 1363
32 4161
33 325
33...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
15332941

Subtask #3:

score: 65
Accepted

Test #25:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 1916kb,2288kb

input:

1
355365355024496523

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
2631 870
2768 4303
3627 1732
4178 2514
868 457
921 3918
4822 3968
4426 2873
504 3400
3575 1492
3406 2849
2717 2236
2206 622
3797 868
3549 2876
2379 3894
1353 275
20...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
2631 870
2768 4303
3627 1732
4178 2514
868 457
921 3918
4822 3968
4426 2873
504 3400
3575 1492
3406 2849
2717 2236
2206 622
3797 868
3549 2876
2379 3894
1353 275
20...

output:

2
4982 4861
1 661
1 696
2 1672
2 1744
2 3296
3 4632
4 3578
4 3862
5 2143
6 2791
6 3756
7 2651
8 2246
8 3864
9 1221
10 3414
10 4275
11 791
11 2459
12 4232
13 4636
14 3888
15 1628
15 2198
15 3601
15 4719
17 332
18 93
18 408
18 589
18 2388
18 4447
19 332
19 1963
19 2237
19 4808
20 1070
20 2778
21 52
21...

input:

2
4982 4861
1 661
1 696
2 1672
2 1744
2 3296
3 4632
4 3578
4 3862
5 2143
6 2791
6 3756
7 2651
8 2246
8 3864
9 1221
10 3414
10 4275
11 791
11 2459
12 4232
13 4636
14 3888
15 1628
15 2198
15 3601
15 4719
17 332
18 93
18 408
18 589
18 2388
18 4447
19 332
19 1963
19 2237
19 4808
20 1070
20 2778
21 52
21...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
355365355024496523

Test #26:

score: 65
Accepted
time: 3ms = 1ms + 2ms
memory: 1916kb,2288kb

input:

1
727827999106414164

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
4791 870
577 4303
3627 1732
4178 2514
3221 457
921 3918
4822 3968
4426 2873
4847 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
4313 2876
520 3894
258 275
221...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
4791 870
577 4303
3627 1732
4178 2514
3221 457
921 3918
4822 3968
4426 2873
4847 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
4313 2876
520 3894
258 275
221...

output:

2
4982 4861
1 661
1 1182
1 3960
2 3296
2 3319
3 49
4 2844
4 3578
5 1718
5 2032
6 1406
6 1636
6 2259
6 3756
6 4834
7 2651
8 2178
8 2660
8 3376
9 671
9 1611
9 3490
9 4467
10 3414
11 791
11 4741
12 4232
13 1560
13 4636
13 4806
14 3888
15 3358
15 4719
17 3680
18 1900
18 4105
18 4447
19 332
19 1327
19 19...

input:

2
4982 4861
1 661
1 1182
1 3960
2 3296
2 3319
3 49
4 2844
4 3578
5 1718
5 2032
6 1406
6 1636
6 2259
6 3756
6 4834
7 2651
8 2178
8 2660
8 3376
9 671
9 1611
9 3490
9 4467
10 3414
11 791
11 4741
12 4232
13 1560
13 4636
13 4806
14 3888
15 3358
15 4719
17 3680
18 1900
18 4105
18 4447
19 332
19 1327
19 19...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
727827999106414164

Test #27:

score: 65
Accepted
time: 3ms = 1ms + 2ms
memory: 1912kb,2284kb

input:

1
656410143989222955

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
2631 870
577 4303
1581 1732
4161 2514
3221 457
454 3918
4822 3968
4426 2873
4847 3400
3575 1492
3211 2849
3347 2236
3884 622
2670 868
4313 2876
520 3894
258 275
221...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
2631 870
577 4303
1581 1732
4161 2514
3221 457
454 3918
4822 3968
4426 2873
4847 3400
3575 1492
3211 2849
3347 2236
3884 622
2670 868
4313 2876
520 3894
258 275
221...

output:

2
4982 4861
1 628
1 1030
1 1182
1 3960
2 1672
2 3319
3 4632
4 3578
4 3862
5 2032
5 2143
6 1406
6 1636
6 2259
6 3756
7 3444
8 225
8 2178
8 3376
8 3864
9 1611
9 4467
10 3414
11 1512
11 2459
12 4672
13 2817
14 3689
15 2799
15 3358
17 332
18 408
18 2388
18 4078
19 332
19 1327
19 4808
20 2778
21 531
21 1...

input:

2
4982 4861
1 628
1 1030
1 1182
1 3960
2 1672
2 3319
3 4632
4 3578
4 3862
5 2032
5 2143
6 1406
6 1636
6 2259
6 3756
7 3444
8 225
8 2178
8 3376
8 3864
9 1611
9 4467
10 3414
11 1512
11 2459
12 4672
13 2817
14 3689
15 2799
15 3358
17 332
18 408
18 2388
18 4078
19 332
19 1327
19 4808
20 2778
21 531
21 1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
656410143989222955

Test #28:

score: 65
Accepted
time: 3ms = 1ms + 2ms
memory: 1912kb,2288kb

input:

1
410366615149657534

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
4791 870
2768 4303
1581 1732
4161 2514
3221 457
454 3918
4822 3968
1655 2873
504 3400
3575 1492
3406 2849
3347 2236
3884 622
2670 868
3549 2876
2379 3894
1353 275
2...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
4791 870
2768 4303
1581 1732
4161 2514
3221 457
454 3918
4822 3968
1655 2873
504 3400
3575 1492
3406 2849
3347 2236
3884 622
2670 868
3549 2876
2379 3894
1353 275
2...

output:

2
4982 4861
1 661
1 696
1 1030
1 2306
2 1744
3 4632
4 2844
5 2143
6 2791
6 3756
6 4450
6 4834
7 2651
8 2246
8 2660
9 671
9 972
9 1221
9 3490
10 3414
10 4275
11 1512
11 4741
12 4232
13 1560
13 2817
14 3888
15 2198
15 2799
15 3601
15 4719
17 332
18 589
18 1900
18 4078
19 332
19 719
19 1327
19 1963
19 ...

input:

2
4982 4861
1 661
1 696
1 1030
1 2306
2 1744
3 4632
4 2844
5 2143
6 2791
6 3756
6 4450
6 4834
7 2651
8 2246
8 2660
9 671
9 972
9 1221
9 3490
10 3414
10 4275
11 1512
11 4741
12 4232
13 1560
13 2817
14 3888
15 2198
15 2799
15 3601
15 4719
17 332
18 589
18 1900
18 4078
19 332
19 719
19 1327
19 1963
19 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
410366615149657534

Test #29:

score: 65
Accepted
time: 3ms = 1ms + 2ms
memory: 1912kb,2288kb

input:

1
298090682780948428

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
2631 870
577 4303
3627 1732
4178 2514
868 457
921 3918
4822 3968
1655 2873
4847 3400
3575 1492
3406 2849
2717 2236
2206 622
3797 868
4313 2876
2379 3894
1353 275
22...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4982
2631 870
577 4303
3627 1732
4178 2514
868 457
921 3918
4822 3968
1655 2873
4847 3400
3575 1492
3406 2849
2717 2236
2206 622
3797 868
4313 2876
2379 3894
1353 275
22...

output:

2
4982 4861
1 661
1 696
2 1744
2 3296
3 4632
4 3578
4 3862
5 1718
6 1406
6 1636
6 3756
6 4450
6 4834
7 2651
8 2660
8 3376
9 671
9 972
9 1221
9 1611
9 3490
10 2573
10 4275
11 791
11 4741
12 4672
13 1560
13 4636
14 3689
15 3358
15 3601
15 4719
17 332
18 589
18 1900
18 4105
18 4447
19 332
19 1327
19 19...

input:

2
4982 4861
1 661
1 696
2 1744
2 3296
3 4632
4 3578
4 3862
5 1718
6 1406
6 1636
6 3756
6 4450
6 4834
7 2651
8 2660
8 3376
9 671
9 972
9 1221
9 1611
9 3490
10 2573
10 4275
11 791
11 4741
12 4672
13 1560
13 4636
14 3689
15 3358
15 3601
15 4719
17 332
18 589
18 1900
18 4105
18 4447
19 332
19 1327
19 19...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
298090682780948428

Test #30:

score: 65
Accepted
time: 2ms = 1ms + 1ms
memory: 1912kb,2212kb

input:

3
969441916331132577

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
2631 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
4822 3968
1655 2873
504 3400
3575 1492
3406 2849
2717 2236
2206 622
2670 868
4313 2876
2379 3894
258 275
20...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
2631 870
2768 4303
3627 1732
4161 2514
3221 457
454 3918
4822 3968
1655 2873
504 3400
3575 1492
3406 2849
2717 2236
2206 622
2670 868
4313 2876
2379 3894
258 275
20...

output:

4
4982 2491
2 1672
2 3296
2 3319
3 4632
4 3862
5 2143
8 225
8 2178
10 4275
12 4672
13 2817
14 3689
16 4183
19 4808
20 1070
20 2450
20 2778
21 531
21 1021
22 3790
22 4673
24 1355
28 2833
30 1084
30 1159
30 3462
33 2231
34 1849
34 4760
35 1689
39 3906
39 4526
40 2239
41 3672
42 3083
43 2227
44 1951
45...

input:

4
4982 2491
2 1672
2 3296
2 3319
3 4632
4 3862
5 2143
8 225
8 2178
10 4275
12 4672
13 2817
14 3689
16 4183
19 4808
20 1070
20 2450
20 2778
21 531
21 1021
22 3790
22 4673
24 1355
28 2833
30 1084
30 1159
30 3462
33 2231
34 1849
34 4760
35 1689
39 3906
39 4526
40 2239
41 3672
42 3083
43 2227
44 1951
45...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
969441916331132577

Test #31:

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

input:

3
929489812741933634

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
2631 870
2768 4303
3627 1732
4161 2514
868 457
454 3918
3662 3968
4426 2873
4847 3400
116 1492
3406 2849
2717 2236
3884 622
3797 868
3549 2876
520 3894
258 275
2048...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
2631 870
2768 4303
3627 1732
4161 2514
868 457
454 3918
3662 3968
4426 2873
4847 3400
116 1492
3406 2849
2717 2236
3884 622
3797 868
3549 2876
520 3894
258 275
2048...

output:

4
4982 2491
2 1672
2 3319
3 4632
4 3578
4 3862
6 4450
7 2651
8 225
8 2178
13 2817
14 3689
15 1628
15 3358
15 3601
16 4183
17 332
19 4808
20 1070
20 2450
20 2778
21 52
22 3277
22 4673
24 1355
25 987
25 4520
28 555
28 2668
29 2969
30 1159
30 3462
33 2231
33 4140
34 1849
37 106
37 1963
39 4526
40 2239
...

input:

4
4982 2491
2 1672
2 3319
3 4632
4 3578
4 3862
6 4450
7 2651
8 225
8 2178
13 2817
14 3689
15 1628
15 3358
15 3601
16 4183
17 332
19 4808
20 1070
20 2450
20 2778
21 52
22 3277
22 4673
24 1355
25 987
25 4520
28 555
28 2668
29 2969
30 1159
30 3462
33 2231
33 4140
34 1849
37 106
37 1963
39 4526
40 2239
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
929489812741933634

Test #32:

score: 65
Accepted
time: 2ms = 1ms + 1ms
memory: 1912kb,2200kb

input:

3
144032041325838295

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
4791 870
2768 4303
3627 1732
4178 2514
3221 457
921 3918
4822 3968
1655 2873
504 3400
116 1492
3211 2849
2717 2236
3884 622
3797 868
3549 2876
2379 3894
1353 275
20...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
4791 870
2768 4303
3627 1732
4178 2514
3221 457
921 3918
4822 3968
1655 2873
504 3400
116 1492
3211 2849
2717 2236
3884 622
3797 868
3549 2876
2379 3894
1353 275
20...

output:

4
4982 2491
1 661
1 696
1 2306
2 1672
2 1744
3 4632
4 3578
5 2032
5 2143
7 3444
8 2660
8 3864
9 671
9 1221
10 4275
11 2459
11 4741
12 4232
13 1560
13 4636
15 3358
15 4719
16 957
20 1070
20 3392
21 52
21 1021
22 3790
22 4673
23 1323
24 1972
25 987
27 4867
28 555
28 2668
29 460
29 2969
30 3462
31 2123...

input:

4
4982 2491
1 661
1 696
1 2306
2 1672
2 1744
3 4632
4 3578
5 2032
5 2143
7 3444
8 2660
8 3864
9 671
9 1221
10 4275
11 2459
11 4741
12 4232
13 1560
13 4636
15 3358
15 4719
16 957
20 1070
20 3392
21 52
21 1021
22 3790
22 4673
23 1323
24 1972
25 987
27 4867
28 555
28 2668
29 460
29 2969
30 3462
31 2123...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
144032041325838295

Test #33:

score: 65
Accepted
time: 2ms = 1ms + 1ms
memory: 1912kb,2204kb

input:

3
832110946250826180

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
2631 870
2768 4303
3627 1732
4178 2514
3221 457
921 3918
3662 3968
4426 2873
4847 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
3549 2876
2379 3894
258 275
2...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
2631 870
2768 4303
3627 1732
4178 2514
3221 457
921 3918
3662 3968
4426 2873
4847 3400
3575 1492
3211 2849
2717 2236
2206 622
2670 868
3549 2876
2379 3894
258 275
2...

output:

4
4982 2491
2 3296
3 49
5 1718
5 2032
6 2259
7 3444
8 225
8 2178
9 3490
10 3414
13 4636
13 4806
14 3689
15 1628
15 4719
16 4183
19 2237
20 1070
20 2778
21 52
22 3512
24 1355
25 2804
25 4520
27 4867
28 555
28 2833
29 491
30 1159
31 1244
33 4140
34 4760
35 1689
40 2239
41 338
42 4725
43 2227
44 1259
4...

input:

4
4982 2491
2 3296
3 49
5 1718
5 2032
6 2259
7 3444
8 225
8 2178
9 3490
10 3414
13 4636
13 4806
14 3689
15 1628
15 4719
16 4183
19 2237
20 1070
20 2778
21 52
22 3512
24 1355
25 2804
25 4520
27 4867
28 555
28 2833
29 491
30 1159
31 1244
33 4140
34 4760
35 1689
40 2239
41 338
42 4725
43 2227
44 1259
4...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
832110946250826180

Test #34:

score: 65
Accepted
time: 2ms = 1ms + 1ms
memory: 1916kb,2212kb

input:

3
85728715707691821

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
2631 870
577 4303
3627 1732
4161 2514
3221 457
454 3918
3662 3968
1655 2873
504 3400
116 1492
3211 2849
2717 2236
2206 622
2670 868
3549 2876
520 3894
1353 275
2210...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4982
2631 870
577 4303
3627 1732
4161 2514
3221 457
454 3918
3662 3968
1655 2873
504 3400
116 1492
3211 2849
2717 2236
2206 622
2670 868
3549 2876
520 3894
1353 275
2210...

output:

4
4982 2491
1 661
1 1030
1 1182
2 3296
3 4632
5 1718
5 2032
7 3444
8 3864
9 671
9 972
9 4467
10 3414
10 4275
11 1512
11 2459
11 4741
12 4232
13 2817
16 4183
17 3680
19 1963
19 2237
20 2450
21 52
21 1021
22 4673
25 4520
26 2295
27 4867
28 2833
29 135
29 491
30 1084
30 3462
31 1244
31 2123
33 325
33 2...

input:

4
4982 2491
1 661
1 1030
1 1182
2 3296
3 4632
5 1718
5 2032
7 3444
8 3864
9 671
9 972
9 4467
10 3414
10 4275
11 1512
11 2459
11 4741
12 4232
13 2817
16 4183
17 3680
19 1963
19 2237
20 2450
21 52
21 1021
22 4673
25 4520
26 2295
27 4867
28 2833
29 135
29 491
30 1084
30 3462
31 1244
31 2123
33 325
33 2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
85728715707691821

Test #35:

score: 65
Accepted
time: 1ms = 0ms + 1ms
memory: 1916kb,2212kb

input:

5
777434612360931036

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
4791 870
2768 4303
3627 1732
4178 2514
868 457
921 3918
4822 3968
4426 2873
504 3400
3575 1492
3211 2849
2717 2236
2206 622
3797 868
3549 2876
2379 3894
258 275
204...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
4791 870
2768 4303
3627 1732
4178 2514
868 457
921 3918
4822 3968
4426 2873
504 3400
3575 1492
3211 2849
2717 2236
2206 622
3797 868
3549 2876
2379 3894
258 275
204...

output:

6
4982 2520
1 1182
2 3296
3 49
5 2143
6 2791
8 2246
9 3490
11 1512
13 4806
14 3689
15 2198
18 408
18 589
18 4078
18 4105
18 4447
19 1327
19 2237
19 4808
20 1070
21 52
22 3277
22 3790
24 1355
27 2461
28 555
29 2996
30 3838
31 4584
32 393
32 2544
32 4161
32 4884
35 3106
36 720
36 1637
37 106
37 3126
3...

input:

6
4982 2520
1 1182
2 3296
3 49
5 2143
6 2791
8 2246
9 3490
11 1512
13 4806
14 3689
15 2198
18 408
18 589
18 4078
18 4105
18 4447
19 1327
19 2237
19 4808
20 1070
21 52
22 3277
22 3790
24 1355
27 2461
28 555
29 2996
30 3838
31 4584
32 393
32 2544
32 4161
32 4884
35 3106
36 720
36 1637
37 106
37 3126
3...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
777434612360931036

Test #36:

score: 65
Accepted
time: 2ms = 1ms + 1ms
memory: 1916kb,2220kb

input:

5
705262511549880222

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
4791 870
2768 4303
1581 1732
4161 2514
3221 457
454 3918
4822 3968
4426 2873
4847 3400
116 1492
3211 2849
3347 2236
2206 622
2670 868
4313 2876
2379 3894
258 275
20...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
4791 870
2768 4303
1581 1732
4161 2514
3221 457
454 3918
4822 3968
4426 2873
4847 3400
116 1492
3211 2849
3347 2236
2206 622
2670 868
4313 2876
2379 3894
258 275
20...

output:

6
4982 2527
1 661
1 1030
1 3960
2 3296
3 4632
4 3578
5 2032
6 1406
7 3444
8 2178
8 2660
8 3864
9 1221
11 1512
13 1560
14 3888
15 4719
17 332
18 589
18 4078
18 4105
18 4447
19 332
20 3392
22 3790
23 1323
25 2804
27 2461
28 2668
29 135
29 460
29 491
29 2969
30 1159
30 3462
31 1270
31 2123
32 393
32 24...

input:

6
4982 2527
1 661
1 1030
1 3960
2 3296
3 4632
4 3578
5 2032
6 1406
7 3444
8 2178
8 2660
8 3864
9 1221
11 1512
13 1560
14 3888
15 4719
17 332
18 589
18 4078
18 4105
18 4447
19 332
20 3392
22 3790
23 1323
25 2804
27 2461
28 2668
29 135
29 460
29 491
29 2969
30 1159
30 3462
31 1270
31 2123
32 393
32 24...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
705262511549880222

Test #37:

score: 65
Accepted
time: 2ms = 1ms + 1ms
memory: 1916kb,2204kb

input:

5
510318082834167951

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
2631 870
577 4303
3627 1732
4161 2514
868 457
454 3918
3662 3968
1655 2873
4847 3400
3575 1492
3406 2849
2717 2236
3884 622
2670 868
3549 2876
2379 3894
1353 275
22...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
2631 870
577 4303
3627 1732
4161 2514
868 457
454 3918
3662 3968
1655 2873
4847 3400
3575 1492
3406 2849
2717 2236
3884 622
2670 868
3549 2876
2379 3894
1353 275
22...

output:

6
4982 2516
1 628
1 1030
2 3319
6 1636
6 4450
8 2660
9 671
9 972
9 1611
9 3490
11 4741
12 4672
13 2817
15 3601
16 957
18 1900
19 3520
20 3392
21 1021
22 4673
23 1323
26 2295
27 608
27 4867
29 3698
30 1084
31 4584
32 1045
33 2231
34 4760
35 1689
36 4554
37 4750
38 633
38 1441
38 2215
39 4526
40 2239
...

input:

6
4982 2516
1 628
1 1030
2 3319
6 1636
6 4450
8 2660
9 671
9 972
9 1611
9 3490
11 4741
12 4672
13 2817
15 3601
16 957
18 1900
19 3520
20 3392
21 1021
22 4673
23 1323
26 2295
27 608
27 4867
29 3698
30 1084
31 4584
32 1045
33 2231
34 4760
35 1689
36 4554
37 4750
38 633
38 1441
38 2215
39 4526
40 2239
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
510318082834167951

Test #38:

score: 65
Accepted
time: 1ms = 0ms + 1ms
memory: 1920kb,2200kb

input:

5
914858813253258744

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
4791 870
577 4303
1581 1732
4178 2514
3221 457
921 3918
4822 3968
4426 2873
4847 3400
116 1492
3406 2849
3347 2236
3884 622
3797 868
3549 2876
2379 3894
258 275
221...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
4791 870
577 4303
1581 1732
4178 2514
3221 457
921 3918
4822 3968
4426 2873
4847 3400
116 1492
3406 2849
3347 2236
3884 622
3797 868
3549 2876
2379 3894
258 275
221...

output:

6
4982 2500
1 696
2 1744
6 2791
8 3376
9 1221
10 3414
11 1512
14 3689
15 3358
17 3680
18 93
18 408
18 589
18 4078
18 4105
19 719
20 2778
21 52
22 3277
22 3790
25 987
27 2461
28 555
29 2996
30 3838
31 1244
31 1270
31 2123
32 393
32 1929
32 2433
32 2544
32 2709
32 4285
34 1473
35 3106
36 4535
37 4750
...

input:

6
4982 2500
1 696
2 1744
6 2791
8 3376
9 1221
10 3414
11 1512
14 3689
15 3358
17 3680
18 93
18 408
18 589
18 4078
18 4105
19 719
20 2778
21 52
22 3277
22 3790
25 987
27 2461
28 555
29 2996
30 3838
31 1244
31 1270
31 2123
32 393
32 1929
32 2433
32 2544
32 2709
32 4285
34 1473
35 3106
36 4535
37 4750
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
914858813253258744

Test #39:

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

input:

5
659635316746638238

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
4791 870
2768 4303
1581 1732
4161 2514
3221 457
454 3918
3662 3968
4426 2873
504 3400
116 1492
3211 2849
3347 2236
2206 622
3797 868
3549 2876
2379 3894
258 275
221...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
4982
4791 870
2768 4303
1581 1732
4161 2514
3221 457
454 3918
3662 3968
4426 2873
504 3400
116 1492
3211 2849
3347 2236
2206 622
3797 868
3549 2876
2379 3894
258 275
221...

output:

6
4982 2500
1 1182
2 1672
2 3296
3 4632
4 2844
5 2032
6 1636
6 2259
6 4450
7 2651
8 2178
8 2660
9 671
9 972
9 3490
10 4275
11 791
13 1560
14 3689
15 2198
17 3680
18 1900
19 1963
19 2237
20 1070
20 2450
21 52
23 1323
24 1355
26 2295
27 4867
29 135
29 2969
30 1084
31 1244
31 1270
31 2123
32 393
32 136...

input:

6
4982 2500
1 1182
2 1672
2 3296
3 4632
4 2844
5 2032
6 1636
6 2259
6 4450
7 2651
8 2178
8 2660
9 671
9 972
9 3490
10 4275
11 791
13 1560
14 3689
15 2198
17 3680
18 1900
19 1963
19 2237
20 1070
20 2450
21 52
23 1323
24 1355
26 2295
27 4867
29 135
29 2969
30 1084
31 1244
31 1270
31 2123
32 393
32 136...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
659635316746638238

Test #40:

score: 65
Accepted
time: 2ms = 1ms + 1ms
memory: 1916kb,2184kb

input:

7
858490260563149759

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
4791 870
2768 4303
1581 1732
4161 2514
868 457
454 3918
3662 3968
4426 2873
4847 3400
116 1492
3211 2849
3347 2236
2206 622
2670 868
3549 2876
2379 3894
258 275
204...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
4791 870
2768 4303
1581 1732
4161 2514
868 457
454 3918
3662 3968
4426 2873
4847 3400
116 1492
3211 2849
3347 2236
2206 622
2670 868
3549 2876
2379 3894
258 275
204...

output:

8
4982 2491
2 1672
2 3296
3 49
4 2844
5 2032
6 2259
6 4834
7 3444
8 225
9 671
9 1221
9 3490
11 4741
12 4232
13 4806
14 3888
15 2799
16 957
18 93
19 2237
20 1070
20 2450
21 1021
22 3512
23 1323
24 1355
26 4010
27 4867
28 555
29 135
29 2969
30 1159
31 1270
33 325
33 2231
34 1473
34 4760
35 1689
36 469...

input:

8
4982 2491
2 1672
2 3296
3 49
4 2844
5 2032
6 2259
6 4834
7 3444
8 225
9 671
9 1221
9 3490
11 4741
12 4232
13 4806
14 3888
15 2799
16 957
18 93
19 2237
20 1070
20 2450
21 1021
22 3512
23 1323
24 1355
26 4010
27 4867
28 555
29 135
29 2969
30 1159
31 1270
33 325
33 2231
34 1473
34 4760
35 1689
36 469...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
858490260563149759

Test #41:

score: 65
Accepted
time: 2ms = 1ms + 1ms
memory: 1912kb,2204kb

input:

7
860058643727731209

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
2631 870
2768 4303
1581 1732
4161 2514
868 457
454 3918
3662 3968
1655 2873
4847 3400
3575 1492
3211 2849
3347 2236
3884 622
3797 868
4313 2876
520 3894
258 275
204...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
2631 870
2768 4303
1581 1732
4161 2514
868 457
454 3918
3662 3968
1655 2873
4847 3400
3575 1492
3211 2849
3347 2236
3884 622
3797 868
4313 2876
520 3894
258 275
204...

output:

8
4982 2491
1 1030
1 3960
2 3319
3 49
4 3578
5 2032
6 2259
7 2651
9 671
10 4275
12 4232
13 4806
14 3888
15 2198
16 957
17 332
18 4078
19 2237
20 1070
20 2450
21 1021
22 4673
23 1323
24 1355
25 2804
26 2295
28 555
28 2668
29 460
31 1270
31 2403
31 4436
33 2231
36 4698
37 1963
38 1441
39 3906
39 4526
...

input:

8
4982 2491
1 1030
1 3960
2 3319
3 49
4 3578
5 2032
6 2259
7 2651
9 671
10 4275
12 4232
13 4806
14 3888
15 2198
16 957
17 332
18 4078
19 2237
20 1070
20 2450
21 1021
22 4673
23 1323
24 1355
25 2804
26 2295
28 555
28 2668
29 460
31 1270
31 2403
31 4436
33 2231
36 4698
37 1963
38 1441
39 3906
39 4526
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
860058643727731209

Test #42:

score: 65
Accepted
time: 2ms = 1ms + 1ms
memory: 1916kb,2212kb

input:

7
718861404514377808

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
4791 870
2768 4303
1581 1732
4178 2514
868 457
921 3918
3662 3968
4426 2873
504 3400
3575 1492
3211 2849
3347 2236
2206 622
2670 868
3549 2876
520 3894
258 275
2048...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
4791 870
2768 4303
1581 1732
4178 2514
868 457
921 3918
3662 3968
4426 2873
504 3400
3575 1492
3211 2849
3347 2236
2206 622
2670 868
3549 2876
520 3894
258 275
2048...

output:

8
4982 2491
1 3960
3 4632
4 2844
4 3578
5 2032
6 2259
6 4834
7 3444
8 225
9 671
10 3414
11 4741
12 4232
13 1560
14 3888
15 3358
16 957
17 332
18 4078
18 4105
19 719
19 1327
20 1070
21 52
22 3512
23 1323
24 1355
25 4520
26 2295
27 1827
28 555
29 460
30 3462
31 2403
31 4436
32 2544
33 325
34 1849
35 1...

input:

8
4982 2491
1 3960
3 4632
4 2844
4 3578
5 2032
6 2259
6 4834
7 3444
8 225
9 671
10 3414
11 4741
12 4232
13 1560
14 3888
15 3358
16 957
17 332
18 4078
18 4105
19 719
19 1327
20 1070
21 52
22 3512
23 1323
24 1355
25 4520
26 2295
27 1827
28 555
29 460
30 3462
31 2403
31 4436
32 2544
33 325
34 1849
35 1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
718861404514377808

Test #43:

score: 65
Accepted
time: 2ms = 1ms + 1ms
memory: 1912kb,2208kb

input:

7
659192688464047828

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
4791 870
2768 4303
1581 1732
4161 2514
868 457
454 3918
4822 3968
1655 2873
504 3400
3575 1492
3211 2849
3347 2236
3884 622
2670 868
4313 2876
2379 3894
258 275
221...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
4791 870
2768 4303
1581 1732
4161 2514
868 457
454 3918
4822 3968
1655 2873
504 3400
3575 1492
3211 2849
3347 2236
3884 622
2670 868
4313 2876
2379 3894
258 275
221...

output:

8
4982 2491
2 1672
2 3319
3 4632
4 2844
5 1718
5 2032
7 3444
8 2660
9 671
9 972
12 4232
13 1560
14 3888
15 4719
16 957
18 589
19 1327
19 2237
19 4808
20 1070
21 531
23 1323
24 1355
25 4520
27 4867
28 2833
29 460
31 4436
33 325
33 2231
34 1849
34 4760
35 1689
37 3126
38 342
38 547
39 4526
40 2239
41 ...

input:

8
4982 2491
2 1672
2 3319
3 4632
4 2844
5 1718
5 2032
7 3444
8 2660
9 671
9 972
12 4232
13 1560
14 3888
15 4719
16 957
18 589
19 1327
19 2237
19 4808
20 1070
21 531
23 1323
24 1355
25 4520
27 4867
28 2833
29 460
31 4436
33 325
33 2231
34 1849
34 4760
35 1689
37 3126
38 342
38 547
39 4526
40 2239
41 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
659192688464047828

Test #44:

score: 65
Accepted
time: 2ms = 1ms + 1ms
memory: 1920kb,2216kb

input:

7
685730986714800201

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
2631 870
2768 4303
3627 1732
4178 2514
868 457
921 3918
3662 3968
4426 2873
504 3400
116 1492
3211 2849
2717 2236
2206 622
2670 868
3549 2876
520 3894
258 275
2210 ...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
4982
2631 870
2768 4303
3627 1732
4178 2514
868 457
921 3918
3662 3968
4426 2873
504 3400
116 1492
3211 2849
2717 2236
2206 622
2670 868
3549 2876
520 3894
258 275
2210 ...

output:

8
4982 2491
1 661
1 3960
2 3319
3 4632
4 3862
5 1718
5 2032
6 4834
7 3444
8 225
9 671
9 972
10 2573
11 4741
12 4672
14 3689
15 4719
16 4183
17 3680
19 1327
19 2237
20 1070
21 1021
22 4673
23 996
24 1355
25 4520
27 608
28 555
29 460
29 491
30 3462
30 3838
31 1244
33 325
34 1849
35 1689
37 106
37 3126...

input:

8
4982 2491
1 661
1 3960
2 3319
3 4632
4 3862
5 1718
5 2032
6 4834
7 3444
8 225
9 671
9 972
10 2573
11 4741
12 4672
14 3689
15 4719
16 4183
17 3680
19 1327
19 2237
20 1070
21 1021
22 4673
23 996
24 1355
25 4520
27 608
28 555
29 460
29 491
30 3462
30 3838
31 1244
33 325
34 1849
35 1689
37 106
37 3126...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
685730986714800201