QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#674178 | #8726. Magic Show | Physics212303 | Compile Error | / | / | C++17 | 1.9kb | 2024-10-25 14:24:35 | 2024-10-25 14:24:35 |
Judging History
Alice
#include "Alice.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
const int N=5000;
mt19937 g(time(0)),g2(20090219);
uniform_int_distribution<> u(200,300);
inline vector<int> gen(){
vector<int> p(N);
iota(p.begin(),p.end(),0);
shuffle(p.begin(),p.end(),g2);
return p;
}
vector<pii> Alice(){
ll X=setN(N);
vector<pii> e;
int B=u(g);
if(X<=N){
for(int i=1;i<=N;i++)
if(X!=i)e.emplace_back(X,i);
return e;
}
for(int i=3001;i<=N;i++)
e.emplace_back(i,B<<3^(i/60<<2)^(i%60));
vector<int> v;
while(X)v.emplace_back(X%B),X/=B;
for(int i=1501;i<=3000;i++)
e.emplace_back(i,v.size()<<3^(i/61<<2)^(i%61));
for(int i=501,c=0;i<=1500;i++,c%=v.size())
e.emplace_back(i,v[c++]+i/62);
for(int i=2;i<=500;i++)
e.emplace_back(i,g()%(i-1)+1);
auto p=gen();
for(auto &[x,y]:e)
assert(x>=y),x=p[x-1]+1,y=p[y-1]+1;
shuffle(e.begin(),e.end(),g);
return e;
}
Bob
#include "Alice.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
const int N=5000;
mt19937 g(time(0)),g2(20090219);
uniform_int_distribution<> u(200,300);
inline vector<int> gen(){
vector<int> p(N);
iota(p.begin(),p.end(),0);
shuffle(p.begin(),p.end(),g2);
return p;
}
vector<pii> Alice(){
ll X=setN(N);
vector<pii> e;
int B=u(g);
if(X<=N){
for(int i=1;i<=N;i++)
if(X!=i)e.emplace_back(X,i);
return e;
}
for(int i=3001;i<=N;i++)
e.emplace_back(i,B<<3^(i/60<<2)^(i%60));
vector<int> v;
while(X)v.emplace_back(X%B),X/=B;
for(int i=1501;i<=3000;i++)
e.emplace_back(i,v.size()<<3^(i/61<<2)^(i%61));
for(int i=501,c=0;i<=1500;i++,c%=v.size())
e.emplace_back(i,v[c++]+i/62);
for(int i=2;i<=500;i++)
e.emplace_back(i,g()%(i-1)+1);
auto p=gen();
for(auto &[x,y]:e)
assert(x>=y),x=p[x-1]+1,y=p[y-1]+1;
shuffle(e.begin(),e.end(),g);
return e;
}
Details
/usr/bin/ld: /tmp/cclBPBEh.o: in function `main': grader_Bob.cpp:(.text.startup+0x2d1): undefined reference to `Bob(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >)' /usr/bin/ld: /tmp/ccPjgmVg.o: in function `Alice()': Bob.code:(.text+0x202): undefined reference to `setN(int)' collect2: error: ld returned 1 exit status