QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#601242#8726. Magic Showxwh_MarvelousCompile Error//C++141.3kb2024-09-29 21:48:072024-09-29 21:48:08

Judging History

你现在查看的是最新测评结果

  • [2024-09-29 21:48:08]
  • 评测
  • [2024-09-29 21:48:07]
  • 提交

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++){
      |                        ^