Submission #236642

# Submission time Handle Problem Language Result Execution time Memory
236642 2020-06-02T17:02:28 Z MvC Meetings (JOI19_meetings) C++14
Compilation error
0 ms 0 KB
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include<bits/stdc++.h>
#include "meetings"
#define fr first
#define sc second
#define vec vector
#define pb push_back
#define pii pair<int, int>
#define forn(x,y) for(int x = 1 ; x <= (int)y ; ++x)
#define all(x) (x).begin(),(x).end()
#define fast cin.tie(0);cout.tie(0);cin.sync_with_stdio(0);cout.sync_with_stdio(0);
 
using namespace std;
 
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
 
 
typedef long long ll;
typedef unsigned int uint;
typedef complex<int> point;
const int nmax = 2005;
const ll linf = 1e18;
const ll mod = 998244353;
const int inf = INT_MAX;
 
vec < pii > eds;
int A,n,vz[nmax];
vector<int>vc[nmax];
/*int Query(int x,int y,int z)
{
	cout<<"Q "<<x<<" "<<y<<" "<<z<<endl;
	int rs;
	cin>>rs;
	return rs;
}*/
bool cmp(int x,int y)
{
	return Query(A,x,y)==x;
}
void solves(vec <int> tb){
	if(tb.size() == 1)return ;
	if(tb.size()==2)
	{
		eds.pb({tb[0],tb[1]});
		return;
	}
	srand(time(0));
	for(int i:tb)vc[i].clear(),vz[i]=0;
	int m=tb.size();
	A = tb[rand()%m];
	int B = tb[rand()%m];
	while(B == A)B = tb[rand()%m];
	vector<int>pth;
	for(int i : tb){
		if(i != A && i != B && Query(A,B,i) == i) pth.pb(i);
	}
	pth.pb(B);
	sort(all(pth),cmp);
	reverse(all(pth));
	pth.pb(A);
	for(int i=1;i<pth.size();i++)eds.pb({pth[i-1],pth[i]});
	for(int i=0;i<pth.size();i++)vz[pth[i]]=1,vc[pth[i]].pb(pth[i]);
	for(int i : tb){
		if(!vz[i])
		{
			vc[Query(A,B,i)].pb(i);
		}
	}
	for(int i=0;i<pth.size();i++)
	{
		solves(vc[pth[i]]);
	}
}
void Solve(int n)
{
	vec < int > asd;
	for(int i= 1; i <=n ;i++)asd.pb(i);
	solves(asd);
	for(pii ed : eds){
		Bridge(min(ed.fr,ed.sc),max(ed.fr,ed.sc));
	}
}
/*int main()
{
	//freopen("sol.in","r",stdin);
	//freopen("sol.out","w",stdout);
	//mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
	ios_base::sync_with_stdio(false);cin.tie(0);cerr.tie(0);cout.tie(0);
	cin>>n;
	
	return 0;
}*/

Compilation message

meetings.cpp:4:10: fatal error: meetings: No such file or directory
 #include "meetings"
          ^~~~~~~~~~
compilation terminated.