Submission #890063

#TimeUsernameProblemLanguageResultExecution timeMemory
890063preskoCave (IOI13_cave)C++14
Compilation error
0 ms0 KiB
#include "cave.h" #include "grader.c" bool found[6000]; int state[6000]; int swtch[6000]; bool start[6000]; int s[6000]; void fill(int ind,int n) { int l=0,r=n-1; while(r!=l) { int mid=(l+r+1)/2; for(int i=0;i<n;i++) { if(found[i]){s[i]=state[i];continue;} if(i<mid)s[i]=1; else s[i]=0; } int ans=tryCombination(s); bool sta=0; if(ans>ind)sta=1; if(sta!=start[ind])r=mid-1; else l=mid; } swtch[l]=ind; found[l]=1; state[l]=s[l]; } void exploreCave(int N) { int res=tryCombination(s); for(int i=0;i<res;i++)start[i]=1; for(int i=0;i<N;i++)fill(i,N); answer(state,swtch); }

Compilation message (stderr)

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