QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#666166#8726. Magic Showhuazai6760 0ms1916kbC++172.0kb2024-10-22 16:53:542024-10-22 16:53:58

Judging History

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

  • [2024-10-22 16:53:58]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:1916kb
  • [2024-10-22 16:53:54]
  • 提交

Alice

#include<iostream>
#include<cstring>
#include<algorithm>
#include<vector>
#include<random>
#include "Alice.h"

using namespace std;

namespace
{
    const int N=62,M=80;
    typedef long long ll;
    mt19937 rd(1723211);
    int a[N*M+10];
    int fa[N*M+10][2];
    int rand(int l,int r)
    {
        return rd()%(r-l+1)+l;
    }
}

vector<pair<int,int> > Alice()
{
    vector<pair<int,int> > res;
    ll x=setN(N*M+2);
    int n=N*M+2;
    for(int i=1;i<=n;i++) a[i]=i;
    shuffle(a+1,a+n+1,rd);
    for(int i=0;i<N;i++)
    {
        for(int j=1;j<=M;j++)
        {
            int u=(N-1-i)*M+j;
            fa[u][1]=rand(u+1,n-1);
            fa[u][0]=rand(fa[u][1]+1,n);
            if(x>>i&1)
                res.push_back({a[u],a[fa[u][1]]});
            else
                res.push_back({a[u],a[fa[u][0]]});
        }
    }
    res.push_back({a[N*M+1],a[N*M+2]});
    shuffle(res.begin(),res.end(),rd);
    return res;
}

Bob

#include<iostream>
#include<cstring>
#include<algorithm>
#include<vector>
#include<random>
#include "Bob.h"

using namespace std;

namespace
{
    const int N=62,M=80;
    typedef long long ll;
    int fa[N*M+10][2];
    int f[N*M+10];
    mt19937 rd(1723211);
    int a[N*M+10],b[N*M+10];
    int rand(int l,int r)
    {
        return rd()%(r-l+1)+l;
    }
}

ll Bob(vector<pair<int,int> > V)
{
    int n=N*M+2;
    for(int i=1;i<=n;i++) a[i]=i;
    shuffle(a+1,a+n+1,rd);
    for(int i=1;i<=n;i++) b[a[i]]=i;
    for(int i=0;i<N;i++)
    {
        for(int j=1;j<=M;j++)
        {
            int u=(N-1-i)*M+j;
            fa[u][1]=rand(u+1,n-1);
            fa[u][0]=rand(fa[u][1]+1,n);
        }
    }
    for(auto[u,v]:V)
    {
        if(b[v]==fa[b[u]][1]) f[b[u]]=1;
    }
    ll res=0;
    for(int i=0;i<N;i++)
    {
        ll g=0;
        for(int j=1;j<=M;j++)
        {
            int u=(N-1-i)*M+j;
            g|=f[u];
        }
        res|=g<<i;
    }
    return res;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

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

input:

1
4005

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4962
2698 594
1944 4065
4647 2099
3716 3915
2103 175
3128 1622
969 345
3636 3604
4299 4842
190 3870
3074 2778
108 3960
3689 2271
4274 4042
955 3073
3278 232
3386 3089
14...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4962
2698 594
1944 4065
4647 2099
3716 3915
2103 175
3128 1622
969 345
3636 3604
4299 4842
190 3870
3074 2778
108 3960
3689 2271
4274 4042
955 3073
3278 232
3386 3089
14...

output:

2
4962 3059
1 724
2 1177
3 235
3 3506
3 3915
4 1848
4 2355
4 4460
5 3253
6 1672
8 2916
9 4151
12 2548
13 1001
15 4593
16 2632
17 597
17 2812
17 2870
17 3036
17 3828
17 4778
17 4935
19 2747
21 270
22 1216
23 4658
24 2246
24 3262
24 4886
25 776
27 850
29 2840
29 3264
31 2224
32 1801
32 3070
33 165
35 ...

input:

2
4962 3059
1 724
2 1177
3 235
3 3506
3 3915
4 1848
4 2355
4 4460
5 3253
6 1672
8 2916
9 4151
12 2548
13 1001
15 4593
16 2632
17 597
17 2812
17 2870
17 3036
17 3828
17 4778
17 4935
19 2747
21 270
22 1216
23 4658
24 2246
24 3262
24 4886
25 776
27 850
29 2840
29 3264
31 2224
32 1801
32 3070
33 165
35 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
4005

Test #2:

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

input:

1
459

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4962
2698 594
1944 4065
4647 1060
3716 3915
2103 175
3128 1622
969 345
3636 3604
4299 4842
190 3870
3074 2778
108 3960
3689 2271
4274 4042
955 3073
3278 232
3386 3089
14...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4962
2698 594
1944 4065
4647 1060
3716 3915
2103 175
3128 1622
969 345
3636 3604
4299 4842
190 3870
3074 2778
108 3960
3689 2271
4274 4042
955 3073
3278 232
3386 3089
14...

output:

2
4962 3059
1 724
2 1177
3 235
3 3506
3 3915
4 1848
4 2355
4 4460
5 3253
6 1672
8 2916
9 4151
12 2548
13 1001
15 4593
16 2632
17 597
17 2812
17 2870
17 3723
17 3828
17 4778
17 4935
19 2747
21 3897
22 1216
23 4658
24 2246
24 3262
24 4886
25 776
27 3065
27 4173
29 404
29 1170
29 2840
29 3264
31 663
32...

input:

2
4962 3059
1 724
2 1177
3 235
3 3506
3 3915
4 1848
4 2355
4 4460
5 3253
6 1672
8 2916
9 4151
12 2548
13 1001
15 4593
16 2632
17 597
17 2812
17 2870
17 3723
17 3828
17 4778
17 4935
19 2747
21 3897
22 1216
23 4658
24 2246
24 3262
24 4886
25 776
27 3065
27 4173
29 404
29 1170
29 2840
29 3264
31 663
32...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
459

Test #3:

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

input:

1
2495

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4962
2698 594
1944 4065
4647 2099
3716 3915
2103 175
3128 1622
969 345
3636 3604
4299 4842
190 3870
3074 2778
108 3960
3689 2271
4274 4042
955 3073
3278 232
3386 3089
14...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4962
2698 594
1944 4065
4647 2099
3716 3915
2103 175
3128 1622
969 345
3636 3604
4299 4842
190 3870
3074 2778
108 3960
3689 2271
4274 4042
955 3073
3278 232
3386 3089
14...

output:

2
4962 3059
1 724
2 1177
3 235
3 3506
3 3915
4 1848
4 2355
4 4460
5 3253
6 1672
8 2916
9 4151
12 2548
13 1001
15 4593
16 2632
17 597
17 2812
17 2870
17 3036
17 3723
17 4778
17 4935
19 2747
21 3897
22 1216
23 4658
24 2246
24 3262
24 4886
25 776
27 4173
29 404
29 1170
29 2840
29 3264
31 663
32 3070
33...

input:

2
4962 3059
1 724
2 1177
3 235
3 3506
3 3915
4 1848
4 2355
4 4460
5 3253
6 1672
8 2916
9 4151
12 2548
13 1001
15 4593
16 2632
17 597
17 2812
17 2870
17 3036
17 3723
17 4778
17 4935
19 2747
21 3897
22 1216
23 4658
24 2246
24 3262
24 4886
25 776
27 4173
29 404
29 1170
29 2840
29 3264
31 663
32 3070
33...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
2495

Test #4:

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

input:

3
1560

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4962
2698 594
1944 4065
4647 1060
3716 3915
2103 175
3128 1622
969 345
3636 3604
4299 4842
190 3789
3074 2778
108 3960
3689 2271
4274 4042
955 3073
3278 232
3386 3089
14...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4962
2698 594
1944 4065
4647 1060
3716 3915
2103 175
3128 1622
969 345
3636 3604
4299 4842
190 3789
3074 2778
108 3960
3689 2271
4274 4042
955 3073
3278 232
3386 3089
14...

output:

4
4962 2481
1 724
2 1177
2 1755
3 235
3 3506
4 1848
4 2355
4 3536
5 3253
7 3221
8 2916
9 4151
10 2688
10 3518
11 4353
12 2548
14 3255
16 2632
16 3932
16 4554
17 4422
18 2875
19 2747
20 1232
21 270
22 1216
23 4658
24 2246
24 3262
24 4886
26 4657
27 2358
27 4130
28 1188
31 2224
32 1801
32 3070
32 3937...

input:

4
4962 2481
1 724
2 1177
2 1755
3 235
3 3506
4 1848
4 2355
4 3536
5 3253
7 3221
8 2916
9 4151
10 2688
10 3518
11 4353
12 2548
14 3255
16 2632
16 3932
16 4554
17 4422
18 2875
19 2747
20 1232
21 270
22 1216
23 4658
24 2246
24 3262
24 4886
26 4657
27 2358
27 4130
28 1188
31 2224
32 1801
32 3070
32 3937...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
1560

Test #5:

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

input:

3
3594

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4962
2698 594
1944 4065
4647 2099
3716 3915
2103 175
3128 1622
969 345
3636 3604
4299 4842
190 3789
3074 2778
108 3960
3689 2271
4274 4042
955 3073
3278 232
3386 3089
14...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4962
2698 594
1944 4065
4647 2099
3716 3915
2103 175
3128 1622
969 345
3636 3604
4299 4842
190 3789
3074 2778
108 3960
3689 2271
4274 4042
955 3073
3278 232
3386 3089
14...

output:

4
4962 2481
1 724
2 1177
2 1755
3 235
3 3506
4 1848
4 2355
4 3536
5 3253
7 3221
8 2916
9 4151
10 2688
10 3518
11 4353
12 2548
14 3255
16 2632
16 3932
16 4554
17 4422
18 2875
19 2747
20 1232
21 270
22 1216
23 4658
24 2246
24 3262
24 4886
26 4657
27 2358
27 4130
28 1188
31 2224
32 1801
32 3070
33 165
...

input:

4
4962 2481
1 724
2 1177
2 1755
3 235
3 3506
4 1848
4 2355
4 3536
5 3253
7 3221
8 2916
9 4151
10 2688
10 3518
11 4353
12 2548
14 3255
16 2632
16 3932
16 4554
17 4422
18 2875
19 2747
20 1232
21 270
22 1216
23 4658
24 2246
24 3262
24 4886
26 4657
27 2358
27 4130
28 1188
31 2224
32 1801
32 3070
33 165
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
3592

Subtask #2:

score: 0
Wrong Answer

Test #13:

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

input:

1
17476204

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4962
2698 594
1944 214
4647 2099
3716 3915
2103 175
3128 1622
969 345
3636 3604
4299 3551
190 3789
3074 2778
108 3960
3689 2271
4274 4042
955 3073
3278 232
3386 3089
143...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4962
2698 594
1944 214
4647 2099
3716 3915
2103 175
3128 1622
969 345
3636 3604
4299 3551
190 3789
3074 2778
108 3960
3689 2271
4274 4042
955 3073
3278 232
3386 3089
143...

output:

2
4962 3059
1 724
2 1177
3 235
3 3506
3 3915
4 1848
4 2355
4 4460
5 3253
6 1672
8 2916
9 4151
12 2548
13 1001
15 3933
16 2632
17 2812
17 2870
17 3036
17 3828
17 4422
17 4935
19 2747
21 270
21 1540
22 1216
23 4658
24 2246
24 3262
24 4886
25 776
27 3065
27 4173
29 404
29 508
29 2840
29 3264
31 663
33 ...

input:

2
4962 3059
1 724
2 1177
3 235
3 3506
3 3915
4 1848
4 2355
4 4460
5 3253
6 1672
8 2916
9 4151
12 2548
13 1001
15 3933
16 2632
17 2812
17 2870
17 3036
17 3828
17 4422
17 4935
19 2747
21 270
21 1540
22 1216
23 4658
24 2246
24 3262
24 4886
25 776
27 3065
27 4173
29 404
29 508
29 2840
29 3264
31 663
33 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
17476204

Test #14:

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

input:

1
11926600

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4962
2698 594
1944 214
4647 2099
3716 3915
2103 175
3128 1622
969 2032
3636 3604
4299 4842
190 3789
3074 2778
108 3960
3689 2271
4274 4042
955 3073
3278 232
3386 3089
14...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4962
2698 594
1944 214
4647 2099
3716 3915
2103 175
3128 1622
969 2032
3636 3604
4299 4842
190 3789
3074 2778
108 3960
3689 2271
4274 4042
955 3073
3278 232
3386 3089
14...

output:

2
4962 3059
1 724
2 1177
3 235
3 3506
3 3915
4 1848
4 2355
4 3657
5 3253
6 1672
8 2916
9 4151
12 2548
13 1001
15 4593
16 2632
17 2812
17 2870
17 3828
17 4422
17 4935
19 2747
21 3897
22 1216
23 4658
24 2112
24 2246
24 4886
25 776
27 3065
27 4173
29 404
29 508
29 1291
29 2840
29 3264
29 3420
31 2224
3...

input:

2
4962 3059
1 724
2 1177
3 235
3 3506
3 3915
4 1848
4 2355
4 3657
5 3253
6 1672
8 2916
9 4151
12 2548
13 1001
15 4593
16 2632
17 2812
17 2870
17 3828
17 4422
17 4935
19 2747
21 3897
22 1216
23 4658
24 2112
24 2246
24 4886
25 776
27 3065
27 4173
29 404
29 508
29 1291
29 2840
29 3264
29 3420
31 2224
3...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
11926600

Test #15:

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

input:

1
16602378

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4962
2698 594
1944 4065
4647 1060
3716 3915
2103 3495
3128 1622
969 2032
3636 3604
4299 4842
190 3789
3074 2778
108 3960
3689 2271
4274 4042
955 3073
3278 232
3386 3089
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4962
2698 594
1944 4065
4647 1060
3716 3915
2103 3495
3128 1622
969 2032
3636 3604
4299 4842
190 3789
3074 2778
108 3960
3689 2271
4274 4042
955 3073
3278 232
3386 3089
...

output:

2
4962 3059
1 724
2 1177
3 235
3 3506
3 3915
4 1848
4 2355
4 3657
5 3253
6 1672
8 2916
9 4151
12 2548
13 1001
15 3933
16 2632
17 2812
17 2870
17 3723
17 3828
17 4422
17 4935
19 2747
21 1540
21 3897
22 1216
23 4658
24 2112
24 2246
24 3922
24 4886
25 776
27 4173
29 404
29 508
29 1170
29 1291
29 2840
2...

input:

2
4962 3059
1 724
2 1177
3 235
3 3506
3 3915
4 1848
4 2355
4 3657
5 3253
6 1672
8 2916
9 4151
12 2548
13 1001
15 3933
16 2632
17 2812
17 2870
17 3723
17 3828
17 4422
17 4935
19 2747
21 1540
21 3897
22 1216
23 4658
24 2112
24 2246
24 3922
24 4886
25 776
27 4173
29 404
29 508
29 1170
29 1291
29 2840
2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
16602378

Test #16:

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

input:

3
13129243

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4962
2698 594
1944 4065
4647 1060
3716 3915
2103 3495
3128 1622
969 2032
3636 3604
4299 4842
190 3789
3074 2778
108 3960
3689 2271
4274 4042
955 3073
3278 232
3386 3089
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4962
2698 594
1944 4065
4647 1060
3716 3915
2103 3495
3128 1622
969 2032
3636 3604
4299 4842
190 3789
3074 2778
108 3960
3689 2271
4274 4042
955 3073
3278 232
3386 3089
...

output:

4
4962 2481
1 724
2 1177
3 235
3 3506
4 1848
4 2355
4 3536
5 3253
7 3221
8 2916
9 4151
10 2688
10 3518
11 4353
12 2548
14 3255
16 2632
16 3932
16 4554
18 2875
19 2747
20 1232
21 270
21 1540
23 4658
24 2112
24 2246
24 3922
24 4886
26 4657
27 2358
27 4130
28 1188
30 3357
31 2224
32 1801
32 3070
32 393...

input:

4
4962 2481
1 724
2 1177
3 235
3 3506
4 1848
4 2355
4 3536
5 3253
7 3221
8 2916
9 4151
10 2688
10 3518
11 4353
12 2548
14 3255
16 2632
16 3932
16 4554
18 2875
19 2747
20 1232
21 270
21 1540
23 4658
24 2112
24 2246
24 3922
24 4886
26 4657
27 2358
27 4130
28 1188
30 3357
31 2224
32 1801
32 3070
32 393...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
13129241

Subtask #3:

score: 0
Wrong Answer

Test #25:

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

input:

1
355365355024496523

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4962
2698 594
1944 4065
4647 1060
3716 2794
2103 175
3128 3543
969 345
3636 3604
4299 3551
190 3870
3074 2778
108 3960
3689 2271
4274 4042
955 687
3278 3584
3386 4941
14...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4962
2698 594
1944 4065
4647 1060
3716 2794
2103 175
3128 3543
969 345
3636 3604
4299 3551
190 3870
3074 2778
108 3960
3689 2271
4274 4042
955 687
3278 3584
3386 4941
14...

output:

2
4962 3059
1 724
2 1177
3 1048
3 2739
3 3506
4 2355
4 3657
5 2778
6 1672
8 2916
9 3674
12 2548
13 2205
13 2555
14 3871
15 4593
17 597
17 2870
17 3723
17 3828
17 4778
19 571
21 270
22 1397
23 1996
24 2112
24 4886
25 1162
27 4173
29 404
29 1170
29 1291
29 3264
29 3420
31 2224
32 1801
32 3070
32 4634
...

input:

2
4962 3059
1 724
2 1177
3 1048
3 2739
3 3506
4 2355
4 3657
5 2778
6 1672
8 2916
9 3674
12 2548
13 2205
13 2555
14 3871
15 4593
17 597
17 2870
17 3723
17 3828
17 4778
19 571
21 270
22 1397
23 1996
24 2112
24 4886
25 1162
27 4173
29 404
29 1170
29 1291
29 3264
29 3420
31 2224
32 1801
32 3070
32 4634
...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
355365355024496523

Test #26:

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

input:

1
727827999106414164

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4962
2698 4668
1944 4065
4647 1060
3716 3915
2103 3495
3128 1622
969 345
3636 3604
4299 4842
190 3789
3074 1661
108 3960
3689 2271
4274 1265
955 3073
3278 232
3386 3089
...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4962
2698 4668
1944 4065
4647 1060
3716 3915
2103 3495
3128 1622
969 345
3636 3604
4299 4842
190 3789
3074 1661
108 3960
3689 2271
4274 1265
955 3073
3278 232
3386 3089
...

output:

2
4962 3059
1 724
3 235
3 2739
3 3915
4 1848
4 3657
5 3253
6 1672
6 3641
8 934
9 4151
12 2548
13 1001
15 2483
15 4593
17 2812
17 3036
17 4422
19 2747
21 270
22 1216
23 4658
24 2112
24 2246
24 3922
25 776
27 850
27 3065
29 508
29 1291
29 2840
31 2224
32 1801
32 3070
33 165
33 2895
35 1163
35 2145
35 ...

input:

2
4962 3059
1 724
3 235
3 2739
3 3915
4 1848
4 3657
5 3253
6 1672
6 3641
8 934
9 4151
12 2548
13 1001
15 2483
15 4593
17 2812
17 3036
17 4422
19 2747
21 270
22 1216
23 4658
24 2112
24 2246
24 3922
25 776
27 850
27 3065
29 508
29 1291
29 2840
31 2224
32 1801
32 3070
33 165
33 2895
35 1163
35 2145
35 ...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
727827999106414164

Test #27:

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

input:

1
656410143989222955

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4962
2698 594
1944 214
4647 2099
3716 2794
2103 3495
3128 3543
969 2032
3636 3604
4299 3551
190 3789
3074 2778
108 3960
3689 2271
4274 1265
955 687
3278 3584
3386 4941
1...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4962
2698 594
1944 214
4647 2099
3716 2794
2103 3495
3128 3543
969 2032
3636 3604
4299 3551
190 3789
3074 2778
108 3960
3689 2271
4274 1265
955 687
3278 3584
3386 4941
1...

output:

2
4962 3059
1 724
3 235
3 2739
3 3915
4 1848
4 2355
4 3657
5 2778
6 1672
8 934
9 3674
12 2548
13 1001
15 4593
17 597
17 2870
17 3723
17 3828
17 4778
17 4935
19 2747
21 270
22 1216
23 4658
24 3262
24 3922
25 776
27 4173
29 404
29 508
29 1170
29 3264
31 2224
32 1801
33 165
33 2895
35 1030
35 2145
35 2...

input:

2
4962 3059
1 724
3 235
3 2739
3 3915
4 1848
4 2355
4 3657
5 2778
6 1672
8 934
9 3674
12 2548
13 1001
15 4593
17 597
17 2870
17 3723
17 3828
17 4778
17 4935
19 2747
21 270
22 1216
23 4658
24 3262
24 3922
25 776
27 4173
29 404
29 508
29 1170
29 3264
31 2224
32 1801
33 165
33 2895
35 1030
35 2145
35 2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
656410143989222955

Test #28:

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

input:

1
410366615149657534

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4962
2698 594
1944 214
4647 2099
3716 3915
2103 175
3128 1622
969 345
3636 3604
4299 3551
190 3870
3074 1661
108 3960
3689 2271
4274 4042
955 3073
3278 232
3386 4941
143...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4962
2698 594
1944 214
4647 2099
3716 3915
2103 175
3128 1622
969 345
3636 3604
4299 3551
190 3870
3074 1661
108 3960
3689 2271
4274 4042
955 3073
3278 232
3386 4941
143...

output:

2
4962 3059
1 724
2 1177
3 235
3 3506
3 3915
4 1848
4 2355
4 4460
5 3253
6 1672
6 3641
8 2916
9 4151
12 2548
13 2205
13 2555
14 3871
15 3933
16 2632
17 2812
17 2870
17 3036
17 3723
17 4422
19 571
21 1540
21 3897
22 1397
23 4658
24 2112
24 2246
24 4886
25 1162
27 4173
29 404
29 1170
29 1291
29 2840
2...

input:

2
4962 3059
1 724
2 1177
3 235
3 3506
3 3915
4 1848
4 2355
4 4460
5 3253
6 1672
6 3641
8 2916
9 4151
12 2548
13 2205
13 2555
14 3871
15 3933
16 2632
17 2812
17 2870
17 3036
17 3723
17 4422
19 571
21 1540
21 3897
22 1397
23 4658
24 2112
24 2246
24 4886
25 1162
27 4173
29 404
29 1170
29 1291
29 2840
2...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
410366615149657534

Test #29:

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

input:

1
298090682780948428

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4962
2698 594
1944 4065
4647 1060
3716 3915
2103 175
3128 1622
969 345
3636 3604
4299 4842
190 3870
3074 2778
108 2429
3689 2271
4274 1265
955 3073
3278 232
3386 4941
14...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4962
2698 594
1944 4065
4647 1060
3716 3915
2103 175
3128 1622
969 345
3636 3604
4299 4842
190 3870
3074 2778
108 2429
3689 2271
4274 1265
955 3073
3278 232
3386 4941
14...

output:

2
4962 3059
1 724
3 2739
3 3915
4 4460
5 3253
6 3396
6 3641
8 2916
9 4151
12 3622
13 2205
13 2555
14 3871
15 2483
15 4593
16 2632
17 2812
17 3036
17 3828
17 4422
19 2747
21 270
22 1397
23 1996
24 2112
24 2246
25 1162
27 3065
27 4173
29 404
29 1291
29 2840
31 2224
31 4313
32 1801
32 3070
33 165
33 28...

input:

2
4962 3059
1 724
3 2739
3 3915
4 4460
5 3253
6 3396
6 3641
8 2916
9 4151
12 3622
13 2205
13 2555
14 3871
15 2483
15 4593
16 2632
17 2812
17 3036
17 3828
17 4422
19 2747
21 270
22 1397
23 1996
24 2112
24 2246
25 1162
27 3065
27 4173
29 404
29 1291
29 2840
31 2224
31 4313
32 1801
32 3070
33 165
33 28...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
298090682780948428

Test #30:

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

input:

3
969441916331132577

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4962
2698 594
1944 214
4647 1060
3716 2794
2103 3495
3128 3543
969 345
3636 3604
4299 3551
190 3870
3074 2778
108 2429
3689 2271
4274 4042
955 687
3278 3584
3386 3089
14...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4962
2698 594
1944 214
4647 1060
3716 2794
2103 3495
3128 3543
969 345
3636 3604
4299 3551
190 3870
3074 2778
108 2429
3689 2271
4274 4042
955 687
3278 3584
3386 3089
14...

output:

4
4962 2481
1 724
2 1177
2 3246
3 235
3 3506
5 2778
7 1053
8 934
9 3674
10 2688
10 3518
11 2696
12 3622
13 2555
14 3255
14 3871
18 1461
18 2805
19 2747
20 1232
21 270
21 1540
22 626
22 1397
23 4658
24 3262
24 3922
24 4886
25 1162
26 1011
26 4111
27 2358
27 4130
28 4427
31 2224
31 4313
32 372
32 1801...

input:

4
4962 2481
1 724
2 1177
2 3246
3 235
3 3506
5 2778
7 1053
8 934
9 3674
10 2688
10 3518
11 2696
12 3622
13 2555
14 3255
14 3871
18 1461
18 2805
19 2747
20 1232
21 270
21 1540
22 626
22 1397
23 4658
24 3262
24 3922
24 4886
25 1162
26 1011
26 4111
27 2358
27 4130
28 4427
31 2224
31 4313
32 372
32 1801...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
969441916331132577

Test #31:

score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1896kb,1908kb

input:

3
929489812741933634

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4962
2698 594
1944 214
4647 2099
3716 2794
2103 3495
3128 3543
969 2032
3636 3604
4299 4842
190 3789
3074 2778
108 2429
3689 2271
4274 4042
955 687
3278 3584
3386 4941
1...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
3
4962
2698 594
1944 214
4647 2099
3716 2794
2103 3495
3128 3543
969 2032
3636 3604
4299 4842
190 3789
3074 2778
108 2429
3689 2271
4274 4042
955 687
3278 3584
3386 4941
1...

output:

4
4962 2481
1 724
2 1177
2 3246
3 3506
4 2355
4 3536
4 3657
5 2778
7 1053
8 934
9 3674
10 1041
10 2688
11 2696
13 2555
14 3255
14 3871
16 2632
16 4554
17 4422
18 1461
18 2805
19 571
21 270
22 626
22 1397
23 1996
24 3262
24 3922
24 4886
25 3890
26 1006
26 4111
27 4130
28 4427
31 663
31 4313
32 372
33...

input:

4
4962 2481
1 724
2 1177
2 3246
3 3506
4 2355
4 3536
4 3657
5 2778
7 1053
8 934
9 3674
10 1041
10 2688
11 2696
13 2555
14 3255
14 3871
16 2632
16 4554
17 4422
18 1461
18 2805
19 571
21 270
22 626
22 1397
23 1996
24 3262
24 3922
24 4886
25 3890
26 1006
26 4111
27 4130
28 4427
31 663
31 4313
32 372
33...

output:

08e2277017156c65e2df558ef1d27eae814767ea6a771d5be687d4040371b97399dd6bd28d5207cce21e4e205ea711c730f7ccf85a21af8c41bab7c037b89e9e
929489812741933632