Submission #154348

#TimeUsernameProblemLanguageResultExecution timeMemory
154348songc동굴 (IOI13_cave)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "cave.h" using namespace std; typedef long long LL; typedef pair<int,int> pii; int N; int S[5050]; int ans[5050]; void exploreCave(int n) { N = n; memset(ans, -1, sizeof ans); for (int i=0; i<N; i++){ bool st = (i == tryCombination(S)); int l = 0, r=N-1; while (l < r){ int mid = (l+r)/2; for (int i=l; i<=mid; i++) if (ans[i] == -1) S[i] = 1; bool ret = (i == tryCombination()); if (st == ret) l = mid+1; else r = mid; for (int i=l; i<=mid; i++) if (ans[i] == -1) S[i] = 0; } ans[i] = l; if (st) S[l] = 1; } answer(S, ans); }

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:20:39: error: too few arguments to function 'int tryCombination(int*)'
       bool ret = (i == tryCombination());
                                       ^
In file included from cave.cpp:2:0:
cave.h:8:5: note: declared here
 int tryCombination(int S[]);
     ^~~~~~~~~~~~~~