QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#673940#8726. Magic ShowPhysics2123030 1ms1892kbC++171.6kb2024-10-25 12:00:182024-10-25 12:00:18

Judging History

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

  • [2024-10-25 12:00:18]
  • 评测
  • 测评结果:0
  • 用时:1ms
  • 内存:1892kb
  • [2024-10-25 12:00:18]
  • 提交

Alice

#include "Alice.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
const int N=5000;
mt19937 g(time(0)),g2(1e9+9);
uniform_int_distribution<> u(100,200);
inline vector<int> gen(){
  vector<int> p(N);
  iota(p.begin(),p.end(),0);
  shuffle(p.begin(),p.end(),g2);
  return p;
}
vector<pii> Alice(){
  ll X=setN(N);
  vector<pii> e;
  int B=u(g);
  for(int i=3001;i<=N;i++)
    e.emplace_back(i,B+i/62);
  vector<int> v;
  while(X)v.emplace_back(X%B),X/=B;
  for(int i=1501;i<=3000;i++)
    e.emplace_back(i,v.size()+i/63);
  for(int i=501,c=0;i<=1500;i++,c%=v.size())
    e.emplace_back(i,v[c++]+i/64);
  for(int i=2;i<=500;i++)
    e.emplace_back(i,g()%(i-1)+1);
  auto p=gen();
  for(auto &[x,y]:e)
    assert(x>=y),x=p[x-1]+1,y=p[y-1]+1;
  shuffle(e.begin(),e.end(),g);
  return e;
}

Bob

#include "Bob.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
const int N=5000;
mt19937 g2(1e9+9);
inline vector<int> gen(){
  vector<int> p(N),a(N);
  iota(p.begin(),p.end(),0);
  shuffle(p.begin(),p.end(),g2);
  for(int i=0;i<N;i++)
    a[p[i]]=i;
  return a;
}
ll Bob(vector<pii> e){
  int B=-1,E=-1;
  vector<int> X(N,-1);
  auto p=gen();
  for(auto &[x,y]:e){
    x=p[x-1]+1,y=p[y-1]+1;
    if(x>y)swap(x,y);
    if(y>3000)B=x-y/62;
    else if(y>1500)E=x-y/63;
    else if(y>500)X[y-501]=x-y/64;
  }
  assert(~B&&~E);
  vector<int> v(E);
  for(int i=501;i<=1500;i++)
    if(~X[i-501])v[(i-501)%E]=X[i-501];
  ll c=0,s=1;
  for(int i=0;i<E;i++,s*=B)
    c+=s*v[i];
  return c;
}

詳細信息

Subtask #1:

score: 0
Wrong Answer

Test #1:

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

input:

1
4005

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
481 3121
520 2085
126 962
2890 2614
2542 4592
3269 4732
2348 3854
2389 2698
2596 1097
3656 4758
3262 3148
2731 4142
1859 2831
713 2748
175 3383
3646 3723
3475 3383
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
481 3121
520 2085
126 962
2890 2614
2542 4592
3269 4732
2348 3854
2389 2698
2596 1097
3656 4758
3262 3148
2731 4142
1859 2831
713 2748
175 3383
3646 3723
3475 3383
...

output:

2
5000 3709
1 4758
2 3854
3 2085
4 1079
5 3722
7 1433
8 476
11 3208
13 4732
15 4481
16 825
17 4142
19 4777
20 333
20 2271
23 3722
28 4196
29 476
30 337
31 3591
32 3723
34 1232
35 2831
36 2507
37 2103
38 825
39 3591
40 3121
41 4196
43 1674
44 3283
45 4933
46 2475
48 3387
49 4201
50 3116
51 4732
52 23...

input:

2
5000 3709
1 4758
2 3854
3 2085
4 1079
5 3722
7 1433
8 476
11 3208
13 4732
15 4481
16 825
17 4142
19 4777
20 333
20 2271
23 3722
28 4196
29 476
30 337
31 3591
32 3723
34 1232
35 2831
36 2507
37 2103
38 825
39 3591
40 3121
41 4196
43 1674
44 3283
45 4933
46 2475
48 3387
49 4201
50 3116
51 4732
52 23...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4005

Test #2:

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

input:

1
459

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
481 1969
520 2085
126 962
2890 2614
2542 4592
3269 1630
2348 3854
2389 2698
2596 1097
3656 4758
3262 3148
2731 4142
1859 2831
713 2748
175 3383
3646 4103
3475 3383
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
481 1969
520 2085
126 962
2890 2614
2542 4592
3269 1630
2348 3854
2389 2698
2596 1097
3656 4758
3262 3148
2731 4142
1859 2831
713 2748
175 3383
3646 4103
3475 3383
...

output:

2
5000 3709
1 4758
2 3854
3 2085
4 3121
5 4180
7 1433
8 476
11 3208
13 4732
15 4481
16 825
17 2955
19 4777
20 333
20 2271
23 4180
28 4196
29 476
30 337
31 3591
32 4103
34 1232
35 2831
36 2507
37 1348
38 825
39 3591
40 1969
41 4634
43 1674
44 3283
45 1077
46 2475
48 3387
49 4201
50 3116
51 4732
52 23...

input:

2
5000 3709
1 4758
2 3854
3 2085
4 3121
5 4180
7 1433
8 476
11 3208
13 4732
15 4481
16 825
17 2955
19 4777
20 333
20 2271
23 4180
28 4196
29 476
30 337
31 3591
32 4103
34 1232
35 2831
36 2507
37 1348
38 825
39 3591
40 1969
41 4634
43 1674
44 3283
45 1077
46 2475
48 3387
49 4201
50 3116
51 4732
52 23...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
459

Test #3:

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

input:

