QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#423374#8726. Magic ShowLynkcat100 ✓1ms1916kbC++202.2kb2024-05-27 23:08:412024-05-27 23:08:42

Judging History

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

  • [2024-05-27 23:08:42]
  • 评测
  • 测评结果:100
  • 用时:1ms
  • 内存:1916kb
  • [2024-05-27 23:08:41]
  • 提交

Alice

#include<bits/stdc++.h>
#include "Alice.h"
#define poly vector<int>
#define pa pair<int,int>
#define ull unsigned long long
#define mp make_pair
#define fi first
#define se second
#define ll long long
#define sz(x) ((int)(x.size()))
using namespace std;

//
namespace 
{
    const int n=5000,N=5005;
    mt19937_64 rnd(0724072407240724);
    int p[N],flip[N];
    void init()
    {
        for (int i=1;i<=n;i++) p[i]=i;
        shuffle(p+1,p+n+1,rnd);
        for (int i=1;i<=5000;i++)
            flip[i]=rnd()%2;
    }
}

std::vector<std::pair<int,int>> Alice(){
    init();
    std::vector<std::pair<int,int>>all;
    for (int i=1;i<4;i++)
        all.push_back(mp(p[i],p[i+1]));

    ll ans=setN(5000);

    for (int i=5;i<=5000;i++)
    {
        int x=i%60;
        int t=(ans>>x)&1;
        int o=rnd()%(i-1)+1;
        while (o%2!=t) o=rnd()%(i-1)+1;
        if (flip[i])
        {
            if (o!=1) o--;
            else o++;
        }
        all.push_back(mp(p[i],p[o]));
    }
    shuffle(all.begin(),all.end(),rnd);
    return all; 
}

Bob


#include<bits/stdc++.h>
#include "Bob.h"
#define poly vector<int>
#define pa pair<int,int>
#define mp make_pair
#define ull unsigned long long
#define fi first
#define se second
#define ll long long
#define sz(x) ((int)(x.size()))
using namespace std;

namespace 
{
    const int n=5000,N=5005;
    mt19937_64 rnd(0724072407240724);
    int p[N],flip[N];
    int cs[N];
    int ip[N];
    void init()
    {
        for (int i=1;i<=n;i++) p[i]=i;
        shuffle(p+1,p+n+1,rnd);
        for (int i=1;i<=n;i++) ip[p[i]]=i;
        for (int i=1;i<=5000;i++)
            flip[i]=rnd()%2;
    }
}

inline long long Ans(int x,int y)
{
    return 1ll*(x-1)*5000+y;
}
mt19937_64 rnd1(time(0));
long long Bob(std::vector<std::pair<int,int>> V){
    init();
    for (auto &[u,v]:V)
    {
        u=ip[u],v=ip[v];
        if (v>u) swap(u,v);
        // if (u>120)
        // cout<<u<<","<<v<<" "<<(u-120)%60<<" "<<(((v-1)%2)^flip[u])<<endl;
        if (u>=5) 
            cs[u%60]=((v)%2)^flip[u];
    }
    ll res=0;
    for (int i=0;i<60;i++)
        if (cs[i]) res+=(1ll<<i);
    return res;
}

详细

Subtask #1:

score: 5
Accepted

Test #1:

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

input:

1
4005

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1907 1519
2853 3103
1083 1857
2921 1198
3127 4176
3428 3513
3523 1404
1291 2283
3235 3785
3367 4733
1313 4421
243 1706
4020 3541
4857 4687
1803 3107
823 3283
1029 1...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1907 1519
2853 3103
1083 1857
2921 1198
3127 4176
3428 3513
3523 1404
1291 2283
3235 3785
3367 4733
1313 4421
243 1706
4020 3541
4857 4687
1803 3107
823 3283
1029 1...

output:

2
5000 3995
1 1532
5 1209
6 2822
7 425
7 2589
8 3047
8 3103
9 22
10 1405
10 1471
10 1956
10 2263
11 588
11 2345
11 3704
11 4052
11 4537
12 2022
12 4402
13 1449
14 1264
15 2209
16 3987
17 4221
17 4719
18 3858
19 121
19 811
19 4339
19 4997
20 1323
21 3296
21 3623
21 3970
22 2691
22 3073
23 431
24 2790...

input:

2
5000 3995
1 1532
5 1209
6 2822
7 425
7 2589
8 3047
8 3103
9 22
10 1405
10 1471
10 1956
10 2263
11 588
11 2345
11 3704
11 4052
11 4537
12 2022
12 4402
13 1449
14 1264
15 2209
16 3987
17 4221
17 4719
18 3858
19 121
19 811
19 4339
19 4997
20 1323
21 3296
21 3623
21 3970
22 2691
22 3073
23 431
24 2790...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4005

Test #2:

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

input:

1
459

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2022 4012
2285 3037
2222 4478
3017 4804
158 889
442 4996
4477 3003
3600 1882
416 2429
2185 1798
3897 3375
3171 760
3993 3136
1103 2305
4739 4552
1893 783
1143 2772
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2022 4012
2285 3037
2222 4478
3017 4804
158 889
442 4996
4477 3003
3600 1882
416 2429
2185 1798
3897 3375
3171 760
3993 3136
1103 2305
4739 4552
1893 783
1143 2772
...

output:

2
5000 3995
1 4322
2 449
2 4300
3 133
4 988
5 2742
6 2773
6 2890
6 3868
7 252
7 2341
8 749
9 3356
10 1906
10 2443
11 984
12 1691
12 2404
12 4794
13 728
13 2088
14 2772
15 2228
17 1018
17 1881
18 4551
19 1055
20 3119
20 3708
21 185
21 605
22 924
23 823
23 2281
24 878
25 3846
26 758
26 1007
26 2790
26...

input:

2
5000 3995
1 4322
2 449
2 4300
3 133
4 988
5 2742
6 2773
6 2890
6 3868
7 252
7 2341
8 749
9 3356
10 1906
10 2443
11 984
12 1691
12 2404
12 4794
13 728
13 2088
14 2772
15 2228
17 1018
17 1881
18 4551
19 1055
20 3119
20 3708
21 185
21 605
22 924
23 823
23 2281
24 878
25 3846
26 758
26 1007
26 2790
26...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
459

Test #3:

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

input:

1
2495

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
706 1790
2959 526
3401 2722
4339 4002
1424 412
1854 2612
3407 1262
1738 478
3990 4675
3398 2739
4993 3675
2602 808
2948 2886
158 889
399 3899
3006 4012
4725 4264
16...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
706 1790
2959 526
3401 2722
4339 4002
1424 412
1854 2612
3407 1262
1738 478
3990 4675
3398 2739
4993 3675
2602 808
2948 2886
158 889
399 3899
3006 4012
4725 4264
16...

output:

2
5000 3995
2 1806
3 1682
3 4083
5 765
5 1160
5 1973
5 4969
6 1290
7 777
7 4218
7 4858
8 2966
9 1581
10 1396
10 2829
10 4920
11 245
11 1439
11 2345
11 3073
11 3704
11 3950
11 4052
11 4313
11 4728
12 784
12 1765
12 4229
13 1679
14 4592
15 839
16 4553
17 1733
17 3053
17 3420
17 4221
18 1130
20 2026
21...

input:

2
5000 3995
2 1806
3 1682
3 4083
5 765
5 1160
5 1973
5 4969
6 1290
7 777
7 4218
7 4858
8 2966
9 1581
10 1396
10 2829
10 4920
11 245
11 1439
11 2345
11 3073
11 3704
11 3950
11 4052
11 4313
11 4728
12 784
12 1765
12 4229
13 1679
14 4592
15 839
16 4553
17 1733
17 3053
17 3420
17 4221
18 1130
20 2026
21...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
2495

Test #4:

score: 5
Accepted
time: 1ms = 1ms + 0ms
memory: 1908kb,1872kb

input:

3
1560

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
706 1344
2959 526
3401 4339
4339 4002
1424 960
1854 3558
3407 1262
1738 478
3990 1100
3398 2
4993 200
2602 4978
2948 2277
158 1723
399 4616
3006 1356
4725 3036
163 ...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
706 1344
2959 526
3401 4339
4339 4002
1424 960
1854 3558
3407 1262
1738 478
3990 1100
3398 2
4993 200
2602 4978
2948 2277
158 1723
399 4616
3006 1356
4725 3036
163 ...

output:

4
5000 2500
2 629
2 3398
4 988
6 90
7 4598
8 4167
12 2022
12 4794
13 728
13 943
15 1157
15 2192
16 863
16 1227
18 789
19 517
19 2057
22 3968
23 4420
24 4489
25 191
28 1004
28 3853
30 2196
33 838
33 4272
34 907
35 4435
36 1994
38 3358
39 2156
40 1537
42 4638
43 4532
44 3040
45 4092
47 2688
47 3109
48...

input:

