QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#674167#8726. Magic ShowPhysics2123035 1ms1916kbC++171.8kb2024-10-25 14:20:102024-10-25 14:20:11

Judging History

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

  • [2024-10-25 14:20:11]
  • 评测
  • 测评结果:5
  • 用时:1ms
  • 内存:1916kb
  • [2024-10-25 14:20:10]
  • 提交

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(20090219);
uniform_int_distribution<> u(200,300);
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);
  if(X<=N){
    for(int i=1;i<=N;i++)
      if(X!=i)e.emplace_back(X,i);
    return e;
  }
  for(int i=3001;i<=N;i++)
    e.emplace_back(i,B+i/60);
  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/61);
  for(int i=501,c=0;i<=1500;i++,c%=v.size())
    e.emplace_back(i,v[c++]+i/62);
  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(20090219);
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,-1),C(N+1);
  auto p=gen();
  for(auto &[x,y]:e){
    C[x]++,C[y]++;
    x=p[x-1]+1,y=p[y-1]+1;
    if(x>y)swap(x,y);
    if(y>3000)B=x-y/60;
    else if(y>1500)E=x-y/61;
    else if(y>500)X[y-501]=x-y/62;
  }
  for(int i=1;i<=N;i++)
    if(C[i]==e.size())return i;
  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: 5
Accepted

Test #1:

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

input:

1
4005

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
4005 1
4005 2
4005 3
4005 4
4005 5
4005 6
4005 7
4005 8
4005 9
4005 10
4005 11
4005 12
4005 13
4005 14
4005 15
4005 16
4005 17
4005 18
4005 19
4005 20
4005 21
4005 ...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
4005 1
4005 2
4005 3
4005 4
4005 5
4005 6
4005 7
4005 8
4005 9
4005 10
4005 11
4005 12
4005 13
4005 14
4005 15
4005 16
4005 17
4005 18
4005 19
4005 20
4005 21
4005 ...

output:

2
5000 3757
1 4005
2 4005
3 4005
4 4005
7 4005
9 4005
10 4005
12 4005
13 4005
14 4005
15 4005
18 4005
19 4005
20 4005
21 4005
22 4005
25 4005
26 4005
27 4005
29 4005
30 4005
31 4005
32 4005
33 4005
35 4005
37 4005
38 4005
39 4005
40 4005
41 4005
43 4005
45 4005
46 4005
48 4005
49 4005
50 4005
51 400...

input:

2
5000 3757
1 4005
2 4005
3 4005
4 4005
7 4005
9 4005
10 4005
12 4005
13 4005
14 4005
15 4005
18 4005
19 4005
20 4005
21 4005
22 4005
25 4005
26 4005
27 4005
29 4005
30 4005
31 4005
32 4005
33 4005
35 4005
37 4005
38 4005
39 4005
40 4005
41 4005
43 4005
45 4005
46 4005
48 4005
49 4005
50 4005
51 400...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4005

Test #2:

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

input:

1
459

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
459 1
459 2
459 3
459 4
459 5
459 6
459 7
459 8
459 9
459 10
459 11
459 12
459 13
459 14
459 15
459 16
459 17
459 18
459 19
459 20
459 21
459 22
459 23
459 24
459 2...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
459 1
459 2
459 3
459 4
459 5
459 6
459 7
459 8
459 9
459 10
459 11
459 12
459 13
459 14
459 15
459 16
459 17
459 18
459 19
459 20
459 21
459 22
459 23
459 24
459 2...

output:

2
5000 3757
1 459
2 459
3 459
4 459
7 459
9 459
10 459
12 459
13 459
14 459
15 459
18 459
19 459
20 459
21 459
22 459
25 459
26 459
27 459
29 459
30 459
31 459
32 459
33 459
35 459
37 459
38 459
39 459
40 459
41 459
43 459
45 459
46 459
48 459
49 459
50 459
51 459
52 459
54 459
55 459
57 459
58 459
...

input:

2
5000 3757
1 459
2 459
3 459
4 459
7 459
9 459
10 459
12 459
13 459
14 459
15 459
18 459
19 459
20 459
21 459
22 459
25 459
26 459
27 459
29 459
30 459
31 459
32 459
33 459
35 459
37 459
38 459
39 459
40 459
41 459
43 459
45 459
46 459
48 459
49 459
50 459
51 459
52 459
54 459
55 459
57 459
58 459
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
459

Test #3:

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

input:

1
2495

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2495 1
2495 2
2495 3
2495 4
2495 5
2495 6
2495 7
2495 8
2495 9
2495 10
2495 11
2495 12
2495 13
2495 14
2495 15
2495 16
2495 17
2495 18
2495 19
2495 20
2495 21
2495 ...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2495 1
2495 2
2495 3
2495 4
2495 5
2495 6
2495 7
2495 8
2495 9
2495 10
2495 11
2495 12
2495 13
2495 14
2495 15
2495 16
2495 17
2495 18
2495 19
2495 20
2495 21
2495 ...

output:

2
5000 3757
1 2495
2 2495
3 2495
4 2495
7 2495
9 2495
10 2495
12 2495
13 2495
14 2495
15 2495
18 2495
19 2495
20 2495
21 2495
22 2495
25 2495
26 2495
27 2495
29 2495
30 2495
31 2495
32 2495
33 2495
35 2495
37 2495
38 2495
39 2495
40 2495
41 2495
43 2495
45 2495
46 2495
48 2495
49 2495
50 2495
51 249...

input:

2
5000 3757
1 2495
2 2495
3 2495
4 2495
7 2495
9 2495
10 2495
12 2495
13 2495
14 2495
15 2495
18 2495
19 2495
20 2495
21 2495
22 2495
25 2495
26 2495
27 2495
29 2495
30 2495
31 2495
32 2495
33 2495
35 2495
37 2495
38 2495
39 2495
40 2495
41 2495
43 2495
45 2495
46 2495
48 2495
49 2495
50 2495
51 249...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
2495

Test #4:

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

input:

3
1560

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1560 1
1560 2
1560 3
1560 4
1560 5
1560 6
1560 7
1560 8
1560 9
1560 10
1560 11
1560 12
1560 13
1560 14
1560 15
1560 16
1560 17
1560 18
1560 19
1560 20
1560 21
1560 ...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1560 1
1560 2
1560 3
1560 4
1560 5
1560 6
1560 7
1560 8
1560 9
1560 10
1560 11
1560 12
1560 13
1560 14
1560 15
1560 16
1560 17
1560 18
1560 19
1560 20
1560 21
1560 ...

output:

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

input:

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

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1560

Test #5:

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

input:

