QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#601242 | #8726. Magic Show | xwh_Marvelous | Compile Error | / | / | C++14 | 1.3kb | 2024-09-29 21:48:07 | 2024-09-29 21:48:08 |
Judging History
Alice
#include<bits/stdc++.h>
using namespace std;
//#define int long long
//#define mod 1000000007
#define N 5005
//#define pii pair<int,int>
//#define fi first
//#define se second
//#define rep(i,j,k) for(int i=j;i<=k;i++)
vector<std::pair<int, int>>op;
int a[N],b[N];
vector<int>ls[2];
mt19937 rd(114514);
void gen(){
for(int i=3;i<=5000;i++)a[i]=rd()%64;
b[1]=0,b[2]=1;
for(int i=3;i<=5000;i++)b[i]=rd()%2;
}
std::vector<std::pair<int, int>> Alice(){
long long x=setN(5000);
gen();
op.push_back({1,2});
ls[0].push_back(1),ls[1].push_back(2);
for(int i=3;i<=n;i++){
op.push_back({ls[(x>>a[i])&1][rd()%ls[(x>>a[i])&1].size()],i});
ls[b[i]].push_back(i);
}
return op;
}
Bob
#include<bits/stdc++.h>
using namespace std;
// #define int long long
//#define mod 1000000007
#define N 5005
//#define pii pair<int,int>
//#define fi first
//#define se second
//#define rep(i,j,k) for(int i=j;i<=k;i++)
vector<std::pair<int, int>>op;
int a[N],b[N];
mt19937 rd(114514);
void gen(){
for(int i=3;i<=5000;i++)a[i]=rd()%64;
b[1]=0,b[2]=1;
for(int i=3;i<=5000;i++)b[i]=rd()%2;
}
long long Bob(std::vector<std::pair<int, int>> V){
gen();
long long ans=0;
for(auto op:V){
int u=op.fi,v=op.se;
if(u>v)swap(u,v);
ans|=(b[u]<<a[v]);
}
return ans;
}
Details
Alice.code: In function ‘std::vector<std::pair<int, int> > Alice()’: Alice.code:20:21: error: ‘setN’ was not declared in this scope 20 | long long x=setN(5000); | ^~~~ Alice.code:24:24: error: ‘n’ was not declared in this scope 24 | for(int i=3;i<=n;i++){ | ^