QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#666136 | #8726. Magic Show | huazai676 | 0 | 0ms | 1920kb | C++17 | 2.0kb | 2024-10-22 16:47:03 | 2024-10-22 16:47:03 |
Alice
#include<iostream>
#include<cstring>
#include<algorithm>
#include<vector>
#include<random>
#include "Alice.h"
using namespace std;
namespace
{
const int N=63,M=78;
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=63,M=78;
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=i*M+j;
g|=f[u];
}
res|=g<<i;
}
return res;
}
詳細信息
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1892kb,1904kb
input:
1 4005
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 4916 2734 3178 3785 1729 1385 2392 4577 400 3195 3995 1398 2902 4535 1568 1060 2543 2161 2903 3708 4836 963 3303 4319 491 1437 2634 1184 1033 4756 441 2148 4281 2203 335...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 4916 2734 3178 3785 1729 1385 2392 4577 400 3195 3995 1398 2902 4535 1568 1060 2543 2161 2903 3708 4836 963 3303 4319 491 1437 2634 1184 1033 4756 441 2148 4281 2203 335...
output:
2 4916 3155 2 1186 5 1827 9 4617 10 2996 11 1843 14 1857 16 699 16 2276 16 3477 17 543 17 1283 17 1941 17 2429 21 92 23 2593 24 4019 25 4434 27 1920 27 2341 27 2621 27 3700 27 3794 27 3998 27 4423 29 574 29 1371 29 1847 29 1860 29 2193 29 3090 29 3580 29 3723 29 4460 29 4568 29 4603 29 4718 32 2440 ...
input:
2 4916 3155 2 1186 5 1827 9 4617 10 2996 11 1843 14 1857 16 699 16 2276 16 3477 17 543 17 1283 17 1941 17 2429 21 92 23 2593 24 4019 25 4434 27 1920 27 2341 27 2621 27 3700 27 3794 27 3998 27 4423 29 574 29 1371 29 1847 29 1860 29 2193 29 3090 29 3580 29 3723 29 4460 29 4568 29 4603 29 4718 32 2440 ...
output:
9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4 Incorrect answer.
Subtask #2:
score: 0
Wrong Answer
Test #13:
score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1892kb,1908kb
input:
1 17476204
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 4916 2734 3178 3785 1729 1385 2392 4577 400 3195 3995 1398 2902 4535 1568 1060 1968 2161 2903 3708 4836 963 3303 4319 491 1437 2634 1184 1033 4756 441 2148 4281 2203 335...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 4916 2734 3178 3785 1729 1385 2392 4577 400 3195 3995 1398 2902 4535 1568 1060 1968 2161 2903 3708 4836 963 3303 4319 491 1437 2634 1184 1033 4756 441 2148 4281 2203 335...
output:
2 4916 3155 2 1186 4 1661 5 1827 9 4617 10 2996 11 1843 14 1857 16 2276 16 4347 17 543 17 1281 17 1463 17 1941 21 92 21 3042 23 2593 24 287 24 4019 25 4434 27 1920 27 2621 27 3700 27 3794 27 3937 27 3998 27 4423 29 1371 29 1847 29 1860 29 2193 29 2543 29 3090 29 3580 29 4568 29 4718 32 2440 32 4417 ...
input:
2 4916 3155 2 1186 4 1661 5 1827 9 4617 10 2996 11 1843 14 1857 16 2276 16 4347 17 543 17 1281 17 1463 17 1941 21 92 21 3042 23 2593 24 287 24 4019 25 4434 27 1920 27 2621 27 3700 27 3794 27 3937 27 3998 27 4423 29 1371 29 1847 29 1860 29 2193 29 2543 29 3090 29 3580 29 4568 29 4718 32 2440 32 4417 ...
output:
9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4 Incorrect answer.
Subtask #3:
score: 0
Wrong Answer
Test #25:
score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1888kb,1920kb
input:
1 355365355024496523
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 4916 2734 3927 3785 2919 1385 2392 4577 4279 3195 3995 1398 2902 4535 2130 1060 2543 2161 989 3708 1822 963 4425 4319 491 1437 625 1184 1033 4756 441 2148 4562 2203 4525...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 4916 2734 3927 3785 2919 1385 2392 4577 4279 3195 3995 1398 2902 4535 2130 1060 2543 2161 989 3708 1822 963 4425 4319 491 1437 625 1184 1033 4756 441 2148 4562 2203 4525...
output:
2 4916 3155 2 3266 3 1327 4 1661 5 1187 6 2765 9 197 10 2241 11 385 14 1857 15 721 16 699 16 3477 17 2429 17 4114 21 92 21 3042 23 3664 24 287 24 2777 25 2900 27 1878 27 3700 27 3937 27 3998 29 276 29 972 29 1371 29 1847 29 3090 29 3723 29 4460 29 4568 29 4603 32 2797 32 4417 35 636 37 2509 40 171 4...
input:
2 4916 3155 2 3266 3 1327 4 1661 5 1187 6 2765 9 197 10 2241 11 385 14 1857 15 721 16 699 16 3477 17 2429 17 4114 21 92 21 3042 23 3664 24 287 24 2777 25 2900 27 1878 27 3700 27 3937 27 3998 29 276 29 972 29 1371 29 1847 29 3090 29 3723 29 4460 29 4568 29 4603 32 2797 32 4417 35 636 37 2509 40 171 4...
output:
9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4 Incorrect answer.