1
2495

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
481 2955
520 2085
126 962
2890 2614
2542 4592
3269 4777
2348 3854
2389 2698
2596 1097
3656 4758
3262 3148
2731 4142
1859 2831
713 2748
175 3383
3646 4201
3475 3383
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
481 2955
520 2085
126 962
2890 2614
2542 4592
3269 4777
2348 3854
2389 2698
2596 1097
3656 4758
3262 3148
2731 4142
1859 2831
713 2748
175 3383
3646 4201
3475 3383
...

output:

2
5000 3709
1 4758
2 3854
3 2085
4 3116
5 4162
7 1433
8 476
11 3208
13 4732
15 4481
16 825
17 1433
19 4777
20 333
20 2271
23 4162
28 4196
29 476
30 337
31 3591
32 4201
34 1232
35 2831
36 2507
37 4705
38 825
39 3591
40 2955
41 3383
43 1674
44 3283
45 3116
46 2475
48 3387
49 4201
50 3116
51 4732
52 10...

input:

2
5000 3709
1 4758
2 3854
3 2085
4 3116
5 4162
7 1433
8 476
11 3208
13 4732
15 4481
16 825
17 1433
19 4777
20 333
20 2271
23 4162
28 4196
29 476
30 337
31 3591
32 4201
34 1232
35 2831
36 2507
37 4705
38 825
39 3591
40 2955
41 3383
43 1674
44 3283
45 3116
46 2475
48 3387
49 4201
50 3116
51 4732
52 10...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
2495

Test #4:

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

input:

3
1560

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
481 1328
520 2085
126 962
2890 2614
2542 4592
3269 4180
2348 3854
2389 2698
2596 1097
3656 4758
3262 3148
2731 4142
1859 2831
713 2748
175 3383
3646 3796
3475 3383
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
481 1328
520 2085
126 962
2890 2614
2542 4592
3269 4180
2348 3854
2389 2698
2596 1097
3656 4758
3262 3148
2731 4142
1859 2831
713 2748
175 3383
3646 3796
3475 3383
...

output:

4
5000 2500
1 4758
3 2085
4 2955
6 4664
8 476
10 2085
15 4481
20 333
21 4481
24 3479
26 2399
27 4758
29 476
31 3591
32 3796
33 3955
34 1232
37 3955
39 3591
40 1328
41 3723
44 3283
45 1973
46 2475
47 4933
52 4103
53 1006
55 1969
57 2525
60 4758
61 476
64 2525
66 2748
67 3148
68 3421
70 2838
76 4876
7...

input:

4
5000 2500
1 4758
3 2085
4 2955
6 4664
8 476
10 2085
15 4481
20 333
21 4481
24 3479
26 2399
27 4758
29 476
31 3591
32 3796
33 3955
34 1232
37 3955
39 3591
40 1328
41 3723
44 3283
45 1973
46 2475
47 4933
52 4103
53 1006
55 1969
57 2525
60 4758
61 476
64 2525
66 2748
67 3148
68 3421
70 2838
76 4876
7...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1560

Test #5:

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

input:

3
3594

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
481 4634
520 2085
126 962
2890 2614
2542 4592
3269 4162
2348 3854
2389 2698
2596 1097
3656 4758
3262 3148
2731 4142
1859 2831
713 2748
175 3383
3646 2399
3475 3383
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
481 4634
520 2085
126 962
2890 2614
2542 4592
3269 4162
2348 3854
2389 2698
2596 1097
3656 4758
3262 3148
2731 4142
1859 2831
713 2748
175 3383
3646 2399
3475 3383
...

output:

4
5000 2500
1 4758
3 2085
6 4664
8 476
10 2085
12 1376
15 4481
20 333
21 4481
24 2955
26 2399
27 4758
29 476
31 3591
32 2399
34 1232
39 3591
40 4634
43 1674
44 3283
45 4627
46 2475
48 3387
53 1006
55 2156
56 3189
57 2525
60 4758
61 476
63 3387
64 2525
65 1153
66 2748
67 3148
68 4180
70 2838
76 4876
...

input:

4
5000 2500
1 4758
3 2085
6 4664
8 476
10 2085
12 1376
15 4481
20 333
21 4481
24 2955
26 2399
27 4758
29 476
31 3591
32 2399
34 1232
39 3591
40 4634
43 1674
44 3283
45 4627
46 2475
48 3387
53 1006
55 2156
56 3189
57 2525
60 4758
61 476
63 3387
64 2525
65 1153
66 2748
67 3148
68 4180
70 2838
76 4876
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
3594

Test #6:

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

input:

3
1750

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
481 3817
520 2085
126 962
2890 2614
2542 4592
3269 4627
2348 3854
2389 2698
2596 1097
3656 4758
3262 3148
2731 4142
1859 2831
713 2748
175 3383
3646 1966
3475 3383
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
481 3817
520 2085
126 962
2890 2614
2542 4592
3269 4627
2348 3854
2389 2698
2596 1097
3656 4758
3262 3148
2731 4142
1859 2831
713 2748
175 3383
3646 1966
3475 3383
...

output:

4
5000 2500
1 4758
3 2085
4 4180
6 4664
8 476
10 2085
15 4481
20 333
21 4481
24 4940
26 2399
27 4758
29 476
31 3591
32 1966
33 4009
34 1232
37 4009
39 3591
40 3817
41 4508
44 3283
45 3547
46 2475
47 2955
52 4172
53 1006
55 2279
57 2525
60 4758
61 476
64 2525
66 2748
67 3148
68 440
70 2838
76 4876
78...

input:

4
5000 2500
1 4758
3 2085
4 4180
6 4664
8 476
10 2085
15 4481
20 333
21 4481
24 4940
26 2399
27 4758
29 476
31 3591
32 1966
33 4009
34 1232
37 4009
39 3591
40 3817
41 4508
44 3283
45 3547
46 2475
47 2955
52 4172
53 1006
55 2279
57 2525
60 4758
61 476
64 2525
66 2748
67 3148
68 440
70 2838
76 4876
78...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1750

Test #7:

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

input:

5
4878

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
481 3421
520 2085
126 962
2890 2614
2542 4592
3269 4628
2348 3854
2389 2698
2596 1097
3656 4758
3262 3148
2731 4142
1859 2831
713 2748
175 3383
3646 2392
3475 3383
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
481 3421
520 2085
126 962
2890 2614
2542 4592
3269 4628
2348 3854
2389 2698
2596 1097
3656 4758
3262 3148
2731 4142
1859 2831
713 2748
175 3383
3646 2392
3475 3383
...

output:

6
5000 2539
2 3854
5 4449
6 4664
7 1433
9 2831
11 3208
14 3722
16 825
18 1009
19 4777
20 333
22 1328
23 4449
25 3189
26 2399
27 4758
30 337
32 2392
34 1232
35 2831
36 2507
38 825
40 3421
41 3722
42 1328
43 1674
44 3283
45 3955
46 2475
47 3208
56 3189
58 1009
59 4628
60 4758
67 3148
68 3720
71 4777
7...

input:

6
5000 2539
2 3854
5 4449
6 4664
7 1433
9 2831
11 3208
14 3722
16 825
18 1009
19 4777
20 333
22 1328
23 4449
25 3189
26 2399
27 4758
30 337
32 2392
34 1232
35 2831
36 2507
38 825
40 3421
41 3722
42 1328
43 1674
44 3283
45 3955
46 2475
47 3208
56 3189
58 1009
59 4628
60 4758
67 3148
68 3720
71 4777
7...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4878

Test #8:

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

input:

5
1223

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
481 1106
520 2085
126 962
2890 2614
2542 4592
3269 2156
2348 3854
2389 2698
2596 1097
3656 4758
3262 3148
2731 4142
1859 2831
713 2748
175 3383
3646 773
3475 3383
3...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
481 1106
520 2085
126 962
2890 2614
2542 4592
3269 2156
2348 3854
2389 2698
2596 1097
3656 4758
3262 3148
2731 4142
1859 2831
713 2748
175 3383
3646 773
3475 3383
3...

output:

6
5000 2593
1 4758
3 2085
8 476
10 2085
12 1376
13 4732
15 4481
17 2103
20 2271
21 4481
28 4196
29 476
31 3591
33 2633
37 2633
39 3591
40 1106
41 2955
45 2588
47 407
48 3387
49 4201
50 3116
51 4732
52 4280
53 1006
54 2969
55 2296
57 2525
61 476
62 3194
63 3387
64 2525
65 1153
66 2748
69 3194
70 2838...

input:

6
5000 2593
1 4758
3 2085
8 476
10 2085
12 1376
13 4732
15 4481
17 2103
20 2271
21 4481
28 4196
29 476
31 3591
33 2633
37 2633
39 3591
40 1106
41 2955
45 2588
47 407
48 3387
49 4201
50 3116
51 4732
52 4280
53 1006
54 2969
55 2296
57 2525
61 476
62 3194
63 3387
64 2525
65 1153
66 2748
69 3194
70 2838...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1223

Test #9:

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

input:

5
648

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
481 2355
520 2085
126 962
2890 2614
2542 4592
3269 3377
2348 3854
2389 2698
2596 1097
3656 4758
3262 3148
2731 4142
1859 2831
713 2748
175 3383
3646 4009
3475 3383
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
481 2355
520 2085
126 962
2890 2614
2542 4592
3269 3377
2348 3854
2389 2698
2596 1097
3656 4758
3262 3148
2731 4142
1859 2831
713 2748
175 3383
3646 4009
3475 3383
...

output:

6
5000 2597
2 3854
4 1630
5 4627
6 4664
7 1433
9 2831
11 3208
14 3722
16 825
17 4180
18 1009
19 4777
20 333
23 4627
24 3547
25 3189
26 2399
27 4758
30 337
32 4009
34 1232
35 2831
36 2507
38 825
40 2355
43 1674
44 3283
45 1266
46 2475
56 3189
58 1009
59 4628
60 4758
67 3148
71 4777
72 4777
75 1009
76...

input:

6
5000 2597
2 3854
4 1630
5 4627
6 4664
7 1433
9 2831
11 3208
14 3722
16 825
17 4180
18 1009
19 4777
20 333
23 4627
24 3547
25 3189
26 2399
27 4758
30 337
32 4009
34 1232
35 2831
36 2507
38 825
40 2355
43 1674
44 3283
45 1266
46 2475
56 3189
58 1009
59 4628
60 4758
67 3148
71 4777
72 4777
75 1009
76...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
648

Test #10:

score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1884kb,1868kb

input:

7
4475

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
481 2392
520 2085
126 962
2890 2614
2542 4592
3269 3854
2348 3854
2389 2698
2596 1097
3656 4758
3262 3148
2731 4142
1859 2831
713 2748
175 3383
3646 851
3475 3383
3...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
481 2392
520 2085
126 962
2890 2614
2542 4592
3269 3854
2348 3854
2389 2698
2596 1097
3656 4758
3262 3148
2731 4142
1859 2831
713 2748
175 3383
3646 851
3475 3383
3...

output:

8
5000 2500
1 4758
8 476
9 2831
12 1376
15 4481
18 1009
19 4777
21 4481
25 3189
27 4758
29 476
30 337
31 3591
35 2831
36 2507
39 3591
41 2614
43 1674
48 3387
54 2969
56 3189
57 2525
58 1009
60 4758
61 476
62 3194
63 3387
64 2525
65 1153
66 2748
67 3148
69 3194
70 2838
71 4777
72 4777
73 3194
74 2271...

input:

8
5000 2500
1 4758
8 476
9 2831
12 1376
15 4481
18 1009
19 4777
21 4481
25 3189
27 4758
29 476
30 337
31 3591
35 2831
36 2507
39 3591
41 2614
43 1674
48 3387
54 2969
56 3189
57 2525
58 1009
60 4758
61 476
62 3194
63 3387
64 2525
65 1153
66 2748
67 3148
69 3194
70 2838
71 4777
72 4777
73 3194
74 2271...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4416

