제출 #890076

#제출 시각아이디문제언어결과실행 시간메모리
890076kokoue동굴 (IOI13_cave)C++14
컴파일 에러
0 ms0 KiB
#include "cave.h" #include "grader.c" int bt[5001]; int used[50001]; void exploreCave(int N) { for(int i=0;i<N;i++) { used[i]=-1; } int l=0,r=N-1; for(int j=0;j<N;j++) { bool fl=0; int curr=tryCombination(bt); if(curr==j) fl=1; while(l!=r) { int mid=(l+r)/2; if((tryCombination(bt)!=j)!=fl) { r=mid; mid=(r+l)/2; for(int i=0;i<N;i++) { if(used[i]==-1) bt[i]=0; } for(int i=mid;i<=r;i++) { if(used[i]==-1) bt[i]=1; } } else { l=mid+1; mid=(r+l)/2; for(int i=0;i<N;i++) { if(used[i]==-1) bt[i]=0; } for(int i=mid;i<=r;i++) { if(used[i]==-1) bt[i]=1; } } } used[j]=l; if(fl==1) bt[l]=0; else bt[l]=1; } answer(bt,used); }

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

/usr/bin/ld: /tmp/cczy9siY.o: in function `answer':
cave.cpp:(.text+0x0): multiple definition of `answer'; /tmp/ccO8sEMY.o:grader.c:(.text+0x0): first defined here
/usr/bin/ld: /tmp/cczy9siY.o: in function `tryCombination':
cave.cpp:(.text+0x80): multiple definition of `tryCombination'; /tmp/ccO8sEMY.o:grader.c:(.text+0x80): first defined here
/usr/bin/ld: /tmp/cczy9siY.o: in function `init()':
cave.cpp:(.text+0x110): multiple definition of `init()'; /tmp/ccO8sEMY.o:grader.c:(.text+0x110): first defined here
/usr/bin/ld: /tmp/cczy9siY.o: in function `main':
cave.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccO8sEMY.o:grader.c:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status