QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#592901 | #8726. Magic Show | -Ofast | 0 | 0ms | 1892kb | C++20 | 1.3kb | 2024-09-27 09:41:51 | 2024-09-27 09:41:52 |
Alice
#include <bits/stdc++.h>
#define mp make_pair
#define fir first
#define sec second
using namespace std;
mt19937 rnd(20080511);
long long setN(int n);
int fa[5005];
vector <pair<int,int>> Alice(){
long long X=setN(4098);
vector <int> id;
for(int i=0;i<4096;i++)
id.push_back(i+3);
shuffle(id.begin(),id.end(),rnd);
vector <pair<int,int>> res;
res.push_back(mp(2,1));fa[2]=1;
int cnt=0;
for(int i=0;i<4096;i+=64){
for(int j=i;j<i+64;j++){
fa[id[j]]=rnd()%(id[j]/2)+1;
if((X>>cnt)&1){
fa[id[j]]+=(id[j]/2)-1;
}
}
cnt++;
}
for(int i=3;i<=4098;i++)
res.push_back(mp(i,fa[i]));
return res;
}
/*
int main(){
ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
Alice();
return 0;
}
*/
Bob
#include <bits/stdc++.h>
#define mp make_pair
#define fir first
#define sec second
using namespace std;
mt19937 rnd(20080511);
int fa[5005],inv[5005];
long long Bob(vector <pair<int,int>> p){
vector <int> id;
for(int i=0;i<4096;i++)
id.push_back(i+3);
shuffle(id.begin(),id.end(),rnd);
for(int i=0;i<4096;i++)
inv[id[i]]=i/64;
unsigned long long ans=0;
for(auto it:p){
if(it.fir==2)continue;
if(it.sec>it.fir/2)
ans|=1ull<<(inv[it.fir]);
}
return ans;
}
/*
int main(){
ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
Bob();
return 0;
}
*/
詳細信息
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1892kb,1864kb
input:
1 4005
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 4098 2 1 3 1 4 1 5 2 6 2 7 3 8 1 9 1 10 2 11 5 12 6 13 5 14 5 15 7 16 1 17 5 18 9 19 4 20 2 21 6 22 9 23 20 24 9 25 12 26 9 27 5 28 10 29 7 30 2 31 13 32 1 33 18 34 5 35...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 4098 2 1 3 1 4 1 5 2 6 2 7 3 8 1 9 1 10 2 11 5 12 6 13 5 14 5 15 7 16 1 17 5 18 9 19 4 20 2 21 6 22 9 23 20 24 9 25 12 26 9 27 5 28 10 29 7 30 2 31 13 32 1 33 18 34 5 35...
output:
2 4098 3104 1 2 1 3 1 4 1 9 1 16 1 32 1 49 1 54 1 117 1 194 1 537 1 592 1 626 1 701 1 922 2 5 2 6 2 30 2 283 2 2721 3 7 3 37 3 135 3 142 3 154 3 385 3 450 3 796 3 1091 3 2252 4 19 4 35 4 41 4 56 4 89 4 93 4 162 4 232 4 249 4 376 4 426 4 1068 4 3897 5 13 5 14 5 17 5 27 5 34 5 38 5 51 5 82 5 87 5 267 ...
input:
2 4098 3104 1 2 1 3 1 4 1 9 1 16 1 32 1 49 1 54 1 117 1 194 1 537 1 592 1 626 1 701 1 922 2 5 2 6 2 30 2 283 2 2721 3 7 3 37 3 135 3 142 3 154 3 385 3 450 3 796 3 1091 3 2252 4 19 4 35 4 41 4 56 4 89 4 93 4 162 4 232 4 249 4 376 4 426 4 1068 4 3897 5 13 5 14 5 17 5 27 5 34 5 38 5 51 5 82 5 87 5 267 ...
output:
9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4 Incorrect answer.
Subtask #2:
score: 0
Wrong Answer
Test #13:
score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1892kb,1864kb
input:
1 17476204
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 4098 2 1 3 1 4 1 5 2 6 2 7 3 8 1 9 1 10 2 11 5 12 11 13 5 14 5 15 13 16 8 17 5 18 1 19 12 20 2 21 6 22 9 23 20 24 9 25 12 26 21 27 17 28 10 29 7 30 2 31 13 32 1 33 3 34 ...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 4098 2 1 3 1 4 1 5 2 6 2 7 3 8 1 9 1 10 2 11 5 12 11 13 5 14 5 15 13 16 8 17 5 18 1 19 12 20 2 21 6 22 9 23 20 24 9 25 12 26 21 27 17 28 10 29 7 30 2 31 13 32 1 33 3 34 ...
output:
2 4098 3104 1 2 1 3 1 4 1 9 1 18 1 32 1 49 1 54 1 117 1 194 1 537 1 592 1 626 1 922 2 5 2 6 2 30 2 283 2 2721 3 7 3 33 3 37 3 135 3 142 3 385 3 450 3 1091 3 2252 4 41 4 56 4 93 4 162 4 232 4 376 4 426 4 1068 4 3897 5 13 5 14 5 17 5 34 5 38 5 51 5 82 5 87 5 267 5 1452 5 1824 5 2511 6 21 6 85 6 329 6 ...
input:
2 4098 3104 1 2 1 3 1 4 1 9 1 18 1 32 1 49 1 54 1 117 1 194 1 537 1 592 1 626 1 922 2 5 2 6 2 30 2 283 2 2721 3 7 3 33 3 37 3 135 3 142 3 385 3 450 3 1091 3 2252 4 41 4 56 4 93 4 162 4 232 4 376 4 426 4 1068 4 3897 5 13 5 14 5 17 5 34 5 38 5 51 5 82 5 87 5 267 5 1452 5 1824 5 2511 6 21 6 85 6 329 6 ...
output:
9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4 Incorrect answer.
Subtask #3:
score: 0
Wrong Answer
Test #25:
score: 0
Wrong Answer
time: 0ms = 0ms + 0ms
memory: 1892kb,1864kb
input:
1 355365355024496523
output:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 4098 2 1 3 1 4 1 5 3 6 4 7 5 8 1 9 4 10 2 11 9 12 11 13 5 14 11 15 13 16 8 17 12 18 9 19 12 20 2 21 15 22 19 23 10 24 20 25 12 26 21 27 17 28 23 29 20 30 2 31 27 32 1 33...
input:
a890c6696058af3ad84e267191c856938f206a8ef7c63581510cdfa15e45f9c07d82b6a58fe3c8183e2b8f4b976dd90fbca50f420ce3dcf29a3d6a73adf47022 1 4098 2 1 3 1 4 1 5 3 6 4 7 5 8 1 9 4 10 2 11 9 12 11 13 5 14 11 15 13 16 8 17 12 18 9 19 12 20 2 21 15 22 19 23 10 24 20 25 12 26 21 27 17 28 23 29 20 30 2 31 27 32 1 33...
output:
2 4098 3104 1 2 1 3 1 4 1 32 1 49 1 117 1 194 1 626 1 922 2 30 2 283 3 5 3 190 3 385 3 450 3 796 3 1091 4 6 4 9 4 89 4 426 4 1068 4 3897 5 7 5 13 5 87 5 267 5 2436 6 205 6 1673 6 2826 6 3717 7 80 7 1483 8 16 8 164 8 460 8 589 8 1296 8 1847 8 2029 8 2440 8 3207 9 18 10 71 10 1086 10 2094 11 12 11 14 ...
input:
2 4098 3104 1 2 1 3 1 4 1 32 1 49 1 117 1 194 1 626 1 922 2 30 2 283 3 5 3 190 3 385 3 450 3 796 3 1091 4 6 4 9 4 89 4 426 4 1068 4 3897 5 7 5 13 5 87 5 267 5 2436 6 205 6 1673 6 2826 6 3717 7 80 7 1483 8 16 8 164 8 460 8 589 8 1296 8 1847 8 2029 8 2440 8 3207 9 18 10 71 10 1086 10 2094 11 12 11 14 ...
output:
9ff923928e5675d6f7ae686fcfb20beac84bc7b1a47cf13bde24b59497bcae3b4900097049e1c568aa409defdbadf4cfc599c0e496e22068170cce547295ffa4 Incorrect answer.