Submission #236338

#TimeUsernameProblemLanguageResultExecution timeMemory
236338kshitij_sodaniAirline Route Map (JOI18_airline)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
typedef int64_t llo;
#define mp make_pair
#define pb push_back
#define a first
#define b second

#include "Alicelib.h"

map<int,int> x;
/*void InitG(int ac,int bc){
	cout<<ac<<" "<<bc<<endl;
}
void MakeG(int ac,int bc,int cc){
	cout<<bc<<" "<<cc<<endl;
}*/
void Alice(int n, int m, int aa[], int bb[]){
	for(int i=0;i<1024;i++){
		x[i]=i;
	}
	x[511]=1003;
	x[767]=1005;
	x[895]=1006;
	x[959]=1011;
	x[991]=1013;

	vector<pair<int,int>> ans;
	for(int i=0;i<m;i++){
		ans.pb({aa[i],bb[i]});
	}
	for(int ii=0;ii<n;ii++){
		int i=x[ii];
		for(int j=0;j<10;j++){
			if(i&(1<<j)){
				ans.pb({n+2+j,ii});
			}
		}
	}
	for(int i=0;i<n;i++){
		ans.pb({n+1,i});
	}
	for(int j=0;j<n+12;j++){
		if(j==n or j==n+1){
			continue;
		}
		ans.pb({n,j});
	}
	for(int i=n+2;i<n+11;i++){
		ans.pb({i,i+1});
	}
	InitG(n+12,ans.size());
	int kk=0;
	for(auto j:ans){
		MakeG(kk,j.a,j.b);
		kk+=1;
	}

}

/*int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int no,mo;
	cin>>no>>mo;
	int cc[mo];
	int dd[mo];
	for(int i=0;i<mo;i++){
		cin>>cc[i]>>dd[i];
	}
	Alice(no,mo,cc,dd);

	return 0;
}*/
#include <bits/stdc++.h>
using namespace std;
typedef int64_t llo;
#define mp make_pair
#define pb push_back
#define a first
#define b second

#include "Alicelib.h"

map<int,int> x;
/*void InitG(int ac,int bc){
	cout<<ac<<" "<<bc<<endl;
}
void MakeG(int ac,int bc,int cc){
	cout<<bc<<" "<<cc<<endl;
}*/
void Alice(int n, int m, int aa[], int bb[]){
	for(int i=0;i<1024;i++){
		x[i]=i;
	}
	x[511]=1003;
	x[767]=1005;
	x[895]=1006;
	x[959]=1011;
	x[991]=1013;

	vector<pair<int,int>> ans;
	for(int i=0;i<m;i++){
		ans.pb({aa[i],bb[i]});
	}
	for(int ii=0;ii<n;ii++){
		int i=x[ii];
		for(int j=0;j<10;j++){
			if(i&(1<<j)){
				ans.pb({n+2+j,ii});
			}
		}
	}
	for(int i=0;i<n;i++){
		ans.pb({n+1,i});
	}
	for(int j=0;j<n+12;j++){
		if(j==n or j==n+1){
			continue;
		}
		ans.pb({n,j});
	}
	for(int i=n+2;i<n+11;i++){
		ans.pb({i,i+1});
	}
	InitG(n+12,ans.size());
	int kk=0;
	for(auto j:ans){
		MakeG(kk,j.a,j.b);
		kk+=1;
	}

}

/*int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int no,mo;
	cin>>no>>mo;
	int cc[mo];
	int dd[mo];
	for(int i=0;i<mo;i++){
		cin>>cc[i]>>dd[i];
	}
	Alice(no,mo,cc,dd);

	return 0;
}*/

Compilation message (stderr)

/tmp/cc3YKNM0.o: In function `main':
grader_bob.cpp:(.text.startup+0xcd): undefined reference to `Bob(int, int, int*, int*)'
/tmp/cczxDgFW.o: In function `Alice(int, int, int*, int*)':
Bob.cpp:(.text+0x5d1): undefined reference to `InitG(int, int)'
Bob.cpp:(.text+0x5f8): undefined reference to `MakeG(int, int, int)'
collect2: error: ld returned 1 exit status