제출 #30044

#제출 시각아이디문제언어결과실행 시간메모리
30044ozaslan동굴 (IOI13_cave)C++14
컴파일 에러
0 ms0 KiB
#include "cave.h" #define max_N 5005 int kul[max_N], S[max_N], D[max_N]; void degis(int sol, int orta) { for(int i = sol; i <= orta; i++) if(!kul[i]) S[i] = (S[i]+1) %2; } void exploreCave(int N) { for(int i = 0; i < N; i++) { int sol = 0, sag = N-1; int kapi = tryCombination(S); int acik = kapi > i || kapi == -1 ? 1: 0; while(sol != sag) { int orta = (sol + sag) / 2; degis(sol, orta); kapi = tryCombination(S); int sonra = kapi > i || kapi == -1 ? 1: 0; degis(sol, orta); if(sonra != acik) sag = orta; else sol = orta+1; } kul[sol] = 0; S[sol] = acik; D[sol] = i; } answer(S, D); } #include "graderlib.c" int main() { int N; N = init(); exploreCave(N); printf("INCORRECT\nYour solution did not call answer().\n"); return 0; }

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

/tmp/ccfPgnbp.o: In function `answer':
cave.cpp:(.text+0x50): multiple definition of `answer'
/tmp/cccXAt4k.o:grader.c:(.text+0x0): first defined here
/tmp/ccfPgnbp.o: In function `tryCombination':
cave.cpp:(.text+0xe0): multiple definition of `tryCombination'
/tmp/cccXAt4k.o:grader.c:(.text+0x90): first defined here
/tmp/ccfPgnbp.o: In function `init()':
cave.cpp:(.text+0x360): multiple definition of `init()'
/tmp/cccXAt4k.o:grader.c:(.text+0x140): first defined here
/tmp/ccfPgnbp.o: In function `main':
cave.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/cccXAt4k.o:grader.c:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status