4
5000 2500
2 629
2 3398
4 988
6 90
7 4598
8 4167
12 2022
12 4794
13 728
13 943
15 1157
15 2192
16 863
16 1227
18 789
19 517
19 2057
22 3968
23 4420
24 4489
25 191
28 1004
28 3853
30 2196
33 838
33 4272
34 907
35 4435
36 1994
38 3358
39 2156
40 1537
42 4638
43 4532
44 3040
45 4092
47 2688
47 3109
48...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1560

Test #5:

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

input:

3
3594

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
2823 1511
3654 4691
667 3464
3884 1128
3640 1331
2052 596
556 3487
485 2950
655 4193
4227 1306
3707 1579
20 1388
4627 4664
2829 565
749 2305
2115 4824
1769 4489
467...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
2823 1511
3654 4691
667 3464
3884 1128
3640 1331
2052 596
556 3487
485 2950
655 4193
4227 1306
3707 1579
20 1388
4627 4664
2829 565
749 2305
2115 4824
1769 4489
467...

output:

4
5000 2500
1 1802
2 1819
3 3958
4 260
5 4830
7 2341
9 3902
10 3391
12 95
12 2022
13 2701
13 2789
13 3013
14 1885
14 2424
16 2088
18 4700
18 4930
19 115
21 646
21 4531
23 3008
23 4789
24 3210
28 3853
31 1016
33 1885
33 4858
34 907
34 2067
35 2753
36 496
36 2175
37 664
37 3803
38 391
38 2184
39 2927
...

input:

4
5000 2500
1 1802
2 1819
3 3958
4 260
5 4830
7 2341
9 3902
10 3391
12 95
12 2022
13 2701
13 2789
13 3013
14 1885
14 2424
16 2088
18 4700
18 4930
19 115
21 646
21 4531
23 3008
23 4789
24 3210
28 3853
31 1016
33 1885
33 4858
34 907
34 2067
35 2753
36 496
36 2175
37 664
37 3803
38 391
38 2184
39 2927
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
3594

Test #6:

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

input:

3
1750

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
3220 2657
585 543
4826 2756
836 1109
810 4840
2953 1838
736 2961
4821 1393
4202 2070
2798 1833
3194 1538
3224 2686
1421 2158
518 4953
117 1083
2859 1701
2944 655
20...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
3220 2657
585 543
4826 2756
836 1109
810 4840
2953 1838
736 2961
4821 1393
4202 2070
2798 1833
3194 1538
3224 2686
1421 2158
518 4953
117 1083
2859 1701
2944 655
20...

output:

4
5000 2500
1 1532
2 2859
2 3079
4 3573
6 571
8 622
12 2022
13 1135
14 1264
15 4486
17 2927
17 3036
18 2577
19 3594
20 4429
21 1731
22 4247
24 2790
24 4790
24 4873
25 3131
28 2698
28 4271
34 907
34 2250
35 3344
37 4616
38 670
38 3774
39 4398
40 1808
43 925
44 2897
45 2437
45 4541
46 4319
47 4108
48 ...

input:

4
5000 2500
1 1532
2 2859
2 3079
4 3573
6 571
8 622
12 2022
13 1135
14 1264
15 4486
17 2927
17 3036
18 2577
19 3594
20 4429
21 1731
22 4247
24 2790
24 4790
24 4873
25 3131
28 2698
28 4271
34 907
34 2250
35 3344
37 4616
38 670
38 3774
39 4398
40 1808
43 925
44 2897
45 2437
45 4541
46 4319
47 4108
48 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1750

Test #7:

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

input:

5
4878

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
140 1128
2466 1799
1752 2722
2856 1435
554 4962
1428 1083
2236 4537
3762 657
3901 1082
1064 3985
1660 2859
4398 3250
2427 1235
3171 2723
2257 1051
1224 4819
2722 16...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
140 1128
2466 1799
1752 2722
2856 1435
554 4962
1428 1083
2236 4537
3762 657
3901 1082
1064 3985
1660 2859
4398 3250
2427 1235
3171 2723
2257 1051
1224 4819
2722 16...

output:

6
5000 2519
1 3530
2 3079
2 3358
2 4789
3 1029
5 3997
6 4269
7 3632
8 3047
10 1405
10 1409
10 1471
10 2606
11 984
11 2044
11 3283
11 4748
12 2128
14 1264
15 1267
17 2345
18 135
19 811
19 4997
20 4913
21 4347
22 4271
23 3929
24 4790
26 758
26 1472
26 3772
26 3847
26 4267
26 4728
27 2769
28 4271
29 38...

input:

6
5000 2519
1 3530
2 3079
2 3358
2 4789
3 1029
5 3997
6 4269
7 3632
8 3047
10 1405
10 1409
10 1471
10 2606
11 984
11 2044
11 3283
11 4748
12 2128
14 1264
15 1267
17 2345
18 135
19 811
19 4997
20 4913
21 4347
22 4271
23 3929
24 4790
26 758
26 1472
26 3772
26 3847
26 4267
26 4728
27 2769
28 4271
29 38...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4878

Test #8:

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

input:

5
1223

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
706 1344
2959 526
3401 3860
4339 4002
1424 739
1854 3558
3407 1262
1738 478
3990 2268
3398 2750
4993 3855
2602 2279
2948 1584
158 1940
399 4616
3006 4879
4725 2731
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
706 1344
2959 526
3401 3860
4339 4002
1424 739
1854 3558
3407 1262
1738 478
3990 2268
3398 2750
4993 3855
2602 2279
2948 1584
158 1940
399 4616
3006 4879
4725 2731
...

output:

6
5000 2513
1 4390
2 384
2 1729
2 4175
3 1588
5 1337
6 2773
6 3868
7 4765
9 531
10 32
10 712
10 730
10 996
10 1502
10 1987
11 3043
11 3808
11 4748
12 2022
13 728
14 2772
16 4897
17 3979
19 81
21 1519
23 2355
25 1631
26 3705
27 2769
28 761
28 2593
28 3047
29 3090
30 2746
31 979
33 2366
33 3159
33 339...

input:

6
5000 2513
1 4390
2 384
2 1729
2 4175
3 1588
5 1337
6 2773
6 3868
7 4765
9 531
10 32
10 712
10 730
10 996
10 1502
10 1987
11 3043
11 3808
11 4748
12 2022
13 728
14 2772
16 4897
17 3979
19 81
21 1519
23 2355
25 1631
26 3705
27 2769
28 761
28 2593
28 3047
29 3090
30 2746
31 979
33 2366
33 3159
33 339...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1223

Test #9:

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

input:

5
648

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
1907 3773
2853 2030
1083 1765
2921 27
3127 821
3428 3513
3523 1404
1291 2795
3235 3785
3367 1559
1313 4421
243 3150
4020 3541
4857 4687
1803 3107
823 2835
1029 2739...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
1907 3773
2853 2030
1083 1765
2921 27
3127 821
3428 3513
3523 1404
1291 2795
3235 3785
3367 1559
1313 4421
243 3150
4020 3541
4857 4687
1803 3107
823 2835
1029 2739...

output:

6
5000 2510
2 2859
3 4165
5 4830
6 4269
7 4602
9 3967
10 2443
11 4537
12 2022
13 2645
15 1298
17 2713
18 3670
19 2279
21 3578
22 166
23 4407
24 1167
25 191
26 3705
27 2769
28 4269
29 4509
32 194
32 2050
32 4548
32 4558
33 2366
34 933
35 1166
37 4616
38 3774
39 1915
40 2118
41 1109
44 4477
46 47
48 1...

input:

6
5000 2510
2 2859
3 4165
5 4830
6 4269
7 4602
9 3967
10 2443
11 4537
12 2022
13 2645
15 1298
17 2713
18 3670
19 2279
21 3578
22 166
23 4407
24 1167
25 191
26 3705
27 2769
28 4269
29 4509
32 194
32 2050
32 4548
32 4558
33 2366
34 933
35 1166
37 4616
38 3774
39 1915
40 2118
41 1109
44 4477
46 47
48 1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
648

Test #10:

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

input:

7
4475

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
942 2344
1559 4069
1051 4663
29 4509
3939 1017
456 627
1257 568
1876 2322
4042 569
1024 168
4462 1238
2068 3336
3297 251
3595 209
4666 3455
2642 3821
777 613
2792 2...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
942 2344
1559 4069
1051 4663
29 4509
3939 1017
456 627
1257 568
1876 2322
4042 569
1024 168
4462 1238
2068 3336
3297 251
3595 209
4666 3455
2642 3821
777 613
2792 2...

output:

8
5000 2500
1 4508
3 1682
3 2991
5 3650
5 4290
6 4241
7 1594
8 4856
9 3379
12 784
13 939
14 2424
15 277
15 687
18 1565
19 115
21 605
21 1872
22 897
22 1734
23 2773
23 3008
24 303
28 1004
29 3040
31 2221
33 952
33 4579
34 3832
35 874
36 167
37 3803
39 258
40 2004
42 2348
43 3225
47 4018
48 916
49 436...

