제출 #563580

#제출 시각아이디문제언어결과실행 시간메모리
563580hoanghq2004구슬과 끈 (APIO14_beads)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #pragma GCC optimize ("O3") #pragma GCC optimize ("unroll-loops") #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include "boxes.h" using namespace __gnu_pbds; using namespace std; template <typename T> using ordered_set = tree <T, null_type, less <T>, rb_tree_tag, tree_order_statistics_node_update>; const int N = 1e7 + 10; long long f[N], g[N]; int p[N]; long long delivery(int n, int k, int l, vector <int> P) { for (int i = 0; i < n; ++i) p[i + 1] = P[i]; for (int i = 1; i <= n; ++i) f[i] = f[max(0, i - k)] + 2 * p[i]; for (int i = n; i >= 1; --i) g[i] = g[min(n + 1, i + k)] + 2 * (l - p[i]); long long ans = 1e18; k = min(k, n); for (int i = 1; i <= n; ++i) ans = min(ans, f[i] + g[i + 1]); for (int i = 1; i <= n; ++i) { for (int j = i; j <= n; ++j) { int t = ceil(1.0L * (j - i + 1) / k); ans = min(ans, f[i - 1] + g[i + 1] + 1LL * t * l); } } return ans; } // //int main() { // ios :: sync_with_stdio(0); cin.tie(0); // int n, k, l; // cin >> n >> k >> l; // vector <int> p(n); // for (int i = 0; i < n; ++i) cin >> p[i]; // cout << delivery(n, k, l, p); //}

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

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