제출 #290599

#제출 시각아이디문제언어결과실행 시간메모리
290599georgerapeanu게임 (IOI14_game)C++11
컴파일 에러
0 ms0 KiB
#include <cstdio> #include <cassert> #include "game.h" int read_int() { int x; assert(scanf("%d", &x) == 1); return x; } int main() { int n, u, v; n = read_int(); initialize(n); for (int i = 0; i < n * (n - 1) / 2; i++) { u = read_int(); v = read_int(); printf("%d\n", hasEdge(u, v)); } return 0; }

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

/tmp/ccu7veKR.o: In function `read_int()':
grader.cpp:(.text+0x0): multiple definition of `read_int()'
/tmp/ccmcMvED.o:game.cpp:(.text+0x0): first defined here
/tmp/ccu7veKR.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccmcMvED.o:game.cpp:(.text.startup+0x0): first defined here
/tmp/ccmcMvED.o: In function `main':
game.cpp:(.text.startup+0xe): undefined reference to `initialize(int)'
game.cpp:(.text.startup+0x45): undefined reference to `hasEdge(int, int)'
/tmp/ccu7veKR.o: In function `main':
grader.cpp:(.text.startup+0xe): undefined reference to `initialize(int)'
grader.cpp:(.text.startup+0x41): undefined reference to `hasEdge(int, int)'
collect2: error: ld returned 1 exit status