답안 #202131

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
202131 2020-02-14T01:38:52 Z Segtree Amusement Park (JOI17_amusement_park) C++14
컴파일 오류
0 ms 0 KB
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<set>
#include<unordered_set>
#include<unordered_map>
#include"Joi.h"
using namespace std;
typedef long long ll;
typedef vector<int> vi;
#define chmax(a,b) a=max(a,b)
#define chmin(a,b) a=min(a,b)
#define all(x) x.begin(),x.end()
#define rep(i,n) for(int i=0;i<n;i++)
#define mod 1000000007
#define mad(a,b) a=(a+b)%mod
void Joi(int N,int M,vi A,vi B,ll X,int T){
    for(int i=0;i<60;i++){
	bool val=X&(1LL<<i);
	MessageBoard(val,i);
    }
    for(int i=60;i<N;i++){
	MessageBoard(0,i);
    }
}
//----------------

/*int main(){
    
}*/


#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<set>
#include<unordered_set>
#include<unordered_map>
#include"Ioi.h"
using namespace std;
typedef long long ll;
typedef vector<int> vi;
#define chmax(a,b) a=max(a,b)
#define chmin(a,b) a=min(a,b)
#define all(x) x.begin(),x.end()
#define rep(i,n) for(int i=0;i<n;i++)
#define mod 1000000007
#define mad(a,b) a=(a+b)%mod

vector<ll> g[10010];
ll vis[10010];
void dfs(ll x,bool fi){
    if(vis[x]>=0)return;
    if(fi)vis[x]=0;
    else vis[x]=Move(x);
    for(auto y:g[x]){
	dfs(y,0);
    }
}

ll Ioi(int N,int M,vi A,vi B,int P,int V,int T){
    rep(i,M){
	g[A[i]].push_back(B[i]);
	g[B[i]].push_back(A[i]);
    }
    rep(i,N)vis[i]=-1;
    dfs(P,1);
    vis[P]=V;
    ll ans=0;
    for(int i=0;i<60;i++){
	ans+=(1LL<<i)*vis[i];
    }
    return ans;
}
/*int main(){
    
}*/


Compilation message

/tmp/cc2SmXjX.o: In function `main':
grader_joi.cpp:(.text.startup+0x1ac): undefined reference to `Joi(int, int, int*, int*, long long, int)'
collect2: error: ld returned 1 exit status

/tmp/ccbIsd56.o: In function `main':
grader_ioi.cpp:(.text.startup+0x36a): undefined reference to `Ioi(int, int, int*, int*, int, int, int)'
collect2: error: ld returned 1 exit status