Subtask #2:

score: 0
Wrong Answer

Test #13:

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

input:

1
17476204

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
481 4201
520 1328
126 962
2890 4142
2542 4592
3269 3817
2348 2614
2389 2698
2596 4162
3656 4758
3262 3148
2731 1261
1859 2831
713 2748
175 1009
3646 440
3475 1009
3...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
481 4201
520 1328
126 962
2890 4142
2542 4592
3269 3817
2348 2614
2389 2698
2596 4162
3656 4758
3262 3148
2731 1261
1859 2831
713 2748
175 1009
3646 440
3475 1009
3...

output:

2
5000 3709
1 4758
2 2614
3 1328
4 1534
5 4440
7 825
8 476
11 4628
13 4196
15 4481
16 4732
17 3547
19 3383
20 333
20 2271
23 4440
28 3208
29 476
30 337
31 3591
32 3854
34 1232
35 2831
36 2507
37 4440
38 4732
39 3591
40 3245
41 2355
43 1674
44 3283
45 2355
46 2475
48 3387
49 4705
50 3194
51 4196
52 1...

input:

2
5000 3709
1 4758
2 2614
3 1328
4 1534
5 4440
7 825
8 476
11 4628
13 4196
15 4481
16 4732
17 3547
19 3383
20 333
20 2271
23 4440
28 3208
29 476
30 337
31 3591
32 3854
34 1232
35 2831
36 2507
37 4440
38 4732
39 3591
40 3245
41 2355
43 1674
44 3283
45 2355
46 2475
48 3387
49 4705
50 3194
51 4196
52 1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
17476204

Test #14:

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

input:

1
11926600

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
481 4830
520 1328
126 962
2890 4142
2542 4592
3269 4142
2348 2614
2389 2698
2596 4162
3656 4758
3262 3148
2731 1261
1859 2831
713 2748
175 1009
3646 4670
3475 1009
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
481 4830
520 1328
126 962
2890 4142
2542 4592
3269 4142
2348 2614
2389 2698
2596 4162
3656 4758
3262 3148
2731 1261
1859 2831
713 2748
175 1009
3646 4670
3475 1009
...

output:

2
5000 3709
1 4758
2 2614
3 1328
4 4628
5 1969
7 825
8 476
11 4628
13 4196
15 4481
16 4732
17 4449
19 3383
20 333
20 2271
23 1969
28 3208
29 476
30 337
31 3591
32 4940
34 1232
35 2831
36 2507
37 321
38 4732
39 3591
40 2146
41 1261
43 1674
44 3283
45 872
46 2475
48 3387
49 4705
50 3194
51 4196
52 483...

input:

2
5000 3709
1 4758
2 2614
3 1328
4 4628
5 1969
7 825
8 476
11 4628
13 4196
15 4481
16 4732
17 4449
19 3383
20 333
20 2271
23 1969
28 3208
29 476
30 337
31 3591
32 4940
34 1232
35 2831
36 2507
37 321
38 4732
39 3591
40 2146
41 1261
43 1674
44 3283
45 872
46 2475
48 3387
49 4705
50 3194
51 4196
52 483...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
11926600

Test #15:

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

input:

1
16602378

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
481 4180
520 1328
126 962
2890 4142
2542 4592
3269 777
2348 2614
2389 2698
2596 4162
3656 4758
3262 3148
2731 1261
1859 2831
713 2748
175 1009
3646 3720
3475 1009
3...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
481 4180
520 1328
126 962
2890 4142
2542 4592
3269 777
2348 2614
2389 2698
2596 4162
3656 4758
3262 3148
2731 1261
1859 2831
713 2748
175 1009
3646 3720
3475 1009
3...

output:

2
5000 3709
1 4758
2 2614
3 1328
4 3569
5 4818
7 825
8 476
11 4628
13 4196
15 4481
16 4732
17 577
19 3383
20 333
20 2271
23 4818
28 3208
29 476
30 337
31 3591
32 1009
34 1232
35 2831
36 2507
37 4103
38 4732
39 3591
40 1585
41 1908
43 1674
44 3283
45 2693
46 2475
48 3387
49 4705
50 3194
51 4196
52 94...

input:

2
5000 3709
1 4758
2 2614
3 1328
4 3569
5 4818
7 825
8 476
11 4628
13 4196
15 4481
16 4732
17 577
19 3383
20 333
20 2271
23 4818
28 3208
29 476
30 337
31 3591
32 1009
34 1232
35 2831
36 2507
37 4103
38 4732
39 3591
40 1585
41 1908
43 1674
44 3283
45 2693
46 2475
48 3387
49 4705
50 3194
51 4196
52 94...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
16602378

Test #16:

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

input:

3
13129243

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
481 3912
520 1328
126 962
2890 4142
2542 4592
3269 1348
2348 2614
2389 2698
2596 4162
3656 4758
3262 3148
2731 1261
1859 2831
713 2748
175 1009
3646 2039
3475 1009
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
481 3912
520 1328
126 962
2890 4142
2542 4592
3269 1348
2348 2614
2389 2698
2596 4162
3656 4758
3262 3148
2731 1261
1859 2831
713 2748
175 1009
3646 2039
3475 1009
...

output:

4
5000 2500
1 4758
3 1328
4 946
5 1628
6 4664
7 825
8 476
10 1328
15 4481
17 524
20 333
21 4481
22 2955
23 1628
24 1628
27 4758
29 476
31 3591
32 1652
33 2146
34 1232
37 4411
39 3591
40 3372
41 4558
42 1645
44 3283
45 2756
46 2475
47 4103
52 4809
53 1006
55 1645
60 4758
61 476
66 2748
67 3148
68 246...

input:

