제출 #250401

#제출 시각아이디문제언어결과실행 시간메모리
250401hhh07동굴 (IOI13_cave)C++14
컴파일 에러
0 ms0 KiB
#include <iostream> #include <vector> #include <algorithm> #include <queue> #include <utility> #include <set> #include <cmath> #include <climits> #include <cstring> #include "cave.h" using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<ll, ll> ii; void exploreCave(int n){ int x[n]; int curr = 0, curr2 = n - 1; int pitaj[n], ans[n]; for (int i = 0; i < n; i++){ pitaj[i] = 1; ans[i] = 1; x[i] = -1; } for (int i = 0; i < n; i++){ int beg = curr, end = curr2, odg = 0; int y = tryCombination(pitaj); if (y > i || y == -1) odg = 1; while(beg < end){ int mid = (beg + end)/2; for (int j = 0; j < n; j++) pitaj[j] = ans[j]; int y = ask(n, pitaj, x, odg, beg, mid, end); if (y > i) end = mid; else beg = mid + 1; } x[beg] = i; pitaj[beg] = odg; ans[beg] = odg; if (beg == curr) curr = beg + 1; if (beg == curr2) curr2 = beg - 1; } answer(pitaj, x); }

컴파일 시 표준 에러 (stderr) 메시지

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:38:21: error: 'ask' was not declared in this scope
             int y = ask(n, pitaj, x, odg, beg, mid, end);
                     ^~~