제출 #447467

#제출 시각아이디문제언어결과실행 시간메모리
447467prvocisloA Difficult(y) Choice (BOI21_books)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "crocodile.h" typedef long long ll; using namespace std; vector<ll> b; ll query(int i) { if (b[i] == -1) b[i] = skim(i+1); return b[i]; } void solve(int n, int k, ll a, int s) { b.assign(n, -1); int lo = 0, hi = n-1; while (lo < hi) { int mid = (lo+hi)/2; if (query(mid) >= a) hi = mid; else lo = mid + 1; } int m = lo; ll sum = query(m); for (int i = 0; i < k-1; i++) sum += query(i); if (a <= sum && sum <= 2*a) { vector<int> v; for (int i = 0; i < k-1; i++) v.push_back(i+1); v.push_back(m+1); answer(v); return; } vector<pair<ll, int> > v; for (int i = 0; i < min(k, m); i++) v.push_back({query(i), i}); for (int i = max(0, m-k); i < m; i++) v.push_back({query(i), i}); sort(v.begin(), v.end()); v.erase(unique(v.begin(), v.end()), v.end()); for (int i = 0; i+k-1 < v.size(); i++) { ll sum = 0; vector<int> in; for (int j = i; j < i+k; j++) { sum += v[j].first; in.push_back(v[j].second+1); } if (a <= sum && sum <= 2*a) answer(in); } impossible(); }

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

books.cpp:2:10: fatal error: crocodile.h: No such file or directory
    2 | #include "crocodile.h"
      |          ^~~~~~~~~~~~~
compilation terminated.