제출 #380114

#제출 시각아이디문제언어결과실행 시간메모리
380114Theo830게임 (IOI14_game)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll,ll> ii; #define iii pair<ll,ii> #define f(i,a,b) for(ll i = a;i < b;i++) #define pb push_back #define vll vector<ll> #define F first #define S second #define all(x) (x).begin(), (x).end() ll MOD = 998244353; ll siz[1505] = {0}; ll par[1505]; ll N; ll find_par(ll x){ if(par[x] == x){ return x; } return par[x] = find_par(par[x]); } void enose(ll x,ll y){ ll p1 = find_par(x); ll p2 = find_par(y); par[p2] = p1; siz[p1] += siz[p2]; siz[p2] = 0; } void initialize(int n){ f(i,0,n+5){ siz[i] = 1; par[i] = i; } N = n; } int hasEdge(int u, int v){ if(u > v){ swap(u,v); } ll p1 = find_par(u); ll p2 = find_par(v); if(p1 == p2){ return 1; } if(siz[p1] + siz[p2] <= N/2){ enose(u,v); return 1; } return 0; } int main(void){ ios_base::sync_with_stdio(0); cin.tie(0); f(i,0,4){ f(j,i+1,4){ hasEdge(i,j); } } }

컴파일 시 표준 에러 (stderr) 메시지

/tmp/ccTuSGlI.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccXkZzQH.o:game.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status