QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#799015#63. MeetingsSimonLJKCompile Error//C++141018b2024-12-04 20:32:532024-12-04 20:33:02

Judging History

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

  • [2024-12-04 20:33:02]
  • 评测
  • [2024-12-04 20:32:53]
  • 提交

answer

#include"meeting.h"
#include<bits/stdc++.h>
using namespace std;
mt19937 rd(14685413);
vector<int> b[2009];
void solve(int rt,vector<int> vec){
	b[rt].clear();
	if(!vec.size()) return;
	if(vec.size()==1){ Bridge(rt,vec[0]); return; }
	random(vec.begin(),vec.end());
	int nd=vec.back(); vec.pop_back();
	vector<int> sta;
	int v,w;
	for(int i=0;i<vec.size();i++){
		v=vec[i]; w=Query(rt,nd,v);
		if(w==v){ sta.push_back(v); }
		else{ b[w].push_back(v); }
	}
	int l,r,mid,re;
	for(int i=1;i<vec.size();i++){
		l=0,r=i-1,re=i;
		while(l<=r){
			mid=(l+r)/2;
			if(Query(rt,vec[mid],vec[i])==vec[i]) re=mid,l=mid-1;
			else r=mid+1;
		}
		for(int j=i;j>re;j--)
			swap(vec[j],vec[j-1]);
	}
	for(int i=1;i<vec.size();i++)
		Bridge(vec[i-1],vec[i]);
	Bridge(rt,vec[0]); Bridge(vec.back(),nd);
	for(int i=0;i<vec.size();i++)
		Solve(vec[i],b[vec[i]]);
	return;
}
void solve(int N){
	int rt=rd()%N;
	for(int i=0;i<N;i++)
		if(i!=rt)
			b[rt].push_back(i);
	solve(rt,b[rt]);
	return;
}

Details

answer.code:1:9: fatal error: meeting.h: No such file or directory
    1 | #include"meeting.h"
      |         ^~~~~~~~~~~
compilation terminated.