제출 #984587

#제출 시각아이디문제언어결과실행 시간메모리
984587SzymonKrzywda동굴 (IOI13_cave)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; int tryCombination(int S[]); void answer(int S[],int D[]); void exploreCave(int N){ int S[N]; int D[N]; int w = 0; while (w != -1){ w = tryCombination(S); if (w != -1) S[w] = 1; } for (int i=0; i<N; i++){ S[i] = (S[i]+1)%2; D[i] = tryCombination(S); S[i] = (S[i]+1)%2; } answer(S,D); }

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

/usr/bin/ld: /tmp/ccmV0oa7.o: in function `main':
grader.c:(.text.startup+0x10): undefined reference to `exploreCave'
/usr/bin/ld: /tmp/ccOzjtaa.o: in function `exploreCave(int)':
cave.cpp:(.text+0xbc): undefined reference to `tryCombination(int*)'
/usr/bin/ld: cave.cpp:(.text+0xd6): undefined reference to `tryCombination(int*)'
/usr/bin/ld: cave.cpp:(.text+0x10b): undefined reference to `tryCombination(int*)'
/usr/bin/ld: cave.cpp:(.text+0x13a): undefined reference to `answer(int*, int*)'
collect2: error: ld returned 1 exit status