4
5000 2500
1 4758
3 1328
4 946
5 1628
6 4664
7 825
8 476
10 1328
15 4481
17 524
20 333
21 4481
22 2955
23 1628
24 1628
27 4758
29 476
31 3591
32 1652
33 2146
34 1232
37 4411
39 3591
40 3372
41 4558
42 1645
44 3283
45 2756
46 2475
47 4103
52 4809
53 1006
55 1645
60 4758
61 476
66 2748
67 3148
68 246...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
13129243

Test #17:

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

input:

3
7892141

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
481 2392
520 1328
126 962
2890 4142
2542 4592
3269 1348
2348 2614
2389 2698
2596 4162
3656 4758
3262 3148
2731 1261
1859 2831
713 2748
175 1009
3646 2955
3475 1009
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
481 2392
520 1328
126 962
2890 4142
2542 4592
3269 1348
2348 2614
2389 2698
2596 4162
3656 4758
3262 3148
2731 1261
1859 2831
713 2748
175 1009
3646 2955
3475 1009
...

output:

4
5000 2500
1 4758
3 1328
4 946
5 1628
6 4664
7 825
8 476
10 1328
15 4481
17 524
20 333
21 4481
22 4933
23 1628
24 1645
27 4758
29 476
31 3591
32 851
33 1652
34 1232
37 4627
39 3591
40 3841
41 4558
42 1645
44 3283
45 407
46 2475
47 4103
52 3723
53 1006
55 3403
60 4758
61 476
66 2748
67 3148
68 524
7...

input:

4
5000 2500
1 4758
3 1328
4 946
5 1628
6 4664
7 825
8 476
10 1328
15 4481
17 524
20 333
21 4481
22 4933
23 1628
24 1645
27 4758
29 476
31 3591
32 851
33 1652
34 1232
37 4627
39 3591
40 3841
41 4558
42 1645
44 3283
45 407
46 2475
47 4103
52 3723
53 1006
55 3403
60 4758
61 476
66 2748
67 3148
68 524
7...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
7892141

Test #18:

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

input:

3
21314775

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
481 2546
520 1328
126 962
2890 4142
2542 4592
3269 3854
2348 2614
2389 2698
2596 4162
3656 4758
3262 3148
2731 1261
1859 2831
713 2748
175 1009
3646 1433
3475 1009
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
481 2546
520 1328
126 962
2890 4142
2542 4592
3269 3854
2348 2614
2389 2698
2596 4162
3656 4758
3262 3148
2731 1261
1859 2831
713 2748
175 1009
3646 1433
3475 1009
...

output:

4
5000 2500
1 4758
3 1328
6 4664
8 476
10 1328
12 1376
15 4481
20 333
21 4481
22 4508
24 2376
27 4758
29 476
31 3591
32 2315
33 4710
34 1232
39 3591
40 4508
43 1674
44 3283
46 2475
50 3194
53 1006
55 2588
57 2525
60 4758
61 476
64 2525
66 2748
67 3148
68 4645
70 2838
76 4876
80 1467
81 1555
82 4481
...

input:

4
5000 2500
1 4758
3 1328
6 4664
8 476
10 1328
12 1376
15 4481
20 333
21 4481
22 4508
24 2376
27 4758
29 476
31 3591
32 2315
33 4710
34 1232
39 3591
40 4508
43 1674
44 3283
46 2475
50 3194
53 1006
55 2588
57 2525
60 4758
61 476
64 2525
66 2748
67 3148
68 4645
70 2838
76 4876
80 1467
81 1555
82 4481
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
21314775

Test #19:

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

input:

5
5559540

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
481 1652
520 1328
126 962
2890 4142
2542 4592
3269 4645
2348 2614
2389 2698
2596 4162
3656 4758
3262 3148
2731 1261
1859 2831
713 2748
175 1009
3646 1433
3475 1009
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
481 1652
520 1328
126 962
2890 4142
2542 4592
3269 4645
2348 2614
2389 2698
2596 4162
3656 4758
3262 3148
2731 1261
1859 2831
713 2748
175 1009
3646 1433
3475 1009
...

output:

6
5000 2538
1 4758
2 2614
4 2376
5 3372
8 476
12 1376
13 4196
14 2085
15 4481
16 4732
17 4710
18 1097
19 3383
20 2271
21 4481
22 2156
23 3372
29 476
31 3591
33 4670
38 4732
39 3591
41 2166
42 1178
45 4201
47 4301
48 3387
49 4705
50 3194
51 4196
53 1006
54 2969
57 2525
58 1097
61 476
62 4201
63 3387
...

input:

6
5000 2538
1 4758
2 2614
4 2376
5 3372
8 476
12 1376
13 4196
14 2085
15 4481
16 4732
17 4710
18 1097
19 3383
20 2271
21 4481
22 2156
23 3372
29 476
31 3591
33 4670
38 4732
39 3591
41 2166
42 1178
45 4201
47 4301
48 3387
49 4705
50 3194
51 4196
53 1006
54 2969
57 2525
58 1097
61 476
62 4201
63 3387
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
5559540

Test #20:

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

input:

5
9424319

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
481 1009
520 1328
126 962
2890 4142
2542 4592
3269 1617
2348 2614
2389 2698
2596 4162
3656 4758
3262 3148
2731 1261
1859 2831
713 2748
175 1009
3646 4873
3475 1009
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
481 1009
520 1328
126 962
2890 4142
2542 4592
3269 1617
2348 2614
2389 2698
2596 4162
3656 4758
3262 3148
2731 1261
1859 2831
713 2748
175 1009
3646 4873
3475 1009
...

output:

6
5000 2525
1 4758
2 2614
8 476
12 1376
13 4196
14 2085
15 4481
16 4732
17 2376
18 1097
19 3383
20 2271
21 4481
29 476
31 3591
38 4732
39 3591
40 4409
41 2546
42 4301
47 1106
48 3387
49 4705
50 3194
51 4196
52 3817
53 1006
54 2969
57 2525
58 1097
61 476
62 4201
63 3387
64 2525
65 1153
66 2748
69 420...

