QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#601247#8726. Magic Showxwh_MarvelousCompile Error//C++141.3kb2024-09-29 21:49:442024-09-29 21:49:45

Judging History

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

  • [2024-09-29 21:49:45]
  • 评测
  • [2024-09-29 21:49:44]
  • 提交

Alice

#include<bits/stdc++.h>
#include"Alice.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];
int n=5000;
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>
#include"Bob.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];
int n=5000;
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;
}

詳細信息

Bob.code: In function ‘long long int Bob(std::vector<std::pair<int, int> >)’:
Bob.code:24:26: error: ‘struct std::pair<int, int>’ has no member named ‘fi’
   24 |                 int u=op.fi,v=op.se;
      |                          ^~
Bob.code:25:22: error: ‘v’ was not declared in this scope
   25 |                 if(u>v)swap(u,v);
      |                      ^
Bob.code:26:31: error: ‘v’ was not declared in this scope
   26 |                 ans|=(b[u]<<a[v]);
      |                               ^