QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#666086#8726. Magic Showhuazai6760 0ms1936kbC++172.0kb2024-10-22 16:33:252024-10-22 16:33:25

Judging History

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

  • [2024-10-22 16:33:25]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:1936kb
  • [2024-10-22 16:33:25]
  • 提交

Alice

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

using namespace std;

namespace
{
    const int N=64,M=75;
    typedef long long ll;
    mt19937 rd(172328);
    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=i*M+j;
            fa[u][1]=rand(u+1,n-1);
            fa[u][0]=rand(fa[u][0]+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=64,M=75;
    typedef long long ll;
    int fa[N*M+10][2];
    int f[N*M+10];
    mt19937 rd(172328);
    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=i*M+j;
            fa[u][1]=rand(u+1,n-1);
            fa[u][0]=rand(fa[u][0]+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=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: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1936kb,1784kb

input:

1
4005

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4802
2075 52
754 1737
4008 3326
3394 985
1771 567
3984 2278
3655 867
3422 3052
3869 1953
1695 785
4267 3239
1357 373
2029 1257
3880 3416
2111 2084
3762 2069
2738 153
496...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4802
2075 52
754 1737
4008 3326
3394 985
1771 567
3984 2278
3655 867
3422 3052
3869 1953
1695 785
4267 3239
1357 373
2029 1257
3880 3416
2111 2084
3762 2069
2738 153
496...

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Output of encode is not a tree.

input:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Output of encode is not a tree.

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Output of encode is not a tree.

Subtask #2:

score: 0
Wrong Answer

Test #13:

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

input:

1
17476204

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4802
2075 52
754 1737
4008 3326
3394 985
1771 567
3984 2345
3655 867
3422 3052
3869 1953
1695 785
4267 1208
1357 373
2029 1257
3880 3416
2111 2084
3762 2069
2738 153
496...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4802
2075 52
754 1737
4008 3326
3394 985
1771 567
3984 2345
3655 867
3422 3052
3869 1953
1695 785
4267 1208
1357 373
2029 1257
3880 3416
2111 2084
3762 2069
2738 153
496...

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Output of encode is not a tree.

input:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Output of encode is not a tree.

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Output of encode is not a tree.

Subtask #3:

score: 0
Wrong Answer

Test #25:

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

input:

1
355365355024496523

output:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4802
2075 52
754 1256
4008 3326
3394 4134
1771 567
3984 2345
3655 2241
3422 3052
3869 3194
1695 1458
4267 3239
1357 373
2029 3522
3880 3416
2111 3504
3762 2069
2738 1321...

input:

a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022
1
4802
2075 52
754 1256
4008 3326
3394 4134
1771 567
3984 2345
3655 2241
3422 3052
3869 3194
1695 1458
4267 3239
1357 373
2029 3522
3880 3416
2111 3504
3762 2069
2738 1321...

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Output of encode is not a tree.

input:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Output of encode is not a tree.

output:

9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4
Output of encode is not a tree.