Submission #942950

#TimeUsernameProblemLanguageResultExecution timeMemory
942950salmonPortals (BOI14_portals)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "books.h" using namespace std; void solve(int N, int K, long long A, int S) { long long int lst[20]; long long int sum = 0; for(int i = 1; i <= K; i++){ lst[i] = skim(i); sum += lst[i]; } if(sum >= A * 2){ impossible(); } else if(sum >= A){ vector<int> v; for(int i = 1; i <= K; i++){ v.push_back(i); } answer(v); } else{ vector<int> v; int s = 1; int e = N + 1; while(s != e){ int m = (s + e) / 2; if(skim(m) >= A){ e = m; } else{ s = m + 1; } } if(s != N + 1){ long long int tomp = skim(s); if(sum - lst[K] + tomp <= A * 2){ for(int i = 1; i <= K - 1; i++){ v.push_back(i); } v.push_back(s); answer(v); return; } N = tomp - 1; } set<int> sat; for(int i = 1; i <= K; i++){ sat.insert(i); } for(int i = 0; i < K; i++){ sat.erase(K - i); sat.insert(N - i); sum -= lst[K - i]; sum += skim(N - i); if(A <= sum && sum <= A * 2){ for(int i : sum){ v.push_back(i); } answer(v); return; } } impossible(); } }

Compilation message (stderr)

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