input:

6
5000 2525
1 4758
2 2614
8 476
12 1376
13 4196
14 2085
15 4481
16 4732
17 2376
18 1097
19 3383
20 2271
21 4481
29 476
31 3591
38 4732
39 3591
40 4409
41 2546
42 4301
47 1106
48 3387
49 4705
50 3194
51 4196
52 3817
53 1006
54 2969
57 2525
58 1097
61 476
62 4201
63 3387
64 2525
65 1153
66 2748
69 420...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
9424319

Test #21:

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

input:

5
10955780

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
481 1695
520 1328
126 962
2890 4142
2542 4592
3269 2085
2348 2614
2389 2698
2596 4162
3656 4758
3262 3148
2731 1261
1859 2831
713 2748
175 1009
3646 3208
3475 1009
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
481 1695
520 1328
126 962
2890 4142
2542 4592
3269 2085
2348 2614
2389 2698
2596 4162
3656 4758
3262 3148
2731 1261
1859 2831
713 2748
175 1009
3646 3208
3475 1009
...

output:

6
5000 2533
3 1328
4 1261
5 3421
6 4664
7 825
9 2831
10 1328
11 4628
20 333
23 3421
24 1266
25 3189
26 4777
27 4758
28 3208
30 337
34 1232
35 2831
36 2507
37 4628
40 1009
41 1328
42 1763
43 1674
44 3283
46 2475
47 3722
55 3547
56 3189
59 3722
60 4758
67 3148
76 4876
79 3189
81 1555
83 4777
84 4876
8...

input:

6
5000 2533
3 1328
4 1261
5 3421
6 4664
7 825
9 2831
10 1328
11 4628
20 333
23 3421
24 1266
25 3189
26 4777
27 4758
28 3208
30 337
34 1232
35 2831
36 2507
37 4628
40 1009
41 1328
42 1763
43 1674
44 3283
46 2475
47 3722
55 3547
56 3189
59 3722
60 4758
67 3148
76 4876
79 3189
81 1555
83 4777
84 4876
8...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
10955780

Test #22:

score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1880kb,1864kb

input:

7
19938721

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
481 2467
520 1328
126 962
2890 4142
2542 4592
3269 4710
2348 2614
2389 2698
2596 4162
3656 4758
3262 3148
2731 1261
1859 2831
713 2748
175 1009
3646 4873
3475 1009
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
481 2467
520 1328
126 962
2890 4142
2542 4592
3269 4710
2348 2614
2389 2698
2596 4162
3656 4758
3262 3148
2731 1261
1859 2831
713 2748
175 1009
3646 4873
3475 1009
...

output:

8
5000 2500
1 4758
2 2614
8 476
9 2831
12 1376
13 4196
15 4481
21 4481
25 3189
27 4758
28 3208
29 476
30 337
31 3591
35 2831
36 2507
39 3591
43 1674
48 3387
51 4196
56 3189
57 2525
59 3722
60 4758
61 476
63 3387
64 2525
65 1153
66 2748
67 3148
70 2838
74 2271
76 4876
77 3387
79 3189
80 1467
82 4481
...

input:

8
5000 2500
1 4758
2 2614
8 476
9 2831
12 1376
13 4196
15 4481
21 4481
25 3189
27 4758
28 3208
29 476
30 337
31 3591
35 2831
36 2507
39 3591
43 1674
48 3387
51 4196
56 3189
57 2525
59 3722
60 4758
61 476
63 3387
64 2525
65 1153
66 2748
67 3148
70 2838
74 2271
76 4876
77 3387
79 3189
80 1467
82 4481
...

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Incorrect answer.

Subtask #3:

score: 0
Wrong Answer

Test #25:

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

input:

1
355365355024496523

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
481 1328
520 3479
126 962
2890 1328
2542 4592
3269 3121
2348 2085
2389 2698
2596 4196
3656 4758
3262 3148
2731 4449
1859 2831
713 2748
175 825
3646 2588
3475 825
36...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
481 1328
520 3479
126 962
2890 1328
2542 4592
3269 3121
2348 2085
2389 2698
2596 4196
3656 4758
3262 3148
2731 4449
1859 2831
713 2748
175 825
3646 2588
3475 825
36...

output:

2
5000 3709
1 4758
2 2085
3 3479
4 1743
5 3817
7 3854
8 476
11 332
13 4142
15 4481
16 2614
17 3794
19 1433
20 333
20 2271
23 1106
28 1261
29 476
30 337
31 3591
32 3796
34 1232
35 2831
36 2507
37 3955
38 2614
39 3591
40 1038
41 4180
43 1674
44 3283
45 440
46 2475
48 3387
49 1079
50 1097
51 4142
52 46...

input:

2
5000 3709
1 4758
2 2085
3 3479
4 1743
5 3817
7 3854
8 476
11 332
13 4142
15 4481
16 2614
17 3794
19 1433
20 333
20 2271
23 1106
28 1261
29 476
30 337
31 3591
32 3796
34 1232
35 2831
36 2507
37 3955
38 2614
39 3591
40 1038
41 4180
43 1674
44 3283
45 440
46 2475
48 3387
49 1079
50 1097
51 4142
52 46...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
355365355024496523

Test #26:

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

input:

1
727827999106414164

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
481 3633
520 3479
126 962
2890 1328
2542 4592
3269 4634
2348 2085
2389 2698
2596 4196
3656 4758
3262 3148
2731 4449
1859 2831
713 2748
175 825
3646 2355
3475 825
36...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
481 3633
520 3479
126 962
2890 1328
2542 4592
3269 4634
2348 2085
2389 2698
2596 4196
3656 4758
3262 3148
2731 4449
1859 2831
713 2748
175 825
3646 2355
3475 825
36...

output:

2
5000 3709
1 4758
2 2085
3 3479
4 3377
5 2756
7 3854
8 476
11 332
13 4142
15 4481
16 2614
17 872
19 1433
20 333
20 2271
23 3723
28 1261
29 476
30 337
31 3591
32 1534
34 1232
35 2831
36 2507
37 2003
38 2614
39 3591
40 4670
41 577
43 1674
44 3283
45 1266
46 2475
48 3387
49 1079
50 1097
51 4142
52 494...

input:

2
5000 3709
1 4758
2 2085
3 3479
4 3377
5 2756
7 3854
8 476
11 332
13 4142
15 4481
16 2614
17 872
19 1433
20 333
20 2271
23 3723
28 1261
29 476
30 337
31 3591
32 1534
34 1232
35 2831
36 2507
37 2003
38 2614
39 3591
40 4670
41 577
43 1674
44 3283
45 1266
46 2475
48 3387
49 1079
50 1097
51 4142
52 494...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
727827999106414164

Test #27:

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

input:

1
656410143989222955

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
481 3841
520 3479
126 962
2890 1328
2542 4592
3269 3377
2348 2085
2389 2698
2596 4196
3656 4758
3262 3148
2731 4449
1859 2831
713 2748
175 825
3646 1966
3475 825
36...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
481 3841
520 3479
126 962
2890 1328
2542 4592
3269 3377
2348 2085
2389 2698
2596 4196
3656 4758
3262 3148
2731 4449
1859 2831
713 2748
175 825
3646 1966
3475 825
36...

output:

2
5000 3709
1 4758
2 2085
3 3479
4 1630
5 1328
7 3854
8 476
11 332
13 4142
15 4481
16 2614
17 2756
19 1433
20 333
20 2271
23 4812
28 1261
29 476
30 337
31 3591
32 2955
34 1232
35 2831
36 2507
37 4627
38 2614
39 3591
40 3817
41 4180
43 1674
44 3283
45 1178
46 2475
48 3387
49 1079
50 1097
51 4142
52 4...

input:

2
5000 3709
1 4758
2 2085
3 3479
4 1630
5 1328
7 3854
8 476
11 332
13 4142
15 4481
16 2614
17 2756
19 1433
20 333
20 2271
23 4812
28 1261
29 476
30 337
31 3591
32 2955
34 1232
35 2831
36 2507
37 4627
38 2614
39 3591
40 3817
41 4180
43 1674
44 3283
45 1178
46 2475
48 3387
49 1079
50 1097
51 4142
52 4...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
656410143989222955

Test #28:

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

input:

1
410366615149657534

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
481 524
520 3479
126 962
2890 1328
2542 4592
3269 1630
2348 2085
2389 2698
2596 4196
3656 4758
3262 3148
2731 4449
1859 2831
713 2748
175 825
3646 324
3475 825
3662...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
481 524
520 3479
126 962
2890 1328
2542 4592
3269 1630
2348 2085
2389 2698
2596 4196
3656 4758
3262 3148
2731 4449
1859 2831
713 2748
175 825
3646 324
3475 825
3662...

output:

2
5000 3709
1 4758
2 2085
3 3479
4 3121
5 1969
7 3854
8 476
11 332
13 4142
15 4481
16 2614
17 4705
19 1433
20 333
20 2271
23 2614
28 1261
29 476
30 337
31 3591
32 2408
34 1232
35 2831
36 2507
37 4722
38 2614
39 3591
40 4960
41 2279
43 1674
44 3283
45 1585
46 2475
48 3387
49 1079
50 1097
51 4142
52 3...

input:

2
5000 3709
1 4758
2 2085
3 3479
4 3121
5 1969
7 3854
8 476
11 332
13 4142
15 4481
16 2614
17 4705
19 1433
20 333
20 2271
23 2614
28 1261
29 476
30 337
31 3591
32 2408
34 1232
35 2831
36 2507
37 4722
38 2614
39 3591
40 4960
41 2279
43 1674
44 3283
45 1585
46 2475
48 3387
49 1079
50 1097
51 4142
52 3...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
410366615149657534

Test #29:

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

input:

1
298090682780948428

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
481 1348
520 3479
126 962
2890 1328
2542 4592
3269 3121
2348 2085
2389 2698
2596 4196
3656 4758
3262 3148
2731 4449
1859 2831
713 2748
175 825
3646 4812
3475 825
36...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
481 1348
520 3479
126 962
2890 1328
2542 4592
3269 3121
2348 2085
2389 2698
2596 4196
3656 4758
3262 3148
2731 4449
1859 2831
713 2748
175 825
3646 4812
3475 825
36...

output:

2
5000 3709
1 4758
2 2085
3 3479
4 1743
5 1969
7 3854
8 476
11 332
13 4142
15 4481
16 2614
17 4449
19 1433
20 333
20 2271
23 1585
28 1261
29 476
30 337
31 3591
32 4290
34 1232
35 2831
36 2507
37 1384
38 2614
39 3591
40 1266
41 407
43 1674
44 3283
45 4162
46 2475
48 3387
49 1079
50 1097
51 4142
52 57...

input:

2
5000 3709
1 4758
2 2085
3 3479
4 1743
5 1969
7 3854
8 476
11 332
13 4142
15 4481
16 2614
17 4449
19 1433
20 333
20 2271
23 1585
28 1261
29 476
30 337
31 3591
32 4290
34 1232
35 2831
36 2507
37 1384
38 2614
39 3591
40 1266
41 407
43 1674
44 3283
45 4162
46 2475
48 3387
49 1079
50 1097
51 4142
52 57...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
298090682780948428

Test #30:

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

input:

3
969441916331132577

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
481 4830
520 3479
126 962
2890 1328
2542 4592
3269 4590
2348 2085
2389 2698
2596 4196
3656 4758
3262 3148
2731 4449
1859 2831
713 2748
175 825
3646 1433
3475 825
36...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
481 4830
520 3479
126 962
2890 1328
2542 4592
3269 4590
2348 2085
2389 2698
2596 4196
3656 4758
3262 3148
2731 4449
1859 2831
713 2748
175 825
3646 1433
3475 825
36...

