제출 #511057

#제출 시각아이디문제언어결과실행 시간메모리
511057Gurban게임 (IOI14_game)C++17
컴파일 에러
0 ms0 KiB
#include "bits/stdc++.h" #include "boxes.h" using namespace std; using ll = long long; ll delivery(int N, int K, int L, int p[]) { vector<int>cep,sag; int bnd = L / 2; for(int i = 0;i < N;i++){ if(p[i] <= bnd) cep.push_back(p[i]); else sag.push_back(L - p[i]); } reverse(sag.begin(),sag.end()); vector<ll>cp_dp((int)cep.size()); vector<ll>sg_dp((int)sag.size()); int SZc = (int)cep.size(); int SZs = (int)sag.size(); for(int i = 0;i < SZc;i++){ if(i < K) cp_dp[i] = 2ll*cep[i]; else cp_dp[i] = 2ll*cep[i] + cp_dp[i - K]; } for(int i = 0;i < SZs;i++){ if(i < K) sg_dp[i] = 2ll*sag[i]; else sg_dp[i] = 2ll*sag[i] + sg_dp[i - K]; } ll ans = 0; if(!cep.empty()) ans += cp_dp.back(); if(!sag.empty()) ans += sg_dp.back(); for(int i = 0;i <= min(K,SZc);i++){ ll nw = 0; if(i != SZc) nw = cp_dp[SZc - i - 1]; ll now = nw; int lft = K - i; if(lft < SZs) now += sg_dp[SZs - lft - 1]; ans = min(ans,now + L); lft = 2*K - i; if(lft < SZs) nw += sg_dp[SZs - lft - 1]; ans = min(ans,nw + 2ll*L); } return ans; }

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

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