Submission #97969

#TimeUsernameProblemLanguageResultExecution timeMemory
97969AlexLuchianovCave (IOI13_cave)C++14
Compilation error
0 ms0 KiB
#include <iostream> #include "cave.h" using namespace std; /* void answer(int S[], int D[]){ } */ /* int tryCombination(int S[]){ } */ void voidexploreCave(int n) { int door[n] = {0}, per[n] = {0}, seen[n] = {0}; for(int i = 0; i < n; i++){ int from = 0, to = n - 1; if(i < tryCombination(door)) for(int j = 0; j < n; j++) if(seen[j] == 0) door[j] ^= 1; while(from < to){ int mid = (from + to + 1) / 2; for(int j = 0; j < mid; j++) if(seen[j] == 0) door[j] ^= 1; if(i < tryCombination(door)){ to = mid - 1; } else from = mid; for(int j = 0; j < mid; j++) if(seen[j] == 0) door[j] ^= 1; } per[from] = i; seen[from] = 1; } answer(door, per); }

Compilation message (stderr)

/tmp/ccMFCw6C.o: In function `main':
grader.c:(.text.startup+0xc): undefined reference to `exploreCave'
collect2: error: ld returned 1 exit status