input:

8
5000 2500
1 4508
3 1682
3 2991
5 3650
5 4290
6 4241
7 1594
8 4856
9 3379
12 784
13 939
14 2424
15 277
15 687
18 1565
19 115
21 605
21 1872
22 897
22 1734
23 2773
23 3008
24 303
28 1004
29 3040
31 2221
33 952
33 4579
34 3832
35 874
36 167
37 3803
39 258
40 2004
42 2348
43 3225
47 4018
48 916
49 436...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4475

Test #11:

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

input:

7
4240

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
727 29
1138 1713
620 2806
3949 4011
1486 2533
1478 1599
1557 2291
626 317
4072 3015
4276 3872
293 1399
887 2530
4430 3571
3872 599
4741 569
3833 710
3653 402
1166 7...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
727 29
1138 1713
620 2806
3949 4011
1486 2533
1478 1599
1557 2291
626 317
4072 3015
4276 3872
293 1399
887 2530
4430 3571
3872 599
4741 569
3833 710
3653 402
1166 7...

output:

8
5000 2500
1 1624
3 1827
4 2849
6 273
6 4059
6 4538
7 4602
8 4428
9 3967
10 239
13 1725
13 3525
14 2925
15 839
16 2597
17 3464
18 2804
21 3022
22 4241
23 4407
24 1167
25 4945
28 3112
29 4670
30 3119
31 2543
32 2546
32 4013
33 2366
33 2848
34 907
34 1245
37 3009
38 1292
39 3386
40 2118
42 4638
43 38...

input:

8
5000 2500
1 1624
3 1827
4 2849
6 273
6 4059
6 4538
7 4602
8 4428
9 3967
10 239
13 1725
13 3525
14 2925
15 839
16 2597
17 3464
18 2804
21 3022
22 4241
23 4407
24 1167
25 4945
28 3112
29 4670
30 3119
31 2543
32 2546
32 4013
33 2366
33 2848
34 907
34 1245
37 3009
38 1292
39 3386
40 2118
42 4638
43 38...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4240

Test #12:

score: 5
Accepted
time: 1ms = 1ms + 0ms
memory: 1908kb,1872kb

input:

7
1291

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
2823 3529
3654 4691
667 3464
3884 4814
3640 4390
2052 3312
556 881
485 4331
655 4029
4227 1306
3707 4968
20 377
4627 2243
2829 2348
749 2305
2115 1422
1769 1534
467...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
2823 3529
3654 4691
667 3464
3884 4814
3640 4390
2052 3312
556 881
485 4331
655 4029
4227 1306
3707 4968
20 377
4627 2243
2829 2348
749 2305
2115 1422
1769 1534
467...

output:

8
5000 2500
1 271
2 591
2 2859
3 4732
4 2699
5 1319
5 3650
5 4574
7 2341
8 2561
9 3379
10 825
10 1906
11 761
11 2044
12 1365
13 3013
14 1040
15 1157
17 2927
19 115
20 377
21 4472
21 4531
22 2023
22 4734
23 5000
24 125
25 3846
27 4950
30 419
31 2359
32 395
33 3159
34 1126
34 3759
35 4936
36 167
38 39...

input:

8
5000 2500
1 271
2 591
2 2859
3 4732
4 2699
5 1319
5 3650
5 4574
7 2341
8 2561
9 3379
10 825
10 1906
11 761
11 2044
12 1365
13 3013
14 1040
15 1157
17 2927
19 115
20 377
21 4472
21 4531
22 2023
22 4734
23 5000
24 125
25 3846
27 4950
30 419
31 2359
32 395
33 3159
34 1126
34 3759
35 4936
36 167
38 39...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1291

Subtask #2:

score: 30
Accepted

Test #13:

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

input:

1
17476204

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2113 3215
3776 4448
2246 164
2387 164
3363 2382
3051 3523
816 2514
450 1330
3916 2404
2006 1867
298 3901
2469 1780
153 21
228 1130
3160 1740
2626 2177
2000 1988
335...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2113 3215
3776 4448
2246 164
2387 164
3363 2382
3051 3523
816 2514
450 1330
3916 2404
2006 1867
298 3901
2469 1780
153 21
228 1130
3160 1740
2626 2177
2000 1988
335...

output:

2
5000 3995
1 1998
3 114
3 4267
4 3054
4 4623
6 273
6 4538
8 1510
10 511
10 3979
10 4862
11 164
11 712
11 2067
11 2092
11 3073
12 1114
12 2022
12 4649
13 2108
14 3571
15 1873
15 4863
16 3106
17 36
17 1063
17 3283
18 494
19 172
19 212
19 1741
20 4563
21 153
21 646
21 1289
21 2582
21 3674
22 3672
22 4...

input:

2
5000 3995
1 1998
3 114
3 4267
4 3054
4 4623
6 273
6 4538
8 1510
10 511
10 3979
10 4862
11 164
11 712
11 2067
11 2092
11 3073
12 1114
12 2022
12 4649
13 2108
14 3571
15 1873
15 4863
16 3106
17 36
17 1063
17 3283
18 494
19 172
19 212
19 1741
20 4563
21 153
21 646
21 1289
21 2582
21 3674
22 3672
22 4...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
17476204

Test #14:

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

input:

1
11926600

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1004 3218
2517 4925
3026 3591
446 2485
3733 2961
1846 3823
1003 2812
3479 2921
2159 1175
4753 2078
3657 939
4889 3537
951 772
3047 612
2646 1036
4971 2712
4417 3275...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1004 3218
2517 4925
3026 3591
446 2485
3733 2961
1846 3823
1003 2812
3479 2921
2159 1175
4753 2078
3657 939
4889 3537
951 772
3047 612
2646 1036
4971 2712
4417 3275...

output:

2
5000 3995
2 3401
2 4956
3 3328
3 3711
4 3718
5 1505
5 2296
5 3379
5 4152
6 1274
6 1290
6 2073
7 4789
8 2495
9 1751
10 157
10 294
10 2049
11 761
11 4450
11 4874
12 2675
12 4270
13 1859
14 458
15 1043
16 3513
17 145
17 272
17 1733
17 4090
18 4772
19 4604
21 2162
21 3112
21 4252
22 1224
22 2241
23 30...

input:

2
5000 3995
2 3401
2 4956
3 3328
3 3711
4 3718
5 1505
5 2296
5 3379
5 4152
6 1274
6 1290
6 2073
7 4789
8 2495
9 1751
10 157
10 294
10 2049
11 761
11 4450
11 4874
12 2675
12 4270
13 1859
14 458
15 1043
16 3513
17 145
17 272
17 1733
17 4090
18 4772
19 4604
21 2162
21 3112
21 4252
22 1224
22 2241
23 30...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
11926600

Test #15:

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

input:

1
16602378

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2151 172
1848 2316
1150 165
2044 3769
1639 1574
3932 2606
1960 679
2142 4113
2068 1789
2998 3353
2958 274
3096 3630
1185 4714
1613 2178
4103 3956
1344 3196
845 4344...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2151 172
1848 2316
1150 165
2044 3769
1639 1574
3932 2606
1960 679
2142 4113
2068 1789
2998 3353
2958 274
3096 3630
1185 4714
1613 2178
4103 3956
1344 3196
845 4344...

output:

2
5000 3995
2 216
2 591
2 2116
3 4962
5 4582
6 2991
7 4358
9 1544
9 4445
10 62
10 712
10 1903
10 2606
11 2279
11 4021
11 4733
12 922
12 1365
12 4870
14 1518
14 2925
15 3234
16 2260
17 2419
17 3169
18 1799
19 2042
19 2582
20 348
22 773
22 924
22 4608
23 148
25 843
25 1998
26 3529
27 1943
27 2111
27 2...

input:

2
5000 3995
2 216
2 591
2 2116
3 4962
5 4582
6 2991
7 4358
9 1544
9 4445
10 62
10 712
10 1903
10 2606
11 2279
11 4021
11 4733
12 922
12 1365
12 4870
14 1518
14 2925
15 3234
16 2260
17 2419
17 3169
18 1799
19 2042
19 2582
20 348
22 773
22 924
22 4608
23 148
25 843
25 1998
26 3529
27 1943
27 2111
27 2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
16602378

Test #16:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 1908kb,1872kb

input:

3
13129243

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1350 3890
2335 81
2263 4470
19 1536
3201 956
3923 3860
1470 3145
4089 157
4442 2355
3117 1314
4282 3745
1965 4039
4936 1243
2258 4608
583 4198
834 3884
1537 1131
49...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1350 3890
2335 81
2263 4470
19 1536
3201 956
3923 3860
1470 3145
4089 157
4442 2355
3117 1314
4282 3745
1965 4039
4936 1243
2258 4608
583 4198
834 3884
1537 1131
49...

