QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#462775#8726. Magic Showmakrav30 0ms1896kbC++201.5kb2024-07-04 03:54:592024-07-04 03:55:00

Judging History

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

  • [2024-07-04 03:55:00]
  • 评测
  • 测评结果:30
  • 用时:0ms
  • 内存:1896kb
  • [2024-07-04 03:54:59]
  • 提交

Alice

#include <bits/stdc++.h>
#include "Alice.h"

using namespace std;

#define all(x) (x).begin(), (x).end()
#define pb push_back

std::vector<std::pair<int,int>> Alice(){
    long long x = setN(5000);
    mt19937 rnd(52);
    vector<int> vt(5000);
    iota(all(vt), 1);
    int n = 5000;
    for (int i = 1; i < n; i++) {
        swap(vt[i], vt[rnd() % (i + 1)]);
    }
    vector<pair<int, int>> edges;
    for (int i = 0; i < 199; i++) edges.pb({vt[i], vt[i + 1]});
    for (int i = 200; i < n; i += 30) {
        for (int j = 0; j < 30; j++) {
            if ((x>>j)&1) {
                edges.pb({vt[rnd() % 100], vt[i+j]});
            } else {
                edges.pb({vt[rnd() % 100 + 100], vt[i + j]});
            }
        }
    }
    return edges;
}

Bob

#include <bits/stdc++.h>
#include "Alice.h"

using namespace std;

#define all(x) (x).begin(), (x).end()
#define pb push_back

