Submission #717245

#TimeUsernameProblemLanguageResultExecution timeMemory
717245JuanCave (IOI13_cave)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #include "cave.h" using namespace std; void ExploreCave(int N){ vector<int> unprocessed; for(int i = 0; i < N; i++) unprocessed.push_back(i); int vask[N]={}, S[N]={}; int D[N]={}; for(int i = 0; i < N; i++){ for(int x : unprocessed) vask[x] = 0; S[i] = 1; if(tryCombination(vask)!=i){ for(int x : unprocessed) vask[x] = 1; S[i] = 0; } int pos = -1; int l = 0, r = unprocessed.size()-1; while(l<=r){ int m = (l+r)>>1; for(int j = 0; j <= m; j++) vask[unprocessed[j]] = 1-vask[unprocessed[j]]; int ret = tryCombination(vask); if(ret==i) pos = m, l = m+1; else r = m-1; for(int j = 0; j <= m; j++) vask[unprocessed[j]] = 1-vask[unprocessed[j]]; } D[i] = pos+1; unprocessed.erase(unprocessed.begin()+pos+1); } answer(S, D); }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccb8QGcN.o: in function `main':
grader.c:(.text.startup+0x10): undefined reference to `exploreCave'
collect2: error: ld returned 1 exit status