Submission #670683

#TimeUsernameProblemLanguageResultExecution timeMemory
670683kojacCave (IOI13_cave)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #include"cave.h" using namespace std; #define MAXN (int)(5e3+10) using pii = pair<long long,long long>; using ll = long long; void exploreCave(int N){ int s[N], ans[N], mark[N]; for(int i = 0; i < N; i++){ s[i] = 0; ans[i] = 0; mark[i] = false; } for(int i = 0; i < N; i++){ int l = 0, r = N-1; bool aux = false; int x = tryCombination(s); if(x > i || x == -1){ aux = true; } while(l <= r){ int mid = (l+r)/2; if(l == r){ mark[mid] = true; ans[mid] = i; if(aux) s[mid] = 0; else s[mid] = 1; break; } for(int j = l; j <= r; j++){ if(mark[j])continue; if(j <= mid) s[j] = 1; else s[j] = 0; } int x = tryCombination(s); if(aux){ if(x > i || x > -1){ l = mid+1; }else r = mid; }else{ if(x > i || x == -1){ r = mid; }else l = mid+1; } } } answer(s, ans); } int main(){ ios_base::sync_with_stdio(false); cout.tie(NULL); return 0; }

Compilation message (stderr)

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