output:

4
5000 2500
1 4758
3 3479
4 407
5 1617
6 4664
8 476
10 3479
15 4481
17 2392
20 333
21 4481
22 2003
24 577
27 4758
29 476
31 3591
32 4940
33 1645
34 1232
37 3547
39 3591
40 4508
41 1652
42 1106
44 3283
45 4670
46 2475
47 2930
53 1006
55 1652
60 4758
61 476
66 2748
67 3148
70 2838
76 4876
78 3383
80 1...

input:

4
5000 2500
1 4758
3 3479
4 407
5 1617
6 4664
8 476
10 3479
15 4481
17 2392
20 333
21 4481
22 2003
24 577
27 4758
29 476
31 3591
32 4940
33 1645
34 1232
37 3547
39 3591
40 4508
41 1652
42 1106
44 3283
45 4670
46 2475
47 2930
53 1006
55 1652
60 4758
61 476
66 2748
67 3148
70 2838
76 4876
78 3383
80 1...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
969441916331132577

Test #31:

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

input:

3
929489812741933634

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
481 2588
520 3479
126 962
2890 1328
2542 4592
3269 4590
2348 2085
2389 2698
2596 4196
3656 4758
3262 3148
2731 4449
1859 2831
713 2748
175 825
3646 4142
3475 825
36...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
481 2588
520 3479
126 962
2890 1328
2542 4592
3269 4590
2348 2085
2389 2698
2596 4196
3656 4758
3262 3148
2731 4449
1859 2831
713 2748
175 825
3646 4142
3475 825
36...

output:

4
5000 2500
1 4758
3 3479
4 407
5 1203
6 4664
8 476
10 3479
15 4481
17 2399
20 333
21 4481
22 4280
23 1038
24 4710
27 4758
29 476
31 3591
32 3372
33 4201
34 1232
37 2257
39 3591
41 4009
42 2099
44 3283
46 2475
47 3722
53 1006
55 4009
60 4758
61 476
66 2748
67 3148
68 1908
70 2838
76 4876
78 3383
80 ...

input:

4
5000 2500
1 4758
3 3479
4 407
5 1203
6 4664
8 476
10 3479
15 4481
17 2399
20 333
21 4481
22 4280
23 1038
24 4710
27 4758
29 476
31 3591
32 3372
33 4201
34 1232
37 2257
39 3591
41 4009
42 2099
44 3283
46 2475
47 3722
53 1006
55 4009
60 4758
61 476
66 2748
67 3148
68 1908
70 2838
76 4876
78 3383
80 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
929489812741933634

Test #32:

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

input:

3
144032041325838295

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
481 1077
520 3479
126 962
2890 1328
2542 4592
3269 1743
2348 2085
2389 2698
2596 4196
3656 4758
3262 3148
2731 4449
1859 2831
713 2748
175 825
3646 1433
3475 825
36...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
481 1077
520 3479
126 962
2890 1328
2542 4592
3269 1743
2348 2085
2389 2698
2596 4196
3656 4758
3262 3148
2731 4449
1859 2831
713 2748
175 825
3646 1433
3475 825
36...

output:

4
5000 2500
1 4758
3 3479
4 549
5 3955
6 4664
8 476
10 3479
15 4481
17 3383
19 1433
20 333
21 4481
22 2392
23 1038
24 3934
27 4758
29 476
31 3591
32 2195
33 1433
34 1232
37 524
39 3591
40 4508
41 3633
42 3796
44 3283
45 1384
46 2475
47 2195
53 1006
55 3633
60 4758
61 476
66 2748
67 3148
68 1908
70 2...

input:

4
5000 2500
1 4758
3 3479
4 549
5 3955
6 4664
8 476
10 3479
15 4481
17 3383
19 1433
20 333
21 4481
22 2392
23 1038
24 3934
27 4758
29 476
31 3591
32 2195
33 1433
34 1232
37 524
39 3591
40 4508
41 3633
42 3796
44 3283
45 1384
46 2475
47 2195
53 1006
55 3633
60 4758
61 476
66 2748
67 3148
68 1908
70 2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
144032041325838295

Test #33:

score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1880kb,1872kb

input:

3
832110946250826180

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
481 1645
520 3479
126 962
2890 1328
2542 4592
3269 407
2348 2085
2389 2698
2596 4196
3656 4758
3262 3148
2731 4449
1859 2831
713 2748
175 825
3646 3723
3475 825
366...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
481 1645
520 3479
126 962
2890 1328
2542 4592
3269 407
2348 2085
2389 2698
2596 4196
3656 4758
3262 3148
2731 4449
1859 2831
713 2748
175 825
3646 3723
3475 825
366...

output:

4
5000 2500
1 4758
3 3479
4 4634
6 4664
8 476
10 3479
15 4481
17 3796
20 333
21 4481
22 1384
23 4009
27 4758
29 476
31 3591
32 4960
33 1348
34 1232
37 2930
39 3591
40 3121
41 1178
44 3283
46 2475
52 2399
53 1006
55 1178
57 2525
60 4758
61 476
64 2525
66 2748
67 3148
68 3794
70 2838
76 4876
78 3194
8...

input:

4
5000 2500
1 4758
3 3479
4 4634
6 4664
8 476
10 3479
15 4481
17 3796
20 333
21 4481
22 1384
23 4009
27 4758
29 476
31 3591
32 4960
33 1348
34 1232
37 2930
39 3591
40 3121
41 1178
44 3283
46 2475
52 2399
53 1006
55 1178
57 2525
60 4758
61 476
64 2525
66 2748
67 3148
68 3794
70 2838
76 4876
78 3194
8...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
832110946250822592