output:

4
5000 2500
1 1664
7 2249
7 4689
8 4202
9 3379
10 929
10 2901
12 4633
13 1859
14 2333
15 600
18 1207
19 589
19 1025
19 1536
20 1436
20 3124
21 3425
21 4022
22 2241
23 4279
24 3410
25 1189
28 1305
29 2856
30 4342
31 2425
34 1072
34 1183
34 2188
35 3730
36 1715
38 1213
38 2581
40 3434
42 4745
43 4174
...

input:

4
5000 2500
1 1664
7 2249
7 4689
8 4202
9 3379
10 929
10 2901
12 4633
13 1859
14 2333
15 600
18 1207
19 589
19 1025
19 1536
20 1436
20 3124
21 3425
21 4022
22 2241
23 4279
24 3410
25 1189
28 1305
29 2856
30 4342
31 2425
34 1072
34 1183
34 2188
35 3730
36 1715
38 1213
38 2581
40 3434
42 4745
43 4174
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
13129243

Test #17:

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

input:

3
7892141

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
3563 4670
2747 2983
4526 4807
4555 2784
1200 2606
4641 3521
613 2202
2708 646
1001 3234
964 2573
4357 3169
3317 3020
3458 1596
1545 3390
3346 4235
104 4454
3296 352...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
3563 4670
2747 2983
4526 4807
4555 2784
1200 2606
4641 3521
613 2202
2708 646
1001 3234
964 2573
4357 3169
3317 3020
3458 1596
1545 3390
3346 4235
104 4454
3296 352...

output:

4
5000 2500
1 2871
2 3079
3 4165
3 4929
6 676
6 2697
7 504
8 15
8 4756
9 3689
10 3369
12 2022
13 1680
14 4592
15 3346
16 2597
16 3679
17 3036
17 4719
18 2284
20 4429
21 284
21 3411
21 4441
24 1579
28 1581
28 4271
29 907
32 4211
34 1426
34 1696
35 3610
36 3639
37 1496
37 2659
38 1186
38 2207
39 4839
...

input:

4
5000 2500
1 2871
2 3079
3 4165
3 4929
6 676
6 2697
7 504
8 15
8 4756
9 3689
10 3369
12 2022
13 1680
14 4592
15 3346
16 2597
16 3679
17 3036
17 4719
18 2284
20 4429
21 284
21 3411
21 4441
24 1579
28 1581
28 4271
29 907
32 4211
34 1426
34 1696
35 3610
36 3639
37 1496
37 2659
38 1186
38 2207
39 4839
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
7892141

Test #18:

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

input:

3
21314775

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
2209 2177
3028 1664
4829 4110
2666 2277
2967 3581
1658 1937
2864 286
2315 3850
3191 4645
2546 4659
492 3473
3564 3327
4819 4554
4520 2937
1748 2937
508 4603
1366 22...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
2209 2177
3028 1664
4829 4110
2666 2277
2967 3581
1658 1937
2864 286
2315 3850
3191 4645
2546 4659
492 3473
3564 3327
4819 4554
4520 2937
1748 2937
508 4603
1366 22...

output:

4
5000 2500
1 2193
3 1843
4 1624
5 1155
6 273
7 3458
8 622
8 3701
9 256
10 4454
11 2449
12 2022
14 2895
14 3241
15 2093
18 3605
19 121
19 4130
20 2679
21 1269
22 57
22 2691
23 767
24 1113
25 2923
28 3217
28 4271
30 3638
31 1521
32 484
32 2502
32 4802
35 2247
37 2816
37 4468
40 4092
42 69
42 2301
43 ...

input:

4
5000 2500
1 2193
3 1843
4 1624
5 1155
6 273
7 3458
8 622
8 3701
9 256
10 4454
11 2449
12 2022
14 2895
14 3241
15 2093
18 3605
19 121
19 4130
20 2679
21 1269
22 57
22 2691
23 767
24 1113
25 2923
28 3217
28 4271
30 3638
31 1521
32 484
32 2502
32 4802
35 2247
37 2816
37 4468
40 4092
42 69
42 2301
43 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
21314775

Test #19:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 1908kb,1868kb

input:

5
5559540

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
4801 1348
4823 2713
1784 1151
2561 1199
492 3473
4713 4830
315 1038
2308 1551
1110 4976
2247 4893
2520 4084
2771 1856
552 1492
958 4263
2646 599
90 224
761 3895
184...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
4801 1348
4823 2713
1784 1151
2561 1199
492 3473
4713 4830
315 1038
2308 1551
1110 4976
2247 4893
2520 4084
2771 1856
552 1492
958 4263
2646 599
90 224
761 3895
184...

output:

6
5000 2504
2 4753
3 698
5 2305
6 676
7 2121
8 2588
9 2127
10 4002
11 2937
12 4265
14 2925
18 1673
19 4839
20 3970
21 1139
22 4786
25 4945
26 4016
27 1419
28 3382
29 2076
32 717
33 4860
34 907
35 2611
37 2657
38 3870
39 3578
40 3998
41 224
43 2268
46 1536
47 179
51 3586
52 3529
53 2031
54 3628
56 47...

input:

6
5000 2504
2 4753
3 698
5 2305
6 676
7 2121
8 2588
9 2127
10 4002
11 2937
12 4265
14 2925
18 1673
19 4839
20 3970
21 1139
22 4786
25 4945
26 4016
27 1419
28 3382
29 2076
32 717
33 4860
34 907
35 2611
37 2657
38 3870
39 3578
40 3998
41 224
43 2268
46 1536
47 179
51 3586
52 3529
53 2031
54 3628
56 47...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
5559540

Test #20:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 1916kb,1868kb

input:

5
9424319

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
2067 4269
3254 3435
4367 4221
3420 291
154 3247
1414 837
3659 1702
2309 161
4975 3712
2130 4751
3669 4193
3792 4467
1640 3855
1638 4738
500 249
1510 1484
3132 2204
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
2067 4269
3254 3435
4367 4221
3420 291
154 3247
1414 837
3659 1702
2309 161
4975 3712
2130 4751
3669 4193
3792 4467
1640 3855
1638 4738
500 249
1510 1484
3132 2204
...

output:

6
5000 2532
1 4544
2 3532
3 4092
4 3054
5 765
7 252
7 2624
8 474
9 1715
10 4524
11 164
11 334
11 1465
11 4313
11 4563
12 1114
12 1161
12 2022
13 4421
14 4592
16 669
17 3053
17 3713
18 2302
19 81
21 4475
22 4306
23 2737
25 3131
25 4945
26 4016
27 1419
28 1458
29 2354
31 2626
32 3135
33 717
35 466
36 ...

input:

6
5000 2532
1 4544
2 3532
3 4092
4 3054
5 765
7 252
7 2624
8 474
9 1715
10 4524
11 164
11 334
11 1465
11 4313
11 4563
12 1114
12 1161
12 2022
13 4421
14 4592
16 669
17 3053
17 3713
18 2302
19 81
21 4475
22 4306
23 2737
25 3131
25 4945
26 4016
27 1419
28 1458
29 2354
31 2626
32 3135
33 717
35 466
36 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
9424319

Test #21:

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

input:

5
10955780

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
2209 4582
3028 283
4829 4110
2666 3051
2967 3581
1658 2749
2864 286
2315 3036
3191 1387
2546 4702
492 3473
3564 699
4819 17
4520 2937
1748 2937
508 4893
1366 3740
2...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
2209 4582
3028 283
4829 4110
2666 3051
2967 3581
1658 2749
2864 286
2315 3036
3191 1387
2546 4702
492 3473
3564 699
4819 17
4520 2937
1748 2937
508 4893
1366 3740
2...

output:

6
5000 2509
1 2214
3 1633
3 4544
5 3301
6 273
7 252
7 4358
8 3883
9 2751
10 2263
11 334
11 1377
11 2086
11 2345
11 4563
12 2022
12 4949
13 1725
14 4592
15 3965
17 1009
19 87
19 115
19 1741
21 3390
22 39
23 4259
25 3131
25 4042
26 4016
27 1451
27 2748
27 3860
27 4616
29 1988
32 1776
32 2502
33 717
34...

input:

6
5000 2509
1 2214
3 1633
3 4544
5 3301
6 273
7 252
7 4358
8 3883
9 2751
10 2263
11 334
11 1377
11 2086
11 2345
11 4563
12 2022
12 4949
13 1725
14 4592
15 3965
17 1009
19 87
19 115
19 1741
21 3390
22 39
23 4259
25 3131
25 4042
26 4016
27 1451
27 2748
27 3860
27 4616
29 1988
32 1776
32 2502
33 717
34...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
10955780

Test #22:

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

input:

7
19938721

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
3949 4376
232 426
1449 2590
3939 1280
2225 4185
1231 2470
3872 3378
4531 4544
118 4229
3365 1612
3621 4082
3393 3479
1921 2318
2722 251
1268 821
1827 1388
1744 258
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
3949 4376
232 426
1449 2590
3939 1280
2225 4185
1231 2470
3872 3378
4531 4544
118 4229
3365 1612
3621 4082
3393 3479
1921 2318
2722 251
1268 821
1827 1388
1744 258
...

output:

8
5000 2500
1 3999
2 3835
3 787
4 1205
5 3773
6 273
7 2645
8 3252
8 4756
9 4327
9 4445
9 4928
10 730
11 889
13 2645
14 1462
15 839
16 1883
17 4719
18 183
18 1673
19 4997
20 3970
22 819
23 991
24 1184
25 1631
28 4269
29 907
30 3295
31 252
33 2848
35 344
36 4197
37 890
37 2793
38 1292
39 4574
40 2118
...

input:

8
5000 2500
1 3999
2 3835
3 787
4 1205
5 3773
6 273
7 2645
8 3252
8 4756
9 4327
9 4445
9 4928
10 730
11 889
13 2645
14 1462
15 839
16 1883
17 4719
18 183
18 1673
19 4997
20 3970
22 819
23 991
24 1184
25 1631
28 4269
29 907
30 3295
31 252
33 2848
35 344
36 4197
37 890
37 2793
38 1292
39 4574
40 2118
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
19938721

Test #23:

score: 30
Accepted
time: 1ms = 1ms + 0ms
memory: 1908kb,1868kb

input:

7
5129508

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
1576 1673
4034 3719
1356 1697
1232 979
2811 2814
492 629
3880 2994
1277 4704
77 4994
3532 3713
2130 1062
2096 1226
3147 4787
1699 3065
727 3855
3339 1881
4413 4863
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
1576 1673
4034 3719
1356 1697
1232 979
2811 2814
492 629
3880 2994
1277 4704
77 4994
3532 3713
2130 1062
2096 1226
3147 4787
1699 3065
727 3855
3339 1881
4413 4863
...

output:

8
5000 2500
2 4438
4 1678
5 3352
6 3981
6 4269
7 252
9 893
10 3629
13 105
13 2285
13 4560
14 2424
15 3965
16 3258
18 2457
19 2185
19 2885
20 1315
21 4531
22 4356
22 4916
23 1810
24 4885
25 1936
29 1284
30 4719
31 1016
36 3348
37 209
38 2184
38 4357
39 1787
40 1218
41 1544
42 2242
42 4898
43 4156
44 ...

input:

8
5000 2500
2 4438
4 1678
5 3352
6 3981
6 4269
7 252
9 893
10 3629
13 105
13 2285
13 4560
14 2424
15 3965
16 3258
18 2457
19 2185
19 2885
20 1315
21 4531
22 4356
22 4916
23 1810
24 4885
25 1936
29 1284
30 4719
31 1016
36 3348
37 209
38 2184
38 4357
39 1787
40 1218
41 1544
42 2242
42 4898
43 4156
44 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
5129508

Test #24:

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

input:

7
15332941

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
1327 1602
2147 1714
944 1053
3767 4380
2649 2126
2639 4786
1930 2676
972 3360
722 3300
1708 1207
4628 2845
2714 1739
2960 651
114 2357
4747 1920
3705 82
632 1596
17...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
1327 1602
2147 1714
944 1053
3767 4380
2649 2126
2639 4786
1930 2676
972 3360
722 3300
1708 1207
4628 2845
2714 1739
2960 651
114 2357
4747 1920
3705 82
632 1596
17...

output:

8
5000 2500
1 4316
4 1205
5 4428
5 4771
6 273
8 3127
9 928
11 245
12 1161
12 4025
12 4085
13 2082
14 2925
15 1796
16 1883
18 3433
19 121
19 609
20 4429
21 4347
22 3188
22 3698
22 4185
23 2980
25 4042
26 1145
26 1948
28 4271
28 4278
29 727
29 3813
30 3773
31 1318
32 3146
34 1696
35 4608
36 3639
36 40...

input:

8
5000 2500
1 4316
4 1205
5 4428
5 4771
6 273
8 3127
9 928
11 245
12 1161
12 4025
12 4085
13 2082
14 2925
15 1796
16 1883
18 3433
19 121
19 609
20 4429
21 4347
22 3188
22 3698
22 4185
23 2980
25 4042
26 1145
26 1948
28 4271
28 4278
29 727
29 3813
30 3773
31 1318
32 3146
34 1696
35 4608
36 3639
36 40...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
15332941

Subtask #3:

score: 65
Accepted

Test #25:

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

input:

1
355365355024496523

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2150 1127
3142 4495
2405 2051
820 2345
3911 3494
1495 3422
945 2742
3500 4874
1207 1763
4050 836
318 4178
956 2144
4439 725
1909 1778
2963 2144
4122 839
1109 3513
1...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2150 1127
3142 4495
2405 2051
820 2345
3911 3494
1495 3422
945 2742
3500 4874
1207 1763
4050 836
318 4178
956 2144
4439 725
1909 1778
2963 2144
4122 839
1109 3513
1...

output:

2
5000 4202
1 2933
3 92
4 1262
4 1287
4 2293
5 226
5 2270
6 1290
6 3472
6 3885
7 4441
8 4428
9 2389
9 2751
10 214
10 294
10 4736
11 245
11 4573
12 4751
13 4716
14 2530
15 3492
16 2070
17 4454
18 2559
19 2018
19 2922
19 2943
20 1511
21 4683
22 1224
22 4478
24 3121
25 3846
26 3974
26 4016
27 557
27 33...

input:

2
5000 4202
1 2933
3 92
4 1262
4 1287
4 2293
5 226
5 2270
6 1290
6 3472
6 3885
7 4441
8 4428
9 2389
9 2751
10 214
10 294
10 4736
11 245
11 4573
12 4751
13 4716
14 2530
15 3492
16 2070
17 4454
18 2559
19 2018
19 2922
19 2943
20 1511
21 4683
22 1224
22 4478
24 3121
25 3846
26 3974
26 4016
27 557
27 33...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
355365355024496523

Test #26:

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

input:

1
727827999106414164

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1687 1450
853 2279
2390 2823
2611 3399
2661 2607
4985 2076
2145 3182
612 619
4082 1215
3397 1149
4223 1712
170 2782
1709 4462
3389 4182
3274 1484
3719 4162
1440 222...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
1687 1450
853 2279
2390 2823
2611 3399
2661 2607
4985 2076
2145 3182
612 619
4082 1215
3397 1149
4223 1712
170 2782
1709 4462
3389 4182
3274 1484
3719 4162
1440 222...

output:

2
5000 4202
1 2138
2 435
2 3932
3 88
4 2501
5 1319
5 1680
6 4020
7 4965
8 3601
9 4075
10 26
10 2060
10 2880
10 3091
11 254
11 2475
11 4409
11 4484
12 167
12 2404
13 3752
14 1521
14 1885
14 4188
15 3815
16 3221
16 4215
17 1009
17 1179
17 1938
17 3285
18 4346
19 2834
19 2885
19 3330
20 1733
21 92
21 4...

input:

2
5000 4202
1 2138
2 435
2 3932
3 88
4 2501
5 1319
5 1680
6 4020
7 4965
8 3601
9 4075
10 26
10 2060
10 2880
10 3091
11 254
11 2475
11 4409
11 4484
12 167
12 2404
13 3752
14 1521
14 1885
14 4188
15 3815
16 3221
16 4215
17 1009
17 1179
17 1938
17 3285
18 4346
19 2834
19 2885
19 3330
20 1733
21 92
21 4...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
727827999106414164

Test #27:

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

input:

1
656410143989222955

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
3581 2379
3964 201
485 235
3491 4271
777 2121
1465 3507
4967 2937
4588 1943
4226 1891
441 507
1846 4243
1872 881
148 1348
4421 4135
2591 3455
4270 4714
1464 3648
30...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
3581 2379
3964 201
485 235
3491 4271
777 2121
1465 3507
4967 2937
4588 1943
4226 1891
441 507
1846 4243
1872 881
148 1348
4421 4135
2591 3455
4270 4714
1464 3648
30...

output:

2
5000 4202
1 127
2 1851
2 3747
3 1304
3 1633
3 2445
3 2822
4 1287
4 3054
5 3404
6 145
6 2752
6 4282
7 2716
8 663
9 1998
9 3967
10 699
10 1893
10 2243
10 2263
10 3739
11 1134
11 3513
12 3195
12 4253
13 46
14 3474
14 4202
16 2062
16 2070
16 2824
17 3753
17 3783
17 4638
18 2523
19 798
19 1132
19 1502
...

input:

