제출 #619570

#제출 시각아이디문제언어결과실행 시간메모리
619570Mounir저울 (IOI15_scales)C++14
컴파일 에러
0 ms0 KiB
#include "boxes.h"
#include <bits/stdc++.h>
#define all(x) x.begin(), x.end()
#define chmax(x, v) x = max(x, v)
#define chmin(x, v) x = min(x, v)
#define pii pair<int, int>
#define pb push_back
#define sz(x) (int)x.size()
#define x first
#define y second
#define int long long
using namespace std;
 
const int OO = 1e18;
 
int delivery(signed nTeams, signed bSup, signed nSections, signed p[]) {
    int doGauche[nTeams], doDroite[nTeams];
    for (int i = 0; i < nTeams; ++i){
        doGauche[i] = min(nSections, 2 * p[i]);
        if (i >= bSup)
            doGauche[i] += doGauche[i - bSup];
    }

    for (int i = nTeams - 1; i >= 0; --i){
        doDroite[i] = min(nSections, 2 * (nSections - p[i]));
        if (i + bSup <= nTeams - 1)
            doDroite[i] += doDroite[i + bSup];
    }

    int mini = OO;
    for (int i = -1; i < nTeams; ++i){
        int cur = 0;
        if (i != -1)
            cur += doGauche[i];
        if (i != nTeams - 1)    
            cur += doDroite[i + 1];
        chmin(mini, cur);
    }
    return mini;
}
 

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

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