long long Bob(vector<pair<int,int>> V){
    mt19937 rnd(52);
    vector<int> vt(5000);
    iota(all(vt), 1);
    int n = 5000;
    for (int i = 1; i < n; i++) {
        swap(vt[i], vt[rnd() % (i + 1)]);
    }
    vector<int> pos(n + 1);
    for (int i = 0; i < n; i++) pos[vt[i]] = i;
    vector<int> b(30);
    for (auto &u : V) {
        if (pos[u.first] > pos[u.second]) swap(u.first, u.second);
        if (pos[u.second] >= 200 && pos[u.first] < 100) {
            b[(pos[u.second] - 200) % 30] = 1;
        }
    }
    long long answ = 0;
    for (int i=0; i<30; i++) {
        if (b[i]) answ += (1ll << i);
    }
    return answ;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

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

input:

1
4005

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

output:

2
5000 3044
1 1657
2 3520
4 4424
7 4665
8 3809
9 3366
12 1864
14 1520
15 271
15 505
15 780
15 785
15 982
15 1057
15 1103
15 1737
15 2213
15 2405
15 2907
15 2945
15 3029
15 3087
15 3523
15 3582
15 3814
15 3945
15 4106
15 4109
15 4111
15 4435
15 4668
15 4694
15 4977
16 2192
17 4261
18 4863
20 362
21 4...

input:

2
5000 3044
1 1657
2 3520
4 4424
7 4665
8 3809
9 3366
12 1864
14 1520
15 271
15 505
15 780
15 785
15 982
15 1057
15 1103
15 1737
15 2213
15 2405
15 2907
15 2945
15 3029
15 3087
15 3523
15 3582
15 3814
15 3945
15 4106
15 4109
15 4111
15 4435
15 4668
15 4694
15 4977
16 2192
17 4261
18 4863
20 362
21 4...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4005

Test #2:

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

input:

1
459

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

output:

2
5000 3044
1 164
2 3520
4 4424
7 4665
8 3809
9 3366
12 1864
14 4546
15 271
15 785
15 982
15 1057
15 1103
15 1170
15 1577
15 2213
15 2405
15 2907
15 2945
15 3029
15 3087
15 3193
15 3523
15 3582
15 3814
15 3945
15 4106
15 4109
15 4111
15 4329
15 4435
15 4668
15 4977
16 2192
17 236
18 4863
20 2614
21 ...

input:

2
5000 3044
1 164
2 3520
4 4424
7 4665
8 3809
9 3366
12 1864
14 4546
15 271
15 785
15 982
15 1057
15 1103
15 1170
15 1577
15 2213
15 2405
15 2907
15 2945
15 3029
15 3087
15 3193
15 3523
15 3582
15 3814
15 3945
15 4106
15 4109
15 4111
15 4329
15 4435
15 4668
15 4977
16 2192
17 236
18 4863
20 2614
21 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
459

Test #3:

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

input:

1
2495

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

output:

2
5000 3044
1 1657
2 3520
4 4424
7 4665
8 1251
9 3366
12 1864
14 4546
15 271
15 785
15 982
15 1057
15 1103
15 1577
15 2213
15 2405
15 2907
15 2945
15 3029
15 3087
15 3523
15 3582
15 3814
15 3945
15 4106
15 4109
15 4111
15 4435
15 4668
15 4977
16 2192
17 4261
18 4863
20 2614
21 4461
22 3023
23 2445
2...

input:

2
5000 3044
1 1657
2 3520
4 4424
7 4665
8 1251
9 3366
12 1864
14 4546
15 271
15 785
15 982
15 1057
15 1103
15 1577
15 2213
15 2405
15 2907
15 2945
15 3029
15 3087
15 3523
15 3582
15 3814
15 3945
15 4106
15 4109
15 4111
15 4435
15 4668
15 4977
16 2192
17 4261
18 4863
20 2614
21 4461
22 3023
23 2445
2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
2495

Test #4:

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

input:

3
1560

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

output:

4
5000 2500
2 3520
5 4546
8 1251
12 1864
13 2686
14 1520
15 140
15 271
15 615
15 713
15 785
15 982
15 1057
15 1083
15 1103
15 1170
15 1290
15 2078
15 2213
15 2405
15 2449
15 2907
15 2945
15 3029
15 3087
15 3189
15 3193
15 3497
15 3523
15 3582
15 3668
15 3734
15 3814
15 3945
15 4106
15 4109
15 4111
1...

input:

4
5000 2500
2 3520
5 4546
8 1251
12 1864
13 2686
14 1520
15 140
15 271
15 615
15 713
15 785
15 982
15 1057
15 1083
15 1103
15 1170
15 1290
15 2078
15 2213
15 2405
15 2449
15 2907
15 2945
15 3029
15 3087
15 3189
15 3193
15 3497
15 3523
15 3582
15 3668
15 3734
15 3814
15 3945
15 4106
15 4109
15 4111
1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1560

Test #5:

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

input:

3
3594

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

output:

4
5000 2500
2 3520
5 4546
10 4924
12 1864
13 2686
14 1520
17 4261
18 4863
20 362
21 2847
24 1066
25 1228
29 2730
31 409
32 2055
37 3538
38 4239
39 332
39 567
39 804
39 851
39 868
39 959
39 1094
39 1097
39 1186
39 1311
39 1377
39 1591
39 1665
39 1679
39 1940
39 2022
39 2121
39 2187
39 2259
39 2384
39...

input:

4
5000 2500
2 3520
5 4546
10 4924
12 1864
13 2686
14 1520
17 4261
18 4863
20 362
21 2847
24 1066
25 1228
29 2730
31 409
32 2055
37 3538
38 4239
39 332
39 567
39 804
39 851
39 868
39 959
39 1094
39 1097
39 1186
39 1311
39 1377
39 1591
39 1665
39 1679
39 1940
39 2022
39 2121
39 2187
39 2259
39 2384
39...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
3594

Test #6:

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

input:

3
1750

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

output:

4
5000 2500
2 3520
5 4546
8 1251
14 1520
17 236
18 4863
20 362
21 2847
22 3023
24 1066
25 1228
28 1379
29 3949
31 39
32 2055
36 4617
37 3538
38 4239
39 332
39 804
39 851
39 868
39 959
39 1094
39 1097
39 1186
39 1311
39 1377
39 1591
39 1665
39 2022
39 2044
39 2121
39 2139
39 2259
39 2384
39 2589
39 2...

input:

4
5000 2500
2 3520
5 4546
8 1251
14 1520
17 236
18 4863
20 362
21 2847
22 3023
24 1066
25 1228
28 1379
29 3949
31 39
32 2055
36 4617
37 3538
38 4239
39 332
39 804
39 851
39 868
39 959
39 1094
39 1097
39 1186
39 1311
39 1377
39 1591
39 1665
39 2022
39 2044
39 2121
39 2139
39 2259
39 2384
39 2589
39 2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1750

Test #7:

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

input:

5
4878

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

output:

6
5000 2506
1 164
3 2192
4 4424
7 4665
8 3809
11 1011
12 1864
13 2686
15 982
16 2192
17 4261
22 4814
23 3167
24 1066
26 3773
27 758
28 460
29 2730
37 3538
38 4239
39 851
45 4814
49 4372
51 2578
52 898
53 3385
54 1379
56 4458
57 982
58 4665
59 800
60 3773
64 1245
67 800
69 2046
71 3385
73 4166
75 417...

input:

6
5000 2506
1 164
3 2192
4 4424
7 4665
8 3809
11 1011
12 1864
13 2686
15 982
16 2192
17 4261
22 4814
23 3167
24 1066
26 3773
27 758
28 460
29 2730
37 3538
38 4239
39 851
45 4814
49 4372
51 2578
52 898
53 3385
54 1379
56 4458
57 982
58 4665
59 800
60 3773
64 1245
67 800
69 2046
71 3385
73 4166
75 417...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4878

Test #8:

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

input:

5
1223

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

output:

6
5000 2506
1 164
3 2192
4 4424
7 4665
8 3809
11 1011
12 1864
13 2686
15 982
16 2192
17 236
22 3023
23 2445
24 1066
26 3773
27 758
28 460
29 3949
37 2084
38 4239
39 851
45 4814
49 4372
51 2578
52 898
53 3385
54 460
56 4458
57 982
58 4665
59 800
60 3773
64 1245
67 800
69 2046
71 3349
73 4166
75 4173
...

input:

6
5000 2506
1 164
3 2192
4 4424
7 4665
8 3809
11 1011
12 1864
13 2686
15 982
16 2192
17 236
22 3023
23 2445
24 1066
26 3773
27 758
28 460
29 3949
37 2084
38 4239
39 851
45 4814
49 4372
51 2578
52 898
53 3385
54 460
56 4458
57 982
58 4665
59 800
60 3773
64 1245
67 800
69 2046
71 3349
73 4166
75 4173
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1223

Test #9:

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

input:

5
648

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

output:

6
5000 2506
1 164
3 2192
4 4424
7 4665
8 3809
11 1011
12 1864
13 2686
15 982
16 2192
17 4261
22 3023
23 3167
24 1066
26 3773
27 758
28 460
29 2730
37 3538
38 4239
39 851
45 4814
49 4372
51 646
52 898
53 3385
54 1379
56 4458
57 982
58 4665
59 800
60 3773
64 1245
67 800
69 2686
71 3349
73 4166
75 4173...

input:

6
5000 2506
1 164
3 2192
4 4424
7 4665
8 3809
11 1011
12 1864
13 2686
15 982
16 2192
17 4261
22 3023
23 3167
24 1066
26 3773
27 758
28 460
29 2730
37 3538
38 4239
39 851
45 4814
49 4372
51 646
52 898
53 3385
54 1379
56 4458
57 982
58 4665
59 800
60 3773
64 1245
67 800
69 2686
71 3349
73 4166
75 4173...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
648

Test #10:

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

input:

7
4475

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

output:

8
5000 2500
2 3520
3 2192
4 4424
5 4546
8 1251
10 4924
11 1011
13 2686
14 4546
15 140
15 271
15 615
15 739
15 785
15 1057
15 1170
15 1290
15 1577
15 2078
15 2213
15 2405
15 2449
15 2907
15 2945
15 3029
15 3087
15 3497
15 3523
15 3582
15 3668
15 3734
15 3814
15 3945
15 4106
15 4109
15 4111
15 4329
15...

input:

8
5000 2500
2 3520
3 2192
4 4424
5 4546
8 1251
10 4924
11 1011
13 2686
14 4546
15 140
15 271
15 615
15 739
15 785
15 1057
15 1170
15 1290
15 1577
15 2078
15 2213
15 2405
15 2449
15 2907
15 2945
15 3029
15 3087
15 3497
15 3523
15 3582
15 3668
15 3734
15 3814
15 3945
15 4106
15 4109
15 4111
15 4329
15...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4475

Test #11:

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

input:

7
4240

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

output:

8
5000 2500
1 164
2 3520
3 2192
6 2616
10 4924
12 1864
13 2686
15 271
15 505
15 615
15 713
15 739
15 780
15 785
15 1057
15 1083
15 1170
15 1577
15 1737
15 2078
15 2213
15 2449
15 2907
15 2945
15 3087
15 3189
15 3193
15 3497
15 3523
15 3582
15 3668
15 3734
15 3814
15 3945
15 4106
15 4109
15 4111
15 4...

input:

8
5000 2500
1 164
2 3520
3 2192
6 2616
10 4924
12 1864
13 2686
15 271
15 505
15 615
15 713
15 739
15 780
15 785
15 1057
15 1083
15 1170
15 1577
15 1737
15 2078
15 2213
15 2449
15 2907
15 2945
15 3087
15 3189
15 3193
15 3497
15 3523
15 3582
15 3668
15 3734
15 3814
15 3945
15 4106
15 4109
15 4111
15 4...

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Incorrect answer.

Subtask #2:

score: 30
Accepted

Test #13:

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

input:

1
17476204

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

output:

2
5000 3044
1 1657
2 4053
4 4424
7 4665
8 3809
9 3366
12 4228
14 4546
15 140
15 271
15 713
15 785
15 982
15 1057
15 1103
15 1290
15 2213
15 2907
15 3029
15 3814
15 3945
15 4106
15 4331
15 4977
16 2531
17 236
18 4863
20 362
21 4461
22 4814
23 3167
24 4812
26 2466
28 460
30 2713
31 409
33 542
34 4193
...

input:

2
5000 3044
1 1657
2 4053
4 4424
7 4665
8 3809
9 3366
12 4228
14 4546
15 140
15 271
15 713
15 785
15 982
15 1057
15 1103
15 1290
15 2213
15 2907
15 3029
15 3814
15 3945
15 4106
15 4331
15 4977
16 2531
17 236
18 4863
20 362
21 4461
22 4814
23 3167
24 4812
26 2466
28 460
30 2713
31 409
33 542
34 4193
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
17476204

Test #14:

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

input:

1
11926600

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

output:

2
5000 3044
1 164
2 4053
4 3725
7 3086
8 3809
9 1499
12 1864
14 1520
15 140
15 271
15 713
15 785
15 982
15 1103
15 1170
15 1290
15 1577
15 2213
15 2405
15 3193
15 3582
15 4109
15 4329
15 4331
15 4435
15 4977
16 2531
17 236
18 1836
20 2614
21 2847
22 4814
23 3167
24 4812
26 3773
28 460
30 1535
31 409...

input:

2
5000 3044
1 164
2 4053
4 3725
7 3086
8 3809
9 1499
12 1864
14 1520
15 140
15 271
15 713
15 785
15 982
15 1103
15 1170
15 1290
15 1577
15 2213
15 2405
15 3193
15 3582
15 4109
15 4329
15 4331
15 4435
15 4977
16 2531
17 236
18 1836
20 2614
21 2847
22 4814
23 3167
24 4812
26 3773
28 460
30 1535
31 409...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
11926600

Test #15:

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

input:

1
16602378

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

output:

2
5000 3044
1 164
2 3520
4 3725
7 3086
8 3809
9 1499
12 4228
14 1520
15 140
15 785
15 982
15 1103
15 1170
15 1290
15 1577
15 2405
15 2945
15 3087
15 3193
15 3523
15 4109
15 4111
15 4329
15 4331
15 4668
15 4977
16 2192
17 4261
18 1836
20 2614
21 2847
22 4814
23 3167
24 1066
26 2466
28 460
30 1535
31 ...

input:

2
5000 3044
1 164
2 3520
4 3725
7 3086
8 3809
9 1499
12 4228
14 1520
15 140
15 785
15 982
15 1103
15 1170
15 1290
15 1577
15 2405
15 2945
15 3087
15 3193
15 3523
15 4109
15 4111
15 4329
15 4331
15 4668
15 4977
16 2192
17 4261
18 1836
20 2614
21 2847
22 4814
23 3167
24 1066
26 2466
28 460
30 1535
31 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
16602378

Test #16:

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

input:

3
13129243

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

output:

4
5000 2500
5 1520
7 3086
8 1251
10 1795
11 1906
12 4228
13 2686
14 1520
15 140
15 615
15 713
15 785
15 1103
15 1170
15 1290
15 2405
15 2449
15 2907
15 2945
15 3029
15 3087
15 3189
15 3193
15 3497
15 3523
15 3668
15 4109
15 4111
15 4329
15 4668
15 4977
18 1836
20 362
21 2847
23 2445
25 1228
26 2466
...

input:

4
5000 2500
5 1520
7 3086
8 1251
10 1795
11 1906
12 4228
13 2686
14 1520
15 140
15 615
15 713
15 785
15 1103
15 1170
15 1290
15 2405
15 2449
15 2907
15 2945
15 3029
15 3087
15 3189
15 3193
15 3497
15 3523
15 3668
15 4109
15 4111
15 4329
15 4668
15 4977
18 1836
20 362
21 2847
23 2445
25 1228
26 2466
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
13129243

Test #17:

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

input:

3
7892141

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

output:

4
5000 2500
2 3520
3 2531
5 1520
6 2829
10 4924
12 4228
13 2686
14 1520
15 615
15 713
15 739
15 785
15 982
15 1103
15 1577
15 1600
15 2405
15 2449
15 3189
15 3281
15 3523
15 3668
15 3814
15 3945
15 4106
15 4109
15 4111
15 4242
15 4977
18 1836
19 511
21 4461
23 2445
24 4812
26 2466
27 1813
29 2730
30...

input:

4
5000 2500
2 3520
3 2531
5 1520
6 2829
10 4924
12 4228
13 2686
14 1520
15 615
15 713
15 739
15 785
15 982
15 1103
15 1577
15 1600
15 2405
15 2449
15 3189
15 3281
15 3523
15 3668
15 3814
15 3945
15 4106
15 4109
15 4111
15 4242
15 4977
18 1836
19 511
21 4461
23 2445
24 4812
26 2466
27 1813
29 2730
30...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
7892141

Test #18:

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

input:

3
21314775

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

output:

4
5000 2500
2 3520
3 2531
4 4424
5 1520
6 2616
10 4924
12 1864
13 2686
14 1520
17 236
18 4863
21 2847
24 4812
29 3949
32 2055
36 4617
39 332
39 804
39 851
39 868
39 959
39 1186
39 1311
39 1377
39 1513
39 1665
39 2022
39 2139
39 2259
39 2384
39 2589
39 2619
39 2822
39 3045
39 3130
39 3788
39 4530
39 ...

input:

4
5000 2500
2 3520
3 2531
4 4424
5 1520
6 2616
10 4924
12 1864
13 2686
14 1520
17 236
18 4863
21 2847
24 4812
29 3949
32 2055
36 4617
39 332
39 804
39 851
39 868
39 959
39 1186
39 1311
39 1377
39 1513
39 1665
39 2022
39 2139
39 2259
39 2384
39 2589
39 2619
39 2822
39 3045
39 3130
39 3788
39 4530
39 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
21314775

Test #19:

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

input:

5
5559540

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

output:

6
5000 2506
1 1657
3 2192
4 3725
7 4665
8 1251
11 1906
12 1864
13 2046
15 1103
16 2531
17 236
22 3023
23 3167
24 1066
26 3773
27 1813
28 1379
29 3949
37 2084
38 4239
39 851
45 4814
49 4967
51 2578
52 898
53 3349
54 460
56 4458
57 2287
58 4665
59 3905
60 2466
64 3701
67 800
69 2046
71 3349
73 4166
75...

input:

6
5000 2506
1 1657
3 2192
4 3725
7 4665
8 1251
11 1906
12 1864
13 2046
15 1103
16 2531
17 236
22 3023
23 3167
24 1066
26 3773
27 1813
28 1379
29 3949
37 2084
38 4239
39 851
45 4814
49 4967
51 2578
52 898
53 3349
54 460
56 4458
57 2287
58 4665
59 3905
60 2466
64 3701
67 800
69 2046
71 3349
73 4166
75...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
5559540

Test #20:

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

input:

5
9424319

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

output:

6
5000 2506
1 1657
3 2192
4 4424
7 3086
8 1251
11 1906
12 4228
13 2046
15 1103
16 2531
17 4261
22 3023
23 2445
24 1066
26 2466
27 758
28 1379
29 2730
37 2084
38 4239
39 851
45 3023
49 4967
51 2578
52 898
53 3349
54 460
56 4458
57 2287
58 3086
59 3905
60 2466
64 3701
67 800
69 2046
71 3349
73 4166
75...

input:

6
5000 2506
1 1657
3 2192
4 4424
7 3086
8 1251
11 1906
12 4228
13 2046
15 1103
16 2531
17 4261
22 3023
23 2445
24 1066
26 2466
27 758
28 1379
29 2730
37 2084
38 4239
39 851
45 3023
49 4967
51 2578
52 898
53 3349
54 460
56 4458
57 2287
58 3086
59 3905
60 2466
64 3701
67 800
69 2046
71 3349
73 4166
75...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
9424319

Test #21:

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

input:

5
10955780

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

output:

6
5000 2506
1 164
3 2531
4 4424
7 3086
8 3809
11 1011
12 1864
13 2686
15 982
16 2192
17 4261
22 4814
23 3167
24 4812
26 3773
27 758
28 460
29 3949
37 2084
38 2336
39 851
45 3023
49 4372
51 2578
52 898
53 3385
54 460
56 4206
57 982
58 3086
59 800
60 3773
64 3701
67 800
69 2046
71 3385
73 480
75 4173
...

input:

6
5000 2506
1 164
3 2531
4 4424
7 3086
8 3809
11 1011
12 1864
13 2686
15 982
16 2192
17 4261
22 4814
23 3167
24 4812
26 3773
27 758
28 460
29 3949
37 2084
38 2336
39 851
45 3023
49 4372
51 2578
52 898
53 3385
54 460
56 4206
57 982
58 3086
59 800
60 3773
64 3701
67 800
69 2046
71 3385
73 480
75 4173
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
10955780

Test #22:

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

input:

7
19938721

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

output:

8
5000 2500
5 4546
8 3809
9 1499
11 1011
12 1864
13 2686
19 511
20 2614
22 3023
25 1228
29 3949
30 2713
32 2055
36 4199
37 2084
39 332
39 804
39 868
39 959
39 1097
39 1186
39 1311
39 1377
39 1513
39 1665
39 1679
39 1940
39 2022
39 2139
39 2187
39 2259
39 2384
39 2589
39 2619
39 2977
39 3045
39 3130
...

input:

8
5000 2500
5 4546
8 3809
9 1499
11 1011
12 1864
13 2686
19 511
20 2614
22 3023
25 1228
29 3949
30 2713
32 2055
36 4199
37 2084
39 332
39 804
39 868
39 959
39 1097
39 1186
39 1311
39 1377
39 1513
39 1665
39 1679
39 1940
39 2022
39 2139
39 2187
39 2259
39 2384
39 2589
39 2619
39 2977
39 3045
39 3130
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
19938721

Test #23:

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

input:

7
5129508

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

output:

8
5000 2500
1 1657
2 3520
3 2192
5 1520
7 4665
9 3366
10 4924
12 4228
13 2686
14 1520
15 140
15 505
15 615
15 739
15 780
15 785
15 1083
15 1290
15 1577
15 1600
15 1737
15 2449
15 2907
15 2945
15 3029
15 3087
15 3189
15 3281
15 3497
15 3523
15 3668
15 3814
15 3945
15 4106
15 4109
15 4111
15 4210
15 4...

input:

8
5000 2500
1 1657
2 3520
3 2192
5 1520
7 4665
9 3366
10 4924
12 4228
13 2686
14 1520
15 140
15 505
15 615
15 739
15 780
15 785
15 1083
15 1290
15 1577
15 1600
15 1737
15 2449
15 2907
15 2945
15 3029
15 3087
15 3189
15 3281
15 3497
15 3523
15 3668
15 3814
15 3945
15 4106
15 4109
15 4111
15 4210
15 4...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
5129508

Test #24:

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

input:

7
15332941

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

output:

8
5000 2500
1 164
3 2531
5 1520
6 2616
7 3086
8 3809
9 3366
10 1795
12 4228
13 2046
14 1520
16 2531
21 2847
23 2445
25 1228
26 2466
27 758
30 1535
33 542
35 4820
36 4617
38 2336
41 4765
42 4171
43 4820
44 2847
45 3023
46 4950
48 1294
50 1424
52 898
53 3349
56 4206
59 358
59 880
59 971
59 976
59 1138...

input:

8
5000 2500
1 164
3 2531
5 1520
6 2616
7 3086
8 3809
9 3366
10 1795
12 4228
13 2046
14 1520
16 2531
21 2847
23 2445
25 1228
26 2466
27 758
30 1535
33 542
35 4820
36 4617
38 2336
41 4765
42 4171
43 4820
44 2847
45 3023
46 4950
48 1294
50 1424
52 898
53 3349
56 4206
59 358
59 880
59 971
59 976
59 1138...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
15332941

Subtask #3:

score: 0
Wrong Answer

Test #25:

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

input:

1
355365355024496523

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
807 3725
3725 1535
1535 2531
2531 4644
4644 919
919 1520
1520 973
973 619
619 3538
3538 1499
1499 4287
4287 1161
1161 3023
3023 483
483 3176
3176 1825
1825 4100
410...

output:

2
5000 3044
1 164
2 3520
4 3725
7 3086
8 3809
9 1499
12 1864
14 1520
15 271
15 785
15 982
15 1057
15 1103
15 1170
15 2213
15 3193
15 3523
15 3582
15 4111
15 4329
15 4435
15 4977
16 2192
17 4261
18 4863
20 362
21 2847
22 3023
23 2445
24 4812
26 3773
28 460
30 1535
31 39
33 1901
34 3473
36 4199
37 353...

input:

2
5000 3044
1 164
2 3520
4 3725
7 3086
8 3809
9 1499
12 1864
14 1520
15 271
15 785
15 982
15 1057
15 1103
15 1170
15 2213
15 3193
15 3523
15 3582
15 4111
15 4329
15 4435
15 4977
16 2192
17 4261
18 4863
20 362
21 2847
22 3023
23 2445
24 4812
26 3773
28 460
30 1535
31 39
33 1901
34 3473
36 4199
37 353...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
397883275