제출 #212787

#제출 시각아이디문제언어결과실행 시간메모리
212787KoalaMuch동굴 (IOI13_cave)C11
컴파일 에러
0 ms0 KiB
#include "cave.h" #include "grader.c" #include<stdio.h> void exploreCave(int n) { int s[n],d[n],ask[n]; for(int i=0;i<n;i++) s[i] = d[i] = -1; for(int i=0;i<n;i++) { int cor = 0; for(int j=0;j<n;j++) { if(s[j]==-1) ask[j] = 0; else ask[j] = s[j]; } cor^=tryCombination(ask)==i; int l = 0,r = n-1; while(l<r) { int mid = (l+r) >> 1; for(int j=l;j<=mid;j++) { if(s[j]==-1) ask[j] = cor; else ask[j] = s[j]; } for(int j=mid+1;j<=r;j++) { if(s[j]==-1) ask[j] = cor^1; else ask[j] = s[j]; } if(tryCombination(ask)==i) r=mid; else l=mid+1; } d[i] = l; s[l] = cor; } answer(s,d); }

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

/tmp/ccMFGJcK.o: In function `answer':
cave.c:(.text+0x0): multiple definition of `answer'
/tmp/ccvOQAeN.o:grader.c:(.text+0x0): first defined here
/tmp/ccMFGJcK.o: In function `tryCombination':
cave.c:(.text+0x90): multiple definition of `tryCombination'
/tmp/ccvOQAeN.o:grader.c:(.text+0x90): first defined here
/tmp/ccMFGJcK.o: In function `init':
cave.c:(.text+0x130): multiple definition of `init'
/tmp/ccvOQAeN.o:grader.c:(.text+0x130): first defined here
/tmp/ccMFGJcK.o: In function `main':
cave.c:(.text.startup+0x0): multiple definition of `main'
/tmp/ccvOQAeN.o:grader.c:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status