3
3594

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
3594 1
3594 2
3594 3
3594 4
3594 5
3594 6
3594 7
3594 8
3594 9
3594 10
3594 11
3594 12
3594 13
3594 14
3594 15
3594 16
3594 17
3594 18
3594 19
3594 20
3594 21
3594 ...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
3594 1
3594 2
3594 3
3594 4
3594 5
3594 6
3594 7
3594 8
3594 9
3594 10
3594 11
3594 12
3594 13
3594 14
3594 15
3594 16
3594 17
3594 18
3594 19
3594 20
3594 21
3594 ...

output:

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

input:

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

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
3594

Test #6:

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

input:

3
1750

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1750 1
1750 2
1750 3
1750 4
1750 5
1750 6
1750 7
1750 8
1750 9
1750 10
1750 11
1750 12
1750 13
1750 14
1750 15
1750 16
1750 17
1750 18
1750 19
1750 20
1750 21
1750 ...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
1750 1
1750 2
1750 3
1750 4
1750 5
1750 6
1750 7
1750 8
1750 9
1750 10
1750 11
1750 12
1750 13
1750 14
1750 15
1750 16
1750 17
1750 18
1750 19
1750 20
1750 21
1750 ...

output:

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

input:

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

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1750

Test #7:

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

input:

5
4878

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
4878 1
4878 2
4878 3
4878 4
4878 5
4878 6
4878 7
4878 8
4878 9
4878 10
4878 11
4878 12
4878 13
4878 14
4878 15
4878 16
4878 17
4878 18
4878 19
4878 20
4878 21
4878 ...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
4878 1
4878 2
4878 3
4878 4
4878 5
4878 6
4878 7
4878 8
4878 9
4878 10
4878 11
4878 12
4878 13
4878 14
4878 15
4878 16
4878 17
4878 18
4878 19
4878 20
4878 21
4878 ...

output:

6
5000 4998
2 4878
3 4878
4 4878
5 4878
6 4878
7 4878
8 4878
9 4878
10 4878
11 4878
12 4878
13 4878
14 4878
15 4878
16 4878
17 4878
18 4878
19 4878
20 4878
21 4878
22 4878
23 4878
24 4878
25 4878
26 4878
27 4878
28 4878
29 4878
30 4878
31 4878
32 4878
33 4878
34 4878
35 4878
36 4878
37 4878
38 4878
...

input:

6
5000 4998
2 4878
3 4878
4 4878
5 4878
6 4878
7 4878
8 4878
9 4878
10 4878
11 4878
12 4878
13 4878
14 4878
15 4878
16 4878
17 4878
18 4878
19 4878
20 4878
21 4878
22 4878
23 4878
24 4878
25 4878
26 4878
27 4878
28 4878
29 4878
30 4878
31 4878
32 4878
33 4878
34 4878
35 4878
36 4878
37 4878
38 4878
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4878

Test #8:

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

input:

5
1223

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
1223 1
1223 2
1223 3
1223 4
1223 5
1223 6
1223 7
1223 8
1223 9
1223 10
1223 11
1223 12
1223 13
1223 14
1223 15
1223 16
1223 17
1223 18
1223 19
1223 20
1223 21
1223 ...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
1223 1
1223 2
1223 3
1223 4
1223 5
1223 6
1223 7
1223 8
1223 9
1223 10
1223 11
1223 12
1223 13
1223 14
1223 15
1223 16
1223 17
1223 18
1223 19
1223 20
1223 21
1223 ...

output:

6
5000 4998
2 1223
3 1223
4 1223
5 1223
6 1223
7 1223
8 1223
9 1223
10 1223
11 1223
12 1223
13 1223
14 1223
15 1223
16 1223
17 1223
18 1223
19 1223
20 1223
21 1223
22 1223
23 1223
24 1223
25 1223
26 1223
27 1223
28 1223
29 1223
30 1223
31 1223
32 1223
33 1223
34 1223
35 1223
36 1223
37 1223
38 1223
...

input:

6
5000 4998
2 1223
3 1223
4 1223
5 1223
6 1223
7 1223
8 1223
9 1223
10 1223
11 1223
12 1223
13 1223
14 1223
15 1223
16 1223
17 1223
18 1223
19 1223
20 1223
21 1223
22 1223
23 1223
24 1223
25 1223
26 1223
27 1223
28 1223
29 1223
30 1223
31 1223
32 1223
33 1223
34 1223
35 1223
36 1223
37 1223
38 1223
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1223

Test #9:

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

input:

5
648

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
648 1
648 2
648 3
648 4
648 5
648 6
648 7
648 8
648 9
648 10
648 11
648 12
648 13
648 14
648 15
648 16
648 17
648 18
648 19
648 20
648 21
648 22
648 23
648 24
648 2...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
648 1
648 2
648 3
648 4
648 5
648 6
648 7
648 8
648 9
648 10
648 11
648 12
648 13
648 14
648 15
648 16
648 17
648 18
648 19
648 20
648 21
648 22
648 23
648 24
648 2...

output:

6
5000 4998
2 648
3 648
4 648
5 648
6 648
7 648
8 648
9 648
10 648
11 648
12 648
13 648
14 648
15 648
16 648
17 648
18 648
19 648
20 648
21 648
22 648
23 648
24 648
25 648
26 648
27 648
28 648
29 648
30 648
31 648
32 648
33 648
34 648
35 648
36 648
37 648
38 648
39 648
40 648
41 648
42 648
43 648
44...

input:

6
5000 4998
2 648
3 648
4 648
5 648
6 648
7 648
8 648
9 648
10 648
11 648
12 648
13 648
14 648
15 648
16 648
17 648
18 648
19 648
20 648
21 648
22 648
23 648
24 648
25 648
26 648
27 648
28 648
29 648
30 648
31 648
32 648
33 648
34 648
35 648
36 648
37 648
38 648
39 648
40 648
41 648
42 648
43 648
44...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
648

Test #10:

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

input:

7
4475

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
4475 1
4475 2
4475 3
4475 4
4475 5
4475 6
4475 7
4475 8
4475 9
4475 10
4475 11
4475 12
4475 13
4475 14
4475 15
4475 16
4475 17
4475 18
4475 19
4475 20
4475 21
4475 ...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
4475 1
4475 2
4475 3
4475 4
4475 5
4475 6
4475 7
4475 8
4475 9
4475 10
4475 11
4475 12
4475 13
4475 14
4475 15
4475 16
4475 17
4475 18
4475 19
4475 20
4475 21
4475 ...

output:

8
5000 2500
1 4475
3 4475
4 4475
5 4475
7 4475
9 4475
10 4475
12 4475
14 4475
16 4475
18 4475
19 4475
20 4475
25 4475
26 4475
31 4475
32 4475
33 4475
36 4475
37 4475
38 4475
39 4475
40 4475
42 4475
43 4475
49 4475
56 4475
57 4475
58 4475
60 4475
62 4475
63 4475
64 4475
68 4475
69 4475
71 4475
76 447...

input:

8
5000 2500
1 4475
3 4475
4 4475
5 4475
7 4475
9 4475
10 4475
12 4475
14 4475
16 4475
18 4475
19 4475
20 4475
25 4475
26 4475
31 4475
32 4475
33 4475
36 4475
37 4475
38 4475
39 4475
40 4475
42 4475
43 4475
49 4475
56 4475
57 4475
58 4475
60 4475
62 4475
63 4475
64 4475
68 4475
69 4475
71 4475
76 447...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4475

Test #11:

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

input:

7
4240

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
4240 1
4240 2
4240 3
4240 4
4240 5
4240 6
4240 7
4240 8
4240 9
4240 10
4240 11
4240 12
4240 13
4240 14
4240 15
4240 16
4240 17
4240 18
4240 19
4240 20
4240 21
4240 ...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
4240 1
4240 2
4240 3
4240 4
4240 5
4240 6
4240 7
4240 8
4240 9
4240 10
4240 11
4240 12
4240 13
4240 14
4240 15
4240 16
4240 17
4240 18
4240 19
4240 20
4240 21
4240 ...

output:

8
5000 2500
1 4240
3 4240
4 4240
5 4240
7 4240
9 4240
10 4240
12 4240
14 4240
16 4240
18 4240
19 4240
20 4240
25 4240
26 4240
31 4240
32 4240
33 4240
36 4240
37 4240
38 4240
39 4240
40 4240
42 4240
43 4240
49 4240
56 4240
57 4240
58 4240
60 4240
62 4240
63 4240
64 4240
68 4240
69 4240
71 4240
76 424...

input:

8
5000 2500
1 4240
3 4240
4 4240
5 4240
7 4240
9 4240
10 4240
12 4240
14 4240
16 4240
18 4240
19 4240
20 4240
25 4240
26 4240
31 4240
32 4240
33 4240
36 4240
37 4240
38 4240
39 4240
40 4240
42 4240
43 4240
49 4240
56 4240
57 4240
58 4240
60 4240
62 4240
63 4240
64 4240
68 4240
69 4240
71 4240
76 424...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4240

Test #12:

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

input:

7
1291

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
1291 1
1291 2
1291 3
1291 4
1291 5
1291 6
1291 7
1291 8
1291 9
1291 10
1291 11
1291 12
1291 13
1291 14
1291 15
1291 16
1291 17
1291 18
1291 19
1291 20
1291 21
1291 ...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
1291 1
1291 2
1291 3
1291 4
1291 5
1291 6
1291 7
1291 8
1291 9
1291 10
1291 11
1291 12
1291 13
1291 14
1291 15
1291 16
1291 17
1291 18
1291 19
1291 20
1291 21
1291 ...

output:

8
5000 2500
1 1291
3 1291
4 1291
5 1291
7 1291
9 1291
10 1291
12 1291
14 1291
16 1291
18 1291
19 1291
20 1291
25 1291
26 1291
31 1291
32 1291
33 1291
36 1291
37 1291
38 1291
39 1291
40 1291
42 1291
43 1291
49 1291
56 1291
57 1291
58 1291
60 1291
62 1291
63 1291
64 1291
68 1291
69 1291
71 1291
76 129...

input:

8
5000 2500
1 1291
3 1291
4 1291
5 1291
7 1291
9 1291
10 1291
12 1291
14 1291
16 1291
18 1291
19 1291
20 1291
25 1291
26 1291
31 1291
32 1291
33 1291
36 1291
37 1291
38 1291
39 1291
40 1291
42 1291
43 1291
49 1291
56 1291
57 1291
58 1291
60 1291
62 1291
63 1291
64 1291
68 1291
69 1291
71 1291
76 129...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1291

Subtask #2:

score: 0
Wrong Answer

Test #13:

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

input:

1
17476204

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2489 2663
1780 924
4458 3620
232 775
4106 3370
4523 4768
2614 114
4342 4189
2461 3673
3079 1925
1587 3223
801 1416
3708 2621
3494 3380
3692 4308
2647 2935
2051 2533...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2489 2663
1780 924
4458 3620
232 775
4106 3370
4523 4768
2614 114
4342 4189
2461 3673
3079 1925
1587 3223
801 1416
3708 2621
3494 3380
3692 4308
2647 2935
2051 2533...

output:

2
5000 3757
1 1095
3 1382
5 941
6 237
7 2406
8 4284
9 1654
11 45
12 707
13 1578
14 2285
15 4189
16 3659
17 489
19 612
22 1955
23 1382
25 1429
26 2583
27 1382
28 2228
30 2621
31 237
33 3223
35 1217
36 489
37 1416
38 237
42 554
43 337
44 811
45 127
45 306
45 624
45 981
45 1235
45 1422
45 1454
45 1466
...

input:

2
5000 3757
1 1095
3 1382
5 941
6 237
7 2406
8 4284
9 1654
11 45
12 707
13 1578
14 2285
15 4189
16 3659
17 489
19 612
22 1955
23 1382
25 1429
26 2583
27 1382
28 2228
30 2621
31 237
33 3223
35 1217
36 489
37 1416
38 237
42 554
43 337
44 811
45 127
45 306
45 624
45 981
45 1235
45 1422
45 1454
45 1466
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
17476204

Test #14:

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

input:

1
11926600

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2489 2663
1780 924
4458 3620
232 4871
4106 3370
4523 4768
2614 114
4342 4189
2461 3673
3079 3772
1587 3223
801 1416
3708 2621
3494 3380
3692 98
2647 3892
2051 2533
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2489 2663
1780 924
4458 3620
232 4871
4106 3370
4523 4768
2614 114
4342 4189
2461 3673
3079 3772
1587 3223
801 1416
3708 2621
3494 3380
3692 98
2647 3892
2051 2533
...

output:

2
5000 3757
1 847
3 1382
5 4102
6 237
7 1028
8 4284
9 1654
11 45
12 707
13 838
14 2285
15 4189
16 236
17 489
19 612
22 1955
23 1382
25 1429
26 2583
27 1382
28 2228
30 2621
31 237
33 3223
35 1217
36 489
37 1416
38 237
42 554
43 337
44 811
45 127
45 306
45 624
45 981
45 1235
45 1422
45 1454
45 1466
45...

input:

2
5000 3757
1 847
3 1382
5 4102
6 237
7 1028
8 4284
9 1654
11 45
12 707
13 838
14 2285
15 4189
16 236
17 489
19 612
22 1955
23 1382
25 1429
26 2583
27 1382
28 2228
30 2621
31 237
33 3223
35 1217
36 489
37 1416
38 237
42 554
43 337
44 811
45 127
45 306
45 624
45 981
45 1235
45 1422
45 1454
45 1466
45...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
11926600

Test #15:

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

input:

1
16602378

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2489 2663
1780 924
4458 3620
232 497
4106 3370
4523 4768
2614 114
4342 4189
2461 3673
3079 4189
1587 3223
801 1416
3708 2621
3494 3380
3692 3832
2647 689
2051 2533
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
2489 2663
1780 924
4458 3620
232 497
4106 3370
4523 4768
2614 114
4342 4189
2461 3673
3079 4189
1587 3223
801 1416
3708 2621
3494 3380
3692 3832
2647 689
2051 2533
...

output:

2
5000 3757
1 1506
3 1382
5 4581
6 237
7 2811
8 4284
9 1654
11 45
12 707
13 2811
14 2285
15 4189
16 3673
17 489
19 612
22 1955
23 1382
25 1429
26 2583
27 1382
28 2228
30 2621
31 237
33 3223
35 1217
36 489
37 1416
38 237
42 554
43 337
44 811
45 127
45 306
45 624
45 981
45 1235
45 1422
45 1454
45 1466...

input:

2
5000 3757
1 1506
3 1382
5 4581
6 237
7 2811
8 4284
9 1654
11 45
12 707
13 2811
14 2285
15 4189
16 3673
17 489
19 612
22 1955
23 1382
25 1429
26 2583
27 1382
28 2228
30 2621
31 237
33 3223
35 1217
36 489
37 1416
38 237
42 554
43 337
44 811
45 127
45 306
45 624
45 981
45 1235
45 1422
45 1454
45 1466...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
16602378

Test #16:

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

input:

3
13129243

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
4328 1267
3536 2366
2508 541
137 1382
1592 1652
1535 1652
1015 75
3589 2304
1344 1477
4413 3783
2092 45
4887 3345
793 1456
1056 3406
2071 3673
1706 163
2764 4571
40...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
4328 1267
3536 2366
2508 541
137 1382
1592 1652
1535 1652
1015 75
3589 2304
1344 1477
4413 3783
2092 45
4887 3345
793 1456
1056 3406
2071 3673
1706 163
2764 4571
40...

output:

4
5000 2500
1 4265
2 3783
5 904
7 1327
8 4517
9 2244
12 3716
13 1506
16 1047
18 4514
21 1709
22 830
35 3659
40 1344
44 4345
45 149
45 158
45 189
45 298
45 353
45 377
45 488
45 522
45 555
45 568
45 621
45 922
45 997
45 1122
45 1182
45 1210
45 1406
45 1448
45 1456
45 1495
45 1547
45 1552
45 1622
45 16...

input:

4
5000 2500
1 4265
2 3783
5 904
7 1327
8 4517
9 2244
12 3716
13 1506
16 1047
18 4514
21 1709
22 830
35 3659
40 1344
44 4345
45 149
45 158
45 189
45 298
45 353
45 377
45 488
45 522
45 555
45 568
45 621
45 922
45 997
45 1122
45 1182
45 1210
45 1406
45 1448
45 1456
45 1495
45 1547
45 1552
45 1622
45 16...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
13129243

Test #17:

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

input:

3
7892141

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
4328 1267
3536 2674
2508 2554
137 407
1592 1737
1535 1737
1015 75
3589 2304
1344 1477
4413 3783
2092 4265
4887 3995
793 1737
1056 3406
2071 554
1706 163
2764 4571
4...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
4328 1267
3536 2674
2508 2554
137 407
1592 1737
1535 1737
1015 75
3589 2304
1344 1477
4413 3783
2092 4265
4887 3995
793 1737
1056 3406
2071 554
1706 163
2764 4571
4...

output:

4
5000 2500
1 2484
2 3783
4 2554
5 4019
8 4517
9 2244
10 564
12 3716
14 3652
21 1709
22 830
25 2004
26 3296
33 4306
35 3659
37 446
39 75
40 409
44 4345
46 3652
51 564
53 2554
54 75
55 3406
57 4517
58 1249
59 4509
60 3406
61 4345
66 2244
67 2892
68 3366
70 2892
71 709
73 3406
74 4517
75 112
75 451
75...

input:

4
5000 2500
1 2484
2 3783
4 2554
5 4019
8 4517
9 2244
10 564
12 3716
14 3652
21 1709
22 830
25 2004
26 3296
33 4306
35 3659
37 446
39 75
40 409
44 4345
46 3652
51 564
53 2554
54 75
55 3406
57 4517
58 1249
59 4509
60 3406
61 4345
66 2244
67 2892
68 3366
70 2892
71 709
73 3406
74 4517
75 112
75 451
75...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
7892141

Test #18:

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

input:

3
21314775

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
4328 1267
3536 2366
2508 541
137 1382
1592 1652
1535 1652
1015 75
3589 2304
1344 1477
4413 3783
2092 45
4887 3345
793 1456
1056 3406
2071 3673
1706 163
2764 4571
40...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
4328 1267
3536 2366
2508 541
137 1382
1592 1652
1535 1652
1015 75
3589 2304
1344 1477
4413 3783
2092 45
4887 3345
793 1456
1056 3406
2071 3673
1706 163
2764 4571
40...

output:

4
5000 2500
1 352
2 3783
5 1119
7 1820
8 4517
9 2244
12 3716
13 4937
16 1938
18 1217
21 1709
22 830
35 3659
40 1701
44 4345
52 570
53 1152
55 3406
57 4517
58 1249
59 4509
60 3406
61 4345
62 1573
65 4757
66 2244
67 2892
68 450
70 2892
73 3406
74 4517
77 2304
78 904
79 2892
80 3949
82 358
84 3406
88 3...

input:

4
5000 2500
1 352
2 3783
5 1119
7 1820
8 4517
9 2244
12 3716
13 4937
16 1938
18 1217
21 1709
22 830
35 3659
40 1701
44 4345
52 570
53 1152
55 3406
57 4517
58 1249
59 4509
60 3406
61 4345
62 1573
65 4757
66 2244
67 2892
68 450
70 2892
73 3406
74 4517
77 2304
78 904
79 2892
80 3949
82 358
84 3406
88 3...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
21314775

Test #19:

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

input:

5
5559540

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
4328 1267
3536 4140
2508 4533
137 407
1592 1737
1535 1737
1015 75
3589 2304
1344 1477
4413 3783
2092 4265
4887 3995
793 4753
1056 3406
2071 554
1706 163
2764 4571
4...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
4328 1267
3536 4140
2508 4533
137 407
1592 1737
1535 1737
1015 75
3589 2304
1344 1477
4413 3783
2092 4265
4887 3995
793 4753
1056 3406
2071 554
1706 163
2764 4571
4...

output:

6
5000 2551
1 746
2 3783
4 2554
5 4439
6 146
7 3101
9 2244
14 3652
15 4189
16 352
18 4359
20 3100
21 1709
22 830
24 3100
25 2004
26 3296
28 2228
29 3100
31 146
32 2620
34 2228
37 446
38 146
39 75
41 298
42 554
45 1456
46 3652
47 298
50 3100
52 3318
54 75
56 4388
62 3318
63 2228
64 3995
66 2244
67 28...

input:

6
5000 2551
1 746
2 3783
4 2554
5 4439
6 146
7 3101
9 2244
14 3652
15 4189
16 352
18 4359
20 3100
21 1709
22 830
24 3100
25 2004
26 3296
28 2228
29 3100
31 146
32 2620
34 2228
37 446
38 146
39 75
41 298
42 554
45 1456
46 3652
47 298
50 3100
52 3318
54 75
56 4388
62 3318
63 2228
64 3995
66 2244
67 28...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
5559540

Test #20:

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

input:

5
9424319

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
4328 1267
3536 3995
2508 2091
137 407
1592 1737
1535 1737
1015 75
3589 2304
1344 1477
4413 3783
2092 4265
4887 3995
793 1047
1056 3406
2071 554
1706 163
2764 4571
4...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
4328 1267
3536 3995
2508 2091
137 407
1592 1737
1535 1737
1015 75
3589 2304
1344 1477
4413 3783
2092 4265
4887 3995
793 1047
1056 3406
2071 554
1706 163
2764 4571
4...

output:

6
5000 2500
1 904
3 1382
5 381
7 210
8 4517
10 564
11 45
12 3716
16 2546
17 670
18 941
19 612
23 1382
27 1382
30 2621
33 4306
35 3659
36 670
40 2684
43 4417
44 4345
45 298
45 306
45 486
45 624
45 653
45 694
45 829
45 958
45 999
45 1235
45 1422
45 1454
45 1466
45 1621
45 1712
45 1876
45 1882
45 1888
...

input:

6
5000 2500
1 904
3 1382
5 381
7 210
8 4517
10 564
11 45
12 3716
16 2546
17 670
18 941
19 612
23 1382
27 1382
30 2621
33 4306
35 3659
36 670
40 2684
43 4417
44 4345
45 298
45 306
45 486
45 624
45 653
45 694
45 829
45 958
45 999
45 1235
45 1422
45 1454
45 1466
45 1621
45 1712
45 1876
45 1882
45 1888
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
9424319

Test #21:

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

input:

5
10955780

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
4328 1267
3536 612
2508 1759
137 407
1592 1737
1535 1737
1015 75
3589 2304
1344 1477
4413 3783
2092 4265
4887 3995
793 1340
1056 3406
2071 554
1706 163
2764 4571
40...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
4328 1267
3536 612
2508 1759
137 407
1592 1737
1535 1737
1015 75
3589 2304
1344 1477
4413 3783
2092 4265
4887 3995
793 1340
1056 3406
2071 554
1706 163
2764 4571
40...

output:

6
5000 2523
2 3783
4 2554
5 4581
6 146
9 2244
14 3652
15 4189
16 3313
20 3100
21 1709
22 830
24 3100
25 2004
26 3296
28 2228
29 3100
31 146
32 2620
34 2228
37 446
38 146
39 75
41 298
42 554
45 1456
46 3652
47 298
50 3100
52 1673
53 3380
54 75
56 4388
62 1673
63 2228
64 3995
66 2244
67 2892
68 1557
6...

input:

6
5000 2523
2 3783
4 2554
5 4581
6 146
9 2244
14 3652
15 4189
16 3313
20 3100
21 1709
22 830
24 3100
25 2004
26 3296
28 2228
29 3100
31 146
32 2620
34 2228
37 446
38 146
39 75
41 298
42 554
45 1456
46 3652
47 298
50 3100
52 1673
53 3380
54 75
56 4388
62 1673
63 2228
64 3995
66 2244
67 2892
68 1557
6...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
10955780

Test #22:

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

input:

7
19938721

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
4328 1267
3536 2366
2508 541
137 1382
1592 1652
1535 1652
1015 75
3589 2304
1344 1477
4413 3783
2092 45
4887 3345
793 1456
1056 3406
2071 3673
1706 163
2764 4571
40...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
4328 1267
3536 2366
2508 541
137 1382
1592 1652
1535 1652
1015 75
3589 2304
1344 1477
4413 3783
2092 45
4887 3345
793 1456
1056 3406
2071 3673
1706 163
2764 4571
40...

output:

8
5000 2500
2 3783
6 146
8 4517
9 2244
10 564
11 3380
12 3716
14 3652
22 830
25 2004
26 3296
27 2533
28 4388
31 146
33 4306
34 4388
37 446
38 146
39 75
42 3673
44 4345
45 149
45 158
45 189
45 353
45 377
45 488
45 522
45 555
45 568
45 621
45 922
45 997
45 1122
45 1182
45 1210
45 1406
45 1448
45 1495
...

input:

8
5000 2500
2 3783
6 146
8 4517
9 2244
10 564
11 3380
12 3716
14 3652
22 830
25 2004
26 3296
27 2533
28 4388
31 146
33 4306
34 4388
37 446
38 146
39 75
42 3673
44 4345
45 149
45 158
45 189
45 353
45 377
45 488
45 522
45 555
45 568
45 621
45 922
45 997
45 1122
45 1182
45 1210
45 1406
45 1448
45 1495
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
7488

Subtask #3:

score: 0
Wrong Answer

Test #25:

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

input:

1
355365355024496523

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
4328 1267
3536 2357
2508 4937
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 4992
1056 3406
2071 4940
1706 163
2764 4571...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
4328 1267
3536 2357
2508 4937
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 4992
1056 3406
2071 4940
1706 163
2764 4571...

output:

2
5000 4165
1 1304
2 3783
3 3345
5 1820
6 146
7 847
9 2244
10 564
11 114
12 3716
13 2620
14 3652
15 3513
16 899
17 670
18 2470
19 2554
20 298
21 1709
22 830
23 3345
24 298
26 3296
27 3345
28 1652
29 298
30 3673
31 146
32 3100
33 4306
34 1652
35 3659
36 670
37 446
38 146
39 75
41 3620
44 4345
45 298
...

input:

2
5000 4165
1 1304
2 3783
3 3345
5 1820
6 146
7 847
9 2244
10 564
11 114
12 3716
13 2620
14 3652
15 3513
16 899
17 670
18 2470
19 2554
20 298
21 1709
22 830
23 3345
24 298
26 3296
27 3345
28 1652
29 298
30 3673
31 146
32 3100
33 4306
34 1652
35 3659
36 670
37 446
38 146
39 75
41 3620
44 4345
45 298
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
355365355024496523

Test #26:

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

input:

1
727827999106414164

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
4328 1267
3536 4886
2508 1304
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 427
1056 3406
2071 4940
1706 163
2764 4571
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
4328 1267
3536 4886
2508 1304
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 427
1056 3406
2071 4940
1706 163
2764 4571
...

output:

2
5000 4165
1 4418
2 3783
3 3345
5 3345
6 146
7 410
9 2244
10 564
11 114
12 3716
13 875
14 3652
15 3513
16 2665
17 670
18 3673
19 2554
20 298
21 1709
22 830
23 3345
24 298
26 3296
27 3345
28 1652
29 298
30 3673
31 146
32 3100
33 4306
34 1652
35 3659
36 670
37 446
38 146
39 75
41 3620
44 4345
45 298
...

input:

2
5000 4165
1 4418
2 3783
3 3345
5 3345
6 146
7 410
9 2244
10 564
11 114
12 3716
13 875
14 3652
15 3513
16 2665
17 670
18 3673
19 2554
20 298
21 1709
22 830
23 3345
24 298
26 3296
27 3345
28 1652
29 298
30 3673
31 146
32 3100
33 4306
34 1652
35 3659
36 670
37 446
38 146
39 75
41 3620
44 4345
45 298
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
727827999106414164

Test #27:

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

input:

1
656410143989222955

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
4328 1267
3536 570
2508 1701
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 4019
1056 3406
2071 4940
1706 163
2764 4571
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
4328 1267
3536 570
2508 1701
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 4019
1056 3406
2071 4940
1706 163
2764 4571
...

output:

2
5000 4165
1 298
2 3783
3 3345
5 3664
6 146
7 3103
9 2244
10 564
11 114
12 3716
13 3664
14 3652
15 3513
16 1234
17 670
18 3960
19 2554
20 298
21 1709
22 830
23 3345
24 298
26 3296
27 3345
28 1652
29 298
30 3673
31 146
32 3100
33 4306
34 1652
35 3659
36 670
37 446
38 146
39 75
41 3620
44 4345
45 52
...

input:

2
5000 4165
1 298
2 3783
3 3345
5 3664
6 146
7 3103
9 2244
10 564
11 114
12 3716
13 3664
14 3652
15 3513
16 1234
17 670
18 3960
19 2554
20 298
21 1709
22 830
23 3345
24 298
26 3296
27 3345
28 1652
29 298
30 3673
31 146
32 3100
33 4306
34 1652
35 3659
36 670
37 446
38 146
39 75
41 3620
44 4345
45 52
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
656410143989222955

Test #28:

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

input:

1
410366615149657534

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
4328 1267
3536 4786
2508 3167
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 746
1056 3406
2071 4940
1706 163
2764 4571
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
4328 1267
3536 4786
2508 3167
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 746
1056 3406
2071 4940
1706 163
2764 4571
...

output:

2
5000 4165
1 2684
2 3783
3 3345
5 2811
6 146
7 3364
9 2244
10 564
11 114
12 3716
13 4418
14 3652
15 3513
16 399
17 670
18 4330
19 2554
20 298
21 1709
22 830
23 3345
24 298
26 3296
27 3345
28 1652
29 298
30 3673
31 146
32 3100
33 4306
34 1652
35 3659
36 670
37 446
38 146
39 75
41 3620
44 4345
45 298...

input:

2
5000 4165
1 2684
2 3783
3 3345
5 2811
6 146
7 3364
9 2244
10 564
11 114
12 3716
13 4418
14 3652
15 3513
16 399
17 670
18 4330
19 2554
20 298
21 1709
22 830
23 3345
24 298
26 3296
27 3345
28 1652
29 298
30 3673
31 146
32 3100
33 4306
34 1652
35 3659
36 670
37 446
38 146
39 75
41 3620
44 4345
45 298...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
410366615149657534

Test #29:

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

input:

1
298090682780948428

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
4328 1267
3536 1296
2508 899
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 3687
1056 3406
2071 4940
1706 163
2764 4571
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
5000
4328 1267
3536 1296
2508 899
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 3687
1056 3406
2071 4940
1706 163
2764 4571
...

output:

2
5000 4165
1 2357
2 3783
3 3345
5 2484
6 146
7 904
9 2244
10 564
11 114
12 3716
13 2627
14 3652
15 3513
16 4359
17 670
18 2160
19 2554
20 298
21 1709
22 830
23 3345
24 298
26 3296
27 3345
28 1652
29 298
30 3673
31 146
32 3100
33 4306
34 1652
35 3659
36 670
37 446
38 146
39 75
41 3620
44 4345
45 132...

input:

2
5000 4165
1 2357
2 3783
3 3345
5 2484
6 146
7 904
9 2244
10 564
11 114
12 3716
13 2627
14 3652
15 3513
16 4359
17 670
18 2160
19 2554
20 298
21 1709
22 830
23 3345
24 298
26 3296
27 3345
28 1652
29 298
30 3673
31 146
32 3100
33 4306
34 1652
35 3659
36 670
37 446
38 146
39 75
41 3620
44 4345
45 132...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
298090682780948428

Test #30:

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

input:

3
969441916331132577

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
4328 1267
3536 4188
2508 410
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 1982
1056 3406
2071 4940
1706 163
2764 4571
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
4328 1267
3536 4188
2508 410
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 1982
1056 3406
2071 4940
1706 163
2764 4571
...

output:

4
5000 2500
1 4199
2 3783
5 2484
8 4517
9 2244
10 564
12 3716
13 1494
16 3961
18 2160
21 1709
22 830
33 4306
35 3659
37 446
39 75
40 2811
44 4345
45 1456
45 1892
45 2249
45 2953
45 3744
45 4415
45 4612
45 4873
45 4931
48 1382
51 564
52 1651
53 570
54 75
55 3406
57 4517
58 1249
59 4509
60 3406
61 434...

input:

4
5000 2500
1 4199
2 3783
5 2484
8 4517
9 2244
10 564
12 3716
13 1494
16 3961
18 2160
21 1709
22 830
33 4306
35 3659
37 446
39 75
40 2811
44 4345
45 1456
45 1892
45 2249
45 2953
45 3744
45 4415
45 4612
45 4873
45 4931
48 1382
51 564
52 1651
53 570
54 75
55 3406
57 4517
58 1249
59 4509
60 3406
61 434...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
969441916331132577

Test #31:

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

input:

3
929489812741933634

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
4328 1267
3536 2621
2508 3620
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 2533
1056 3406
2071 4940
1706 163
2764 4571...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
4328 1267
3536 2621
2508 3620
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 2533
1056 3406
2071 4940
1706 163
2764 4571...

output:

4
5000 2500
1 3487
2 3783
5 4180
7 4992
8 4517
9 2244
10 564
12 3716
13 1047
16 3086
18 532
19 2554
21 1709
22 830
35 3659
37 446
39 75
44 4345
45 1456
45 4612
51 564
53 4184
54 75
55 3406
57 4517
58 1249
59 4509
60 3406
61 4345
62 1217
65 3367
66 2244
67 2892
70 2892
71 709
73 3406
74 4517
75 112
7...

input:

4
5000 2500
1 3487
2 3783
5 4180
7 4992
8 4517
9 2244
10 564
12 3716
13 1047
16 3086
18 532
19 2554
21 1709
22 830
35 3659
37 446
39 75
44 4345
45 1456
45 4612
51 564
53 4184
54 75
55 3406
57 4517
58 1249
59 4509
60 3406
61 4345
62 1217
65 3367
66 2244
67 2892
70 2892
71 709
73 3406
74 4517
75 112
7...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
929489812741933634

Test #32:

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

input:

3
144032041325838295

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
4328 1267
3536 2621
2508 3620
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 2533
1056 3406
2071 4940
1706 163
2764 4571...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
4328 1267
3536 2621
2508 3620
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 2533
1056 3406
2071 4940
1706 163
2764 4571...

output:

4
5000 2500
1 4108
2 3783
5 4917
7 3304
8 4517
9 2244
10 564
12 3716
13 532
16 3364
18 1503
19 2554
21 1709
22 830
35 3659
37 446
40 4670
44 4345
45 1105
45 1456
45 1843
45 2152
45 2432
45 2890
45 3682
45 4017
45 4054
45 4612
51 564
52 875
53 3805
54 75
55 3406
57 4517
58 1249
59 4509
60 3406
61 434...

input:

4
5000 2500
1 4108
2 3783
5 4917
7 3304
8 4517
9 2244
10 564
12 3716
13 532
16 3364
18 1503
19 2554
21 1709
22 830
35 3659
37 446
40 4670
44 4345
45 1105
45 1456
45 1843
45 2152
45 2432
45 2890
45 3682
45 4017
45 4054
45 4612
51 564
52 875
53 3805
54 75
55 3406
57 4517
58 1249
59 4509
60 3406
61 434...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
144032041325838295

Test #33:

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

input:

3
832110946250826180

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
4328 1267
3536 2621
2508 3620
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 2533
1056 3406
2071 4940
1706 163
2764 4571...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
4328 1267
3536 2621
2508 3620
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 2533
1056 3406
2071 4940
1706 163
2764 4571...

output:

4
5000 2500
1 3318
2 3783
7 4019
8 4517
9 2244
10 564
12 3716
14 3652
21 1709
22 830
33 4306
35 3659
37 446
39 75
40 570
44 4345
45 719
45 1378
45 1456
45 1960
45 2246
45 2795
45 2932
45 3141
45 4612
46 3652
48 1382
51 564
52 2418
54 75
55 3406
57 4517
58 1249
59 4509
60 3406
61 4345
62 4870
65 2077...

input:

4
5000 2500
1 3318
2 3783
7 4019
8 4517
9 2244
10 564
12 3716
14 3652
21 1709
22 830
33 4306
35 3659
37 446
39 75
40 570
44 4345
45 719
45 1378
45 1456
45 1960
45 2246
45 2795
45 2932
45 3141
45 4612
46 3652
48 1382
51 564
52 2418
54 75
55 3406
57 4517
58 1249
59 4509
60 3406
61 4345
62 4870
65 2077...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
832110946250826180

Test #34:

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

input:

3
85728715707691821

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
4328 1267
3536 4612
2508 1862
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 1304
1056 3406
2071 4940
1706 163
2764 4571...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
5000
4328 1267
3536 4612
2508 1862
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 1304
1056 3406
2071 4940
1706 163
2764 4571...

output:

4
5000 2500
1 2658
2 3783
5 2504
7 3487
8 4517
9 2244
10 564
12 3716
13 1651
18 4373
21 1709
22 830
35 3659
40 1651
44 4345
45 457
45 1452
45 1456
45 1570
45 1932
45 3137
45 3263
45 3440
45 3623
45 4612
51 564
52 2965
53 2091
55 3406
57 4517
58 1249
59 4509
60 3406
61 4345
62 2802
65 1427
66 2244
67...

input:

4
5000 2500
1 2658
2 3783
5 2504
7 3487
8 4517
9 2244
10 564
12 3716
13 1651
18 4373
21 1709
22 830
35 3659
40 1651
44 4345
45 457
45 1452
45 1456
45 1570
45 1932
45 3137
45 3263
45 3440
45 3623
45 4612
51 564
52 2965
53 2091
55 3406
57 4517
58 1249
59 4509
60 3406
61 4345
62 2802
65 1427
66 2244
67...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
85728715707691821

Test #35:

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

input:

5
777434612360931036

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
4328 1267
3536 3960
2508 918
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 3482
1056 3406
2071 4940
1706 163
2764 4571
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
4328 1267
3536 3960
2508 918
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 3482
1056 3406
2071 4940
1706 163
2764 4571
...

output:

6
5000 2590
3 3345
4 2621
8 4517
10 564
11 114
12 3716
13 3103
15 3513
16 2935
17 670
23 3345
27 3345
28 1652
33 4306
34 1652
35 3659
36 670
40 2811
43 4417
44 4345
45 203
45 232
45 298
45 907
45 1160
45 1244
45 1545
45 1813
45 1890
45 2423
45 2574
45 2903
45 2948
45 3133
45 4183
45 4202
45 4612
45 ...

input:

6
5000 2590
3 3345
4 2621
8 4517
10 564
11 114
12 3716
13 3103
15 3513
16 2935
17 670
23 3345
27 3345
28 1652
33 4306
34 1652
35 3659
36 670
40 2811
43 4417
44 4345
45 203
45 232
45 298
45 907
45 1160
45 1244
45 1545
45 1813
45 1890
45 2423
45 2574
45 2903
45 2948
45 3133
45 4183
45 4202
45 4612
45 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
777434612360931036

Test #36:

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

input:

5
705262511549880222

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
4328 1267
3536 2494
2508 2470
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 1820
1056 3406
2071 4940
1706 163
2764 4571...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
4328 1267
3536 2494
2508 2470
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 1820
1056 3406
2071 4940
1706 163
2764 4571...

output:

6
5000 2594
3 3345
4 2621
7 98
8 4517
10 564
11 114
12 3716
15 3513
16 4080
17 670
23 3345
27 3345
28 1652
33 4306
34 1652
35 3659
36 670
43 4417
44 4345
45 298
45 404
45 441
45 560
45 659
45 1259
45 1814
45 1865
45 1875
45 1963
45 2159
45 2862
45 3036
45 3165
45 4043
45 4136
45 4405
45 4612
45 4940...

input:

6
5000 2594
3 3345
4 2621
7 98
8 4517
10 564
11 114
12 3716
15 3513
16 4080
17 670
23 3345
27 3345
28 1652
33 4306
34 1652
35 3659
36 670
43 4417
44 4345
45 298
45 404
45 441
45 560
45 659
45 1259
45 1814
45 1865
45 1875
45 1963
45 2159
45 2862
45 3036
45 3165
45 4043
45 4136
45 4405
45 4612
45 4940...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
705262511549880222

Test #37:

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

input:

5
510318082834167951

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
4328 1267
3536 1090
2508 746
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 1234
1056 3406
2071 4940
1706 163
2764 4571
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
4328 1267
3536 1090
2508 746
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 1234
1056 3406
2071 4940
1706 163
2764 4571
...

output:

6
5000 2571
3 3345
4 2621
5 399
8 4517
10 564
11 114
12 3716
15 3513
17 670
23 3345
27 3345
28 1652
33 4306
34 1652
35 3659
36 670
40 1119
43 4417
44 4345
45 68
45 298
45 960
45 2003
45 3110
45 3333
45 4091
45 4165
45 4612
45 4876
45 4940
48 1382
51 564
55 3406
56 612
57 4517
58 1249
59 4509
60 3406...

input:

6
5000 2571
3 3345
4 2621
5 399
8 4517
10 564
11 114
12 3716
15 3513
17 670
23 3345
27 3345
28 1652
33 4306
34 1652
35 3659
36 670
40 1119
43 4417
44 4345
45 68
45 298
45 960
45 2003
45 3110
45 3333
45 4091
45 4165
45 4612
45 4876
45 4940
48 1382
51 564
55 3406
56 612
57 4517
58 1249
59 4509
60 3406...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
510318082834167951

Test #38:

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

input:

5
914858813253258744

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
4328 1267
3536 4189
2508 554
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 3995
1056 3406
2071 4940
1706 163
2764 4571
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
4328 1267
3536 4189
2508 554
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 3995
1056 3406
2071 4940
1706 163
2764 4571
...

output:

6
5000 2620
3 3345
4 2621
8 4517
10 564
11 114
12 3716
13 3033
15 3513
17 670
23 3345
27 3345
28 1652
33 4306
34 1652
35 3659
36 670
40 2357
43 4417
44 4345
45 298
45 721
45 813
45 1023
45 1440
45 1544
45 1767
45 3860
45 4612
45 4697
45 4940
48 1382
51 564
52 4757
53 260
55 3406
56 612
57 4517
58 12...

input:

6
5000 2620
3 3345
4 2621
8 4517
10 564
11 114
12 3716
13 3033
15 3513
17 670
23 3345
27 3345
28 1652
33 4306
34 1652
35 3659
36 670
40 2357
43 4417
44 4345
45 298
45 721
45 813
45 1023
45 1440
45 1544
45 1767
45 3860
45 4612
45 4697
45 4940
48 1382
51 564
52 4757
53 260
55 3406
56 612
57 4517
58 12...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
914858813253258744

Test #39:

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

input:

5
659635316746638238

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
4328 1267
3536 2418
2508 570
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 4102
1056 3406
2071 4940
1706 163
2764 4571
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
5
5000
4328 1267
3536 2418
2508 570
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 4102
1056 3406
2071 4940
1706 163
2764 4571
...

output:

6
5000 2617
3 3345
4 2621
7 4381
8 4517
10 564
11 114
12 3716
15 3513
17 670
18 4908
23 3345
27 3345
28 1652
33 4306
34 1652
35 3659
36 670
40 2674
43 4417
44 4345
45 298
45 459
45 973
45 1216
45 1375
45 1793
45 2441
45 3334
45 4455
45 4612
45 4940
48 1382
51 564
53 4108
55 3406
56 612
57 4517
58 12...

input:

6
5000 2617
3 3345
4 2621
7 4381
8 4517
10 564
11 114
12 3716
15 3513
17 670
18 4908
23 3345
27 3345
28 1652
33 4306
34 1652
35 3659
36 670
40 2674
43 4417
44 4345
45 298
45 459
45 973
45 1216
45 1375
45 1793
45 2441
45 3334
45 4455
45 4612
45 4940
48 1382
51 564
53 4108
55 3406
56 612
57 4517
58 12...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
659635316746638238

Test #40:

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

input:

7
858490260563149759

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
4328 1267
3536 4102
2508 4019
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 3790
1056 3406
2071 4940
1706 163
2764 4571...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
7
5000
4328 1267
3536 4102
2508 4019
137 3995
1592 1382
1535 1382
1015 75
3589 2304
1344 1477
4413 3783
2092 2620
4887 2674
793 3790
1056 3406
2071 4940
1706 163
2764 4571...

output:

8
5000 2500
2 3783
6 146
8 4517
9 2244
10 564
11 114
12 3716
14 3652
15 3513
17 670
22 830
25 2004
26 3296
31 146
33 4306
36 670
37 446
38 146
39 75
42 4940
43 4417
44 4345
46 3652
49 4189
51 564
54 75
55 3406
56 612
57 4517
58 1249
59 4509
60 3406
61 4345
66 2244
67 2892
69 1737
70 2892
71 709
72 2...

input:

8
5000 2500
2 3783
6 146
8 4517
9 2244
10 564
11 114
12 3716
14 3652
15 3513
17 670
22 830
25 2004
26 3296
31 146
33 4306
36 670
37 446
38 146
39 75
42 4940
43 4417
44 4345
46 3652
49 4189
51 564
54 75
55 3406
56 612
57 4517
58 1249
59 4509
60 3406
61 4345
66 2244
67 2892
69 1737
70 2892
71 709
72 2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
845149779885235968