2
5000 4202
1 127
2 1851
2 3747
3 1304
3 1633
3 2445
3 2822
4 1287
4 3054
5 3404
6 145
6 2752
6 4282
7 2716
8 663
9 1998
9 3967
10 699
10 1893
10 2243
10 2263
10 3739
11 1134
11 3513
12 3195
12 4253
13 46
14 3474
14 4202
16 2062
16 2070
16 2824
17 3753
17 3783
17 4638
18 2523
19 798
19 1132
19 1502
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
656410143989222955

Test #28:

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

input:

1
410366615149657534

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2927 642
4724 8
1520 245
873 3631
2920 2749
3433 4891
2719 2997
3654 4065
4270 3747
1289 4517
2834 1636
3729 339
954 4666
2007 2961
3937 2382
3070 78
1374 2937
4771...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2927 642
4724 8
1520 245
873 3631
2920 2749
3433 4891
2719 2997
3654 4065
4270 3747
1289 4517
2834 1636
3729 339
954 4666
2007 2961
3937 2382
3070 78
1374 2937
4771...

output:

2
5000 4202
1 249
2 2160
2 3564
3 1020
4 370
4 990
6 1618
6 3885
7 2188
8 1780
8 3817
8 4724
9 3954
10 2243
10 3535
10 3739
11 1247
11 2139
11 4563
11 4802
12 3360
12 3462
13 939
14 1521
14 3878
15 695
15 2514
16 2738
16 3673
17 897
17 3366
17 3425
17 4083
17 4569
19 131
20 2720
20 3589
20 4879
21 3...

input:

2
5000 4202
1 249
2 2160
2 3564
3 1020
4 370
4 990
6 1618
6 3885
7 2188
8 1780
8 3817
8 4724
9 3954
10 2243
10 3535
10 3739
11 1247
11 2139
11 4563
11 4802
12 3360
12 3462
13 939
14 1521
14 3878
15 695
15 2514
16 2738
16 3673
17 897
17 3366
17 3425
17 4083
17 4569
19 131
20 2720
20 3589
20 4879
21 3...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
410366615149657534

Test #29:

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

input:

1
298090682780948428

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2927 3003
4724 4970
1520 1489
873 22
2920 2527
3433 1178
2719 4654
3654 3448
4270 755
1289 4151
2834 782
3729 606
954 1916
2007 1380
3937 1994
3070 4830
1374 3541
4...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2927 3003
4724 4970
1520 1489
873 22
2920 2527
3433 1178
2719 4654
3654 3448
4270 755
1289 4151
2834 782
3729 606
954 1916
2007 1380
3937 1994
3070 4830
1374 3541
4...

output:

2
5000 4202
1 156
2 188
3 1524
3 4422
4 3796
6 208
6 1078
6 1132
7 2144
8 1102
9 546
10 1280
10 1906
10 3991
10 4029
11 1095
11 1793
11 2468
11 2475
11 3661
11 3860
12 3095
12 4552
13 1994
14 4819
15 2615
15 3605
16 3973
17 1151
17 2496
19 2057
19 2739
19 2959
19 3592
20 2051
20 2994
21 1179
22 873
...

input:

2
5000 4202
1 156
2 188
3 1524
3 4422
4 3796
6 208
6 1078
6 1132
7 2144
8 1102
9 546
10 1280
10 1906
10 3991
10 4029
11 1095
11 1793
11 2468
11 2475
11 3661
11 3860
12 3095
12 4552
13 1994
14 4819
15 2615
15 3605
16 3973
17 1151
17 2496
19 2057
19 2739
19 2959
19 3592
20 2051
20 2994
21 1179
22 873
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
298090682780948428

Test #30:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 1908kb,1868kb

input:

3
969441916331132577

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1544 4021
2315 3157
2678 3976
1111 1458
3818 4847
2347 3636
132 3027
3968 2049
3848 927
4516 1778
2699 4025
3628 2743
1293 482
1184 2970
2835 4328
2903 4565
3408 21...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1544 4021
2315 3157
2678 3976
1111 1458
3818 4847
2347 3636
132 3027
3968 2049
3848 927
4516 1778
2699 4025
3628 2743
1293 482
1184 2970
2835 4328
2903 4565
3408 21...

output:

4
5000 2500
1 61
3 2429
5 1188
5 4833
9 4126
9 4430
12 944
16 1710
16 2546
18 3199
18 4559
19 947
19 4836
20 2744
21 1870
23 1844
23 1896
24 1594
24 2334
24 4093
25 1758
29 727
30 4275
31 1621
32 106
32 2502
35 2524
36 131
36 592
37 678
38 2242
39 567
40 4366
42 966
44 986
45 1489
46 1130
46 3494
46...

input:

4
5000 2500
1 61
3 2429
5 1188
5 4833
9 4126
9 4430
12 944
16 1710
16 2546
18 3199
18 4559
19 947
19 4836
20 2744
21 1870
23 1844
23 1896
24 1594
24 2334
24 4093
25 1758
29 727
30 4275
31 1621
32 106
32 2502
35 2524
36 131
36 592
37 678
38 2242
39 567
40 4366
42 966
44 986
45 1489
46 1130
46 3494
46...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
969441916331132577

Test #31:

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

input:

3
929489812741933634

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
4548 918
2437 317
3067 3793
3259 4671
1961 3257
3636 2743
1986 3551
702 1829
4114 4545
1044 2354
3842 1887
2214 2517
1219 2183
829 4982
2279 3422
3219 33
2587 1252
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
4548 918
2437 317
3067 3793
3259 4671
1961 3257
3636 2743
1986 3551
702 1829
4114 4545
1044 2354
3842 1887
2214 2517
1219 2183
829 4982
2279 3422
3219 33
2587 1252
...

output:

4
5000 2500
1 4281
2 4226
3 465
5 1930
8 3198
9 948
9 3096
12 1872
12 2882
12 4583
13 2857
13 4186
14 3290
15 1341
16 957
18 638
20 3295
21 2479
21 3316
22 2371
22 3675
25 4233
27 1009
30 1867
31 133
35 3903
36 2466
42 1647
43 986
44 3035
46 3165
47 643
48 2393
48 2600
50 3383
51 1784
51 4867
53 880...

input:

4
5000 2500
1 4281
2 4226
3 465
5 1930
8 3198
9 948
9 3096
12 1872
12 2882
12 4583
13 2857
13 4186
14 3290
15 1341
16 957
18 638
20 3295
21 2479
21 3316
22 2371
22 3675
25 4233
27 1009
30 1867
31 133
35 3903
36 2466
42 1647
43 986
44 3035
46 3165
47 643
48 2393
48 2600
50 3383
51 1784
51 4867
53 880...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
929489812741933634

Test #32:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 1908kb,1872kb

input:

3
144032041325838295

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1565 1675
1531 4851
4840 2311
1979 4070
3225 606
4497 645
271 138
2010 1511
4402 3015
169 4264
3722 4831
1244 1596
1261 2685
3657 3659
4936 2611
3211 4960
913 1591
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1565 1675
1531 4851
4840 2311
1979 4070
3225 606
4497 645
271 138
2010 1511
4402 3015
169 4264
3722 4831
1244 1596
1261 2685
3657 3659
4936 2611
3211 4960
913 1591
...

output:

4
5000 2500
1 181
1 4136
4 2699
5 708
6 3210
6 4069
7 3622
9 4695
11 2709
12 2765
13 794
16 2175
16 4803
22 2980
23 4323
24 1984
25 3114
27 2983
28 2884
28 2970
30 4750
31 4646
32 2608
32 3209
34 1159
35 2760
36 2416
36 3590
38 4411
39 531
40 1989
40 3315
41 924
41 1079
42 1878
43 3361
44 1130
45 46...

input:

4
5000 2500
1 181
1 4136
4 2699
5 708
6 3210
6 4069
7 3622
9 4695
11 2709
12 2765
13 794
16 2175
16 4803
22 2980
23 4323
24 1984
25 3114
27 2983
28 2884
28 2970
30 4750
31 4646
32 2608
32 3209
34 1159
35 2760
36 2416
36 3590
38 4411
39 531
40 1989
40 3315
41 924
41 1079
42 1878
43 3361
44 1130
45 46...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
144032041325838295

Test #33:

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

input:

3
832110946250826180

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
2041 3037
932 2045
4515 4245
2778 4825
1168 4715
1042 2871
1832 307
110 1898
2152 4965
2608 3529
1134 2193
3931 2914
1404 2874
4438 2950
248 27
772 1667
2414 3444
1...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
2041 3037
932 2045
4515 4245
2778 4825
1168 4715
1042 2871
1832 307
110 1898
2152 4965
2608 3529
1134 2193
3931 2914
1404 2874
4438 2950
248 27
772 1667
2414 3444
1...

output:

4
5000 2500
3 919
4 3445
6 1094
6 3127
6 4300
7 4441
8 3198
9 4173
10 1990
11 160
11 3052
13 456
13 2857
16 4066
17 2178
19 3592
19 4925
20 1278
21 1523
21 4996
23 664
24 2790
24 4453
25 536
28 401
28 4269
29 4103
29 4382
31 728
32 2083
32 3798
34 2067
34 4699
35 4828
35 4865
36 2469
36 4197
37 1922...

input:

4
5000 2500
3 919
4 3445
6 1094
6 3127
6 4300
7 4441
8 3198
9 4173
10 1990
11 160
11 3052
13 456
13 2857
16 4066
17 2178
19 3592
19 4925
20 1278
21 1523
21 4996
23 664
24 2790
24 4453
25 536
28 401
28 4269
29 4103
29 4382
31 728
32 2083
32 3798
34 2067
34 4699
35 4828
35 4865
36 2469
36 4197
37 1922...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
832110946250826180

Test #34:

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

input:

3
85728715707691821

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1907 4493
2853 4556
1083 3766
2921 1225
3127 821
3428 2835
3523 1404
1291 2795
3235 303
3367 4733
1313 1640
243 2322
4020 266
4857 2907
1803 612
823 2890
1029 2271
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1907 4493
2853 4556
1083 3766
2921 1225
3127 821
3428 2835
3523 1404
1291 2795
3235 303
3367 4733
1313 1640
243 2322
4020 266
4857 2907
1803 612
823 2890
1029 2271
...

output:

4
5000 2500
1 2480
2 4220
3 977
4 2849
5 2184
7 1178
9 4385
10 4862
11 17
11 1432
12 3312
13 1680
15 4476
16 3889
17 2080
17 2375
18 3184
19 3614
21 4658
23 2817
25 1631
25 2249
28 3022
31 1684
34 1163
35 362
36 4080
37 1131
37 3745
38 3070
39 4147
40 176
40 2075
40 3721
41 401
42 1117
42 3711
45 36...

input:

4
5000 2500
1 2480
2 4220
3 977
4 2849
5 2184
7 1178
9 4385
10 4862
11 17
11 1432
12 3312
13 1680
15 4476
16 3889
17 2080
17 2375
18 3184
19 3614
21 4658
23 2817
25 1631
25 2249
28 3022
31 1684
34 1163
35 362
36 4080
37 1131
37 3745
38 3070
39 4147
40 176
40 2075
40 3721
41 401
42 1117
42 3711
45 36...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
85728715707691821

Test #35:

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

input:

5
777434612360931036

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
4618 3247
673 4141
182 1867
3056 670
1846 3522
2267 2115
3801 4362
2557 1117
357 4350
1359 791
259 1073
2338 4704
1662 16
2710 4738
3073 3529
870 3628
2821 3309
450...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
4618 3247
673 4141
182 1867
3056 670
1846 3522
2267 2115
3801 4362
2557 1117
357 4350
1359 791
259 1073
2338 4704
1662 16
2710 4738
3073 3529
870 3628
2821 3309
450...

output:

6
5000 2501
1 4647
2 61
2 1721
2 2461
3 483
3 3026
4 1627
5 3238
6 1860
6 2880
7 3021
8 545
8 3276
9 440
10 2769
11 4537
14 3293
15 2209
16 1662
17 4119
19 228
20 1982
21 1780
22 1786
22 4382
25 3846
26 4016
27 713
27 839
27 1695
27 2355
27 2907
27 3434
28 401
28 3565
29 4973
32 2277
33 415
33 3005
...

input:

6
5000 2501
1 4647
2 61
2 1721
2 2461
3 483
3 3026
4 1627
5 3238
6 1860
6 2880
7 3021
8 545
8 3276
9 440
10 2769
11 4537
14 3293
15 2209
16 1662
17 4119
19 228
20 1982
21 1780
22 1786
22 4382
25 3846
26 4016
27 713
27 839
27 1695
27 2355
27 2907
27 3434
28 401
28 3565
29 4973
32 2277
33 415
33 3005
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
777434612360931036

Test #36:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 1908kb,1872kb

input:

5
705262511549880222

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
4801 3800
4823 4447
1784 1799
2561 3206
492 3747
4713 3936
315 612
2308 4534
1110 317
2247 886
2520 3675
2771 3478
552 1969
958 1047
2646 2312
90 166
761 1797
1841 ...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
4801 3800
4823 4447
1784 1799
2561 3206
492 3747
4713 3936
315 612
2308 4534
1110 317
2247 886
2520 3675
2771 3478
552 1969
958 1047
2646 2312
90 166
761 1797
1841 ...

output:

6
5000 2513
1 1553
2 3234
2 4423
3 126
3 4282
4 4547
5 3620
6 273
7 504
8 2219
9 2801
10 3739
11 2475
12 3449
13 3525
14 1500
17 3753
18 2523
19 172
22 4733
23 148
24 3939
25 2542
25 4306
26 631
26 1145
26 2311
26 2873
26 3892
26 4293
26 4781
27 1419
28 3998
29 1988
31 1684
32 2825
33 4524
35 4935
3...

input:

6
5000 2513
1 1553
2 3234
2 4423
3 126
3 4282
4 4547
5 3620
6 273
7 504
8 2219
9 2801
10 3739
11 2475
12 3449
13 3525
14 1500
17 3753
18 2523
19 172
22 4733
23 148
24 3939
25 2542
25 4306
26 631
26 1145
26 2311
26 2873
26 3892
26 4293
26 4781
27 1419
28 3998
29 1988
31 1684
32 2825
33 4524
35 4935
3...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
705262511549880222

Test #37:

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

input:

5
510318082834167951

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
4447 2835
1127 4279
230 736
1565 2301
3352 4688
1102 4992
4936 4152
3610 1337
4426 1170
581 2887
4750 2068
3141 3278
4994 1511
3325 2961
2805 4076
4789 2912
3794 61...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
4447 2835
1127 4279
230 736
1565 2301
3352 4688
1102 4992
4936 4152
3610 1337
4426 1170
581 2887
4750 2068
3141 3278
4994 1511
3325 2961
2805 4076
4789 2912
3794 61...

output:

6
5000 2513
2 3624
3 1030
4 715
5 916
5 1190
5 3292
5 3549
6 4592
8 159
9 4776
10 1906
10 3091
10 4887
11 979
12 2237
12 2872
12 4098
14 1370
16 1473
17 1253
18 1974
19 534
20 4360
20 4404
21 3709
21 4440
22 507
23 3507
24 3279
25 900
26 3772
26 4267
27 844
27 1207
27 2181
27 3359
27 3908
28 1791
29...

input:

6
5000 2513
2 3624
3 1030
4 715
5 916
5 1190
5 3292
5 3549
6 4592
8 159
9 4776
10 1906
10 3091
10 4887
11 979
12 2237
12 2872
12 4098
14 1370
16 1473
17 1253
18 1974
19 534
20 4360
20 4404
21 3709
21 4440
22 507
23 3507
24 3279
25 900
26 3772
26 4267
27 844
27 1207
27 2181
27 3359
27 3908
28 1791
29...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
510318082834167951

Test #38:

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

input:

5
914858813253258744

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
82 2837
2557 172
30 1323
1478 3217
3219 3529
4295 4824
3010 224
4880 3786
4524 2277
292 1419
290 217
3975 2713
1914 3562
3564 2743
4359 994
36 4600
3753 2255
4597 2...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
82 2837
2557 172
30 1323
1478 3217
3219 3529
4295 4824
3010 224
4880 3786
4524 2277
292 1419
290 217
3975 2713
1914 3562
3564 2743
4359 994
36 4600
3753 2255
4597 2...

output:

6
5000 2507
1 77
2 3850
3 2519
4 3047
5 3997
6 279
10 4582
11 1465
11 2067
11 3548
11 4021
11 4135
12 4751
15 2719
17 4221
19 3159
21 4746
22 2160
23 965
24 2745
25 3114
26 241
26 4975
27 2290
28 2611
29 2975
31 1874
32 1004
33 35
33 680
33 1000
34 1238
36 4600
37 474
38 717
40 569
41 698
41 3378
44...

input:

6
5000 2507
1 77
2 3850
3 2519
4 3047
5 3997
6 279
10 4582
11 1465
11 2067
11 3548
11 4021
11 4135
12 4751
15 2719
17 4221
19 3159
21 4746
22 2160
23 965
24 2745
25 3114
26 241
26 4975
27 2290
28 2611
29 2975
31 1874
32 1004
33 35
33 680
33 1000
34 1238
36 4600
37 474
38 717
40 569
41 698
41 3378
44...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
914858813253258744

Test #39:

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

input:

5
659635316746638238

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
1748 2937
2097 152
4541 544
237 3359
3372 4482
1371 2729
4259 4464
171 221
228 3779
2771 1236
2973 4090
1242 2104
2756 4067
4270 4426
3541 3513
574 349
2576 2997
47...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
1748 2937
2097 152
4541 544
237 3359
3372 4482
1371 2729
4259 4464
171 221
228 3779
2771 1236
2973 4090
1242 2104
2756 4067
4270 4426
3541 3513
574 349
2576 2997
47...

output:

6
5000 2504
3 1682
4 714
5 1790
7 731
7 3149
8 2610
10 29
10 214
10 2687
11 93
11 216
11 1095
11 2052
11 2113
11 2705
11 4733
12 4554
13 3819
14 1194
17 1981
17 3734
18 768
19 2947
20 1279
23 52
26 1388
27 684
27 4676
28 398
30 498
31 2356
32 55
32 759
32 1980
32 2203
32 2779
33 568
34 4092
36 2475
...

input:

6
5000 2504
3 1682
4 714
5 1790
7 731
7 3149
8 2610
10 29
10 214
10 2687
11 93
11 216
11 1095
11 2052
11 2113
11 2705
11 4733
12 4554
13 3819
14 1194
17 1981
17 3734
18 768
19 2947
20 1279
23 52
26 1388
27 684
27 4676
28 398
30 498
31 2356
32 55
32 759
32 1980
32 2203
32 2779
33 568
34 4092
36 2475
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
659635316746638238

Test #40:

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

input:

7
858490260563149759

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
2810 3074
1249 4745
2013 2270
1619 1965
478 2504
4031 1412
939 4670
3784 894
1191 4264
3842 4787
3109 1337
1371 148
2275 3630
2228 4635
3815 4537
2354 912
4087 4616...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
2810 3074
1249 4745
2013 2270
1619 1965
478 2504
4031 1412
939 4670
3784 894
1191 4264
3842 4787
3109 1337
1371 148
2275 3630
2228 4635
3815 4537
2354 912
4087 4616...

output:

8
5000 2500
4 1262
4 4953
5 321
7 3057
8 4094
9 2618
13 2634
14 1874
15 4303
18 4902
19 2932
19 3751
21 3483
23 2788
24 1745
25 1701
28 4038
29 3162
29 3511
30 3405
31 4874
33 742
34 3345
35 4492
36 4076
36 4648
38 4793
40 4379
42 777
42 2956
43 1332
44 454
44 2987
46 2153
46 3307
47 2007
48 2269
50...

input:

8
5000 2500
4 1262
4 4953
5 321
7 3057
8 4094
9 2618
13 2634
14 1874
15 4303
18 4902
19 2932
19 3751
21 3483
23 2788
24 1745
25 1701
28 4038
29 3162
29 3511
30 3405
31 4874
33 742
34 3345
35 4492
36 4076
36 4648
38 4793
40 4379
42 777
42 2956
43 1332
44 454
44 2987
46 2153
46 3307
47 2007
48 2269
50...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
858490260563149759

Test #41:

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

input:

7
860058643727731209

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
863 280
4878 3248
3654 1323
1880 1679
4385 2983
8 1547
3688 1817
3964 3620
4348 411
3089 2863
3538 2091
1222 3209
2340 158
2560 371
3051 3296
1892 22
1582 4841
2860...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
863 280
4878 3248
3654 1323
1880 1679
4385 2983
8 1547
3688 1817
3964 3620
4348 411
3089 2863
3538 2091
1222 3209
2340 158
2560 371
3051 3296
1892 22
1582 4841
2860...

output:

8
5000 2500
1 1793
2 1396
3 1567
3 3734
4 4356
5 2044
6 2822
6 4868
7 3055
8 1547
9 4327
13 3221
14 4772
15 991
16 2546
17 142
18 4572
19 2928
20 2911
23 2785
24 3245
25 536
25 4306
28 4875
29 4920
30 1565
31 2496
34 3201
35 2077
36 3397
37 365
37 664
38 3924
38 4644
39 106
40 2737
41 201
42 3393
42...

input:

8
5000 2500
1 1793
2 1396
3 1567
3 3734
4 4356
5 2044
6 2822
6 4868
7 3055
8 1547
9 4327
13 3221
14 4772
15 991
16 2546
17 142
18 4572
19 2928
20 2911
23 2785
24 3245
25 536
25 4306
28 4875
29 4920
30 1565
31 2496
34 3201
35 2077
36 3397
37 365
37 664
38 3924
38 4644
39 106
40 2737
41 201
42 3393
42...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
860058643727731209

Test #42:

score: 65
Accepted
time: 1ms = 1ms + 0ms
memory: 1908kb,1868kb

input:

7
718861404514377808

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
4023 2113
4406 4687
1640 4903
2193 2345
1659 3946
4777 3724
4323 3556
2833 2805
3745 2129
4175 4320
2728 2376
484 380
2412 2711
4004 4122
4529 2687
2629 1517
2251 1...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
4023 2113
4406 4687
1640 4903
2193 2345
1659 3946
4777 3724
4323 3556
2833 2805
3745 2129
4175 4320
2728 2376
484 380
2412 2711
4004 4122
4529 2687
2629 1517
2251 1...

output:

8
5000 2500
1 2956
2 2160
3 663
3 4724
4 1609
5 1355
5 2044
7 2305
8 906
9 3881
12 3011
12 3312
12 3360
14 3168
15 2939
16 2429
19 488
20 781
20 3678
21 2276
22 2573
22 4129
23 202
23 946
24 314
25 961
25 1769
29 1434
29 2976
30 4632
32 1047
32 1763
34 69
34 4012
35 2891
37 664
38 214
39 3803
40 189...

input:

8
5000 2500
1 2956
2 2160
3 663
3 4724
4 1609
5 1355
5 2044
7 2305
8 906
9 3881
12 3011
12 3312
12 3360
14 3168
15 2939
16 2429
19 488
20 781
20 3678
21 2276
22 2573
22 4129
23 202
23 946
24 314
25 961
25 1769
29 1434
29 2976
30 4632
32 1047
32 1763
34 69
34 4012
35 2891
37 664
38 214
39 3803
40 189...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
718861404514377808

Test #43:

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

input:

7
659192688464047828

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
4591 1290
3126 2481
113 4160
3833 415
4028 385
898 4430
3298 2837
2981 866
4491 317
2402 3699
285 369
4362 1134
1897 4771
3896 4925
76 1839
2835 3093
4694 2782
2756...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
4591 1290
3126 2481
113 4160
3833 415
4028 385
898 4430
3298 2837
2981 866
4491 317
2402 3699
285 369
4362 1134
1897 4771
3896 4925
76 1839
2835 3093
4694 2782
2756...

output:

8
5000 2500
1 4671
3 3395
4 370
4 3254
4 3848
5 3650
6 197
7 777
8 4825
9 3814
13 1166
13 4716
14 3473
15 4982
16 4188
18 1365
19 517
19 1972
19 2344
19 3229
20 3589
20 4461
21 1834
21 4448
23 1674
23 1941
23 4345
25 1701
28 2266
29 71
30 859
31 4326
34 254
34 1624
35 172
36 3951
37 84
38 670
39 438...

input:

8
5000 2500
1 4671
3 3395
4 370
4 3254
4 3848
5 3650
6 197
7 777
8 4825
9 3814
13 1166
13 4716
14 3473
15 4982
16 4188
18 1365
19 517
19 1972
19 2344
19 3229
20 3589
20 4461
21 1834
21 4448
23 1674
23 1941
23 4345
25 1701
28 2266
29 71
30 859
31 4326
34 254
34 1624
35 172
36 3951
37 84
38 670
39 438...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
659192688464047828

Test #44:

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

input:

7
685730986714800201

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
2290 2107
2372 1589
2748 3073
2252 458
1747 2253
4879 4301
1605 1109
4214 963
2927 2421
4931 4238
1443 1821
2622 966
4258 2114
3236 3503
4102 1066
1428 1834
2243 13...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
2290 2107
2372 1589
2748 3073
2252 458
1747 2253
4879 4301
1605 1109
4214 963
2927 2421
4931 4238
1443 1821
2622 966
4258 2114
3236 3503
4102 1066
1428 1834
2243 13...

output:

8
5000 2500
1 2349
2 2160
5 2485
6 2140
6 4419
7 2091
8 2089
9 3894
11 893
12 13
12 3939
14 4695
15 4993
16 4752
17 2507
17 3783
18 645
19 3662
20 1907
22 2518
23 1545
24 2546
24 4342
25 4802
28 3058
30 3315
32 467
32 3402
34 720
34 4398
35 861
36 377
40 3715
42 514
42 1673
43 242
44 1978
45 1876
46...

input:

8
5000 2500
1 2349
2 2160
5 2485
6 2140
6 4419
7 2091
8 2089
9 3894
11 893
12 13
12 3939
14 4695
15 4993
16 4752
17 2507
17 3783
18 645
19 3662
20 1907
22 2518
23 1545
24 2546
24 4342
25 4802
28 3058
30 3315
32 467
32 3402
34 720
34 4398
35 861
36 377
40 3715
42 514
42 1673
43 242
44 1978
45 1876
46...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
685730986714800201