QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#557447 | #8726. Magic Show | Le0Chan | 0 | 0ms | 1992kb | C++20 | 1.9kb | 2024-09-11 09:47:13 | 2024-09-11 09:47:13 |
Alice
#include <bits/stdc++.h>
using namespace std;
#include "Alice.h"
#define LL long long
#define pii pair<int,int>
#define fi first
#define se second
std::vector<std::pair<int, int>> Alice();
long long setN(int n);
const int N=5003;
int bel[N];
mt19937 rd(0x2477264);
mt19937_64 rad(0x20333ac);
vector<pii> Alice(){
int n=4943;
LL V=setN(4943);
V^=rad();
// LL V=4004;
vector<pii> as;
as.push_back({1,2});
for(int l=3;l<=4943;l+=61){
int now=l;
for(int i=0;i<=60;i++){
// cout<<now<<" ";
bel[now]=i;
now++;
}
// cout<<'\n';
}
shuffle(bel+3,bel+1+n,rd);
// for(int i=3;i<=n;i++) cout<<bel[i]<<" ";cout<<'\n';
for(int i=3;i<=n;i++){
if(V&(1ll<<bel[i])) as.push_back({i,i-2});
else as.push_back({i,i-1});
}
return as;
}
// int main(){
// Alice();return 0;
// }
Bob
#include <bits/stdc++.h>
#include "Bob.h"
using namespace std;
#define LL long long
#define pii pair<int,int>
#define fi first
#define se second
long long Bob(std::vector<std::pair<int, int>> V);
const int N=5e3+5;
bool vis[N];
int fa[N],ans[N],bel[N];
int n=4943;
vector<int> g[N];
void add(int x,int y){g[x].push_back(y);}
mt19937 rd(0x2477264);
mt19937_64 rad(0x20333ac);
LL Bob(vector<pii> as){
for(auto [x,y]:as){
if(x<y) fa[y]=x;
else fa[x]=y;
}
for(int l=3;l<=n;l+=61){
int now=l;
for(int j=0;j<=60;j++){
bel[now]=j;
now++;
}
}
shuffle(bel+3,bel+1+n,rd);
// for(int i=3;i<=n;i++) cout<<bel[i]<<" ";cout<<'\n';
LL rs=0;
for(int i=3;i<=n;i++){
if(fa[i]) ans[bel[i]]=i-fa[i]-1;
}
for(int j=0;j<=60;j++) if(ans[j]) rs+=1ll<<j;
return rs^=rad();
}
// int main(){
// Bob(vector<pii>());
// return 0;
// }
詳細信息
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1896kb,1988kb
input:
1 4005
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 4943 1 2 3 2 4 3 5 3 6 4 7 6 8 7 9 8 10 9 11 10 12 10 13 12 14 13 15 13 16 15 17 16 18 17 19 17 20 18 21 20 22 21 23 22 24 22 25 24 26 25 27 26 28 26 29 28 30 29 31 29 3...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 4943 1 2 3 2 4 3 5 3 6 4 7 6 8 7 9 8 10 9 11 10 12 10 13 12 14 13 15 13 16 15 17 16 18 17 19 17 20 18 21 20 22 21 23 22 24 22 25 24 26 25 27 26 28 26 29 28 30 29 31 29 3...
output:
2 4943 3298 1 2 2 3 3 5 6 7 7 8 10 11 10 12 12 13 13 14 13 15 16 17 18 20 20 21 21 22 22 23 22 24 28 29 29 30 29 31 31 33 35 36 36 37 37 38 37 39 39 40 39 41 40 42 45 46 45 47 48 49 49 50 50 52 51 53 53 55 55 56 55 57 58 59 58 60 60 61 61 62 66 68 67 69 69 70 70 71 71 73 73 74 74 75 76 77 77 78 80 8...
input:
2 4943 3298 1 2 2 3 3 5 6 7 7 8 10 11 10 12 12 13 13 14 13 15 16 17 18 20 20 21 21 22 22 23 22 24 28 29 29 30 29 31 31 33 35 36 36 37 37 38 37 39 39 40 39 41 40 42 45 46 45 47 48 49 49 50 50 52 51 53 53 55 55 56 55 57 58 59 58 60 60 61 61 62 66 68 67 69 69 70 70 71 71 73 73 74 74 75 76 77 77 78 80 8...
output:
9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4 Incorrect answer.
Subtask #2:
score: 0
Wrong Answer
Test #13:
score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1892kb,1992kb
input:
1 17476204
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 4943 1 2 3 2 4 3 5 3 6 4 7 6 8 7 9 8 10 9 11 10 12 11 13 12 14 13 15 13 16 15 17 16 18 17 19 18 20 18 21 20 22 21 23 22 24 22 25 24 26 25 27 26 28 27 29 28 30 29 31 30 3...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 4943 1 2 3 2 4 3 5 3 6 4 7 6 8 7 9 8 10 9 11 10 12 11 13 12 14 13 15 13 16 15 17 16 18 17 19 18 20 18 21 20 22 21 23 22 24 22 25 24 26 25 27 26 28 27 29 28 30 29 31 30 3...
output:
2 4943 3298 1 2 2 3 3 5 6 7 7 8 10 11 11 12 12 13 13 14 13 15 16 17 18 20 20 21 21 22 22 23 22 24 28 29 29 30 30 31 32 33 35 36 36 37 37 38 37 39 39 40 39 41 41 42 45 46 46 47 47 49 49 50 51 52 52 53 53 55 55 56 55 57 58 59 59 60 60 61 61 62 66 68 68 69 69 70 70 71 72 73 73 74 74 75 76 77 77 78 80 8...
input:
2 4943 3298 1 2 2 3 3 5 6 7 7 8 10 11 11 12 12 13 13 14 13 15 16 17 18 20 20 21 21 22 22 23 22 24 28 29 29 30 30 31 32 33 35 36 36 37 37 38 37 39 39 40 39 41 41 42 45 46 46 47 47 49 49 50 51 52 52 53 53 55 55 56 55 57 58 59 59 60 60 61 61 62 66 68 68 69 69 70 70 71 72 73 73 74 74 75 76 77 77 78 80 8...
output:
9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4 Incorrect answer.
Subtask #3:
score: 0
Wrong Answer
Test #25:
score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1896kb,1988kb
input:
1 355365355024496523
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 4943 1 2 3 2 4 3 5 3 6 5 7 5 8 6 9 8 10 8 11 9 12 10 13 11 14 13 15 13 16 14 17 15 18 16 19 17 20 18 21 19 22 21 23 21 24 22 25 23 26 24 27 26 28 26 29 28 30 28 31 29 32...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 4943 1 2 3 2 4 3 5 3 6 5 7 5 8 6 9 8 10 8 11 9 12 10 13 11 14 13 15 13 16 14 17 15 18 16 19 17 20 18 21 19 22 21 23 21 24 22 25 23 26 24 27 26 28 26 29 28 30 28 31 29 32...
output:
2 4943 3298 1 2 2 3 3 5 5 7 6 8 9 11 10 12 11 13 13 14 13 15 15 17 18 20 19 21 21 22 21 23 22 24 28 29 28 30 29 31 31 33 34 36 35 37 37 38 38 39 38 40 40 41 40 42 44 46 46 47 47 49 49 50 50 52 51 53 53 55 54 56 56 57 57 59 58 60 60 61 61 62 66 68 67 69 68 70 69 71 71 73 72 74 73 75 75 77 77 78 79 81...
input:
2 4943 3298 1 2 2 3 3 5 5 7 6 8 9 11 10 12 11 13 13 14 13 15 15 17 18 20 19 21 21 22 21 23 22 24 28 29 28 30 29 31 31 33 34 36 35 37 37 38 38 39 38 40 40 41 40 42 44 46 46 47 47 49 49 50 50 52 51 53 53 55 54 56 56 57 57 59 58 60 60 61 61 62 66 68 67 69 68 70 69 71 71 73 72 74 73 75 75 77 77 78 79 81...
output:
9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4 Incorrect answer.