Submission #1152974

#TimeUsernameProblemLanguageResultExecution timeMemory
1152974vladiliusBoxes with souvenirs (IOI15_boxes)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long; using pii = pair<int, int>; #define pb push_back #define ff first #define ss second ll delivery(int n, int k, int L, vector<int> x){ sort(x.begin(), x.end()); x.insert(x.begin(), 0); vector<ll> dp(n + 1, 1e18); dp[0] = 0; for (int i = 1; i <= n; i++){ for (int j = max(1, i - k + 1); j <= i; j++){ dp[i] = min({dp[i], dp[j - 1] + L, dp[j - 1] + 2 * x[i], dp[j - 1] + 2 * (L - x[j])}); } } return dp[n]; }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccCBOh2w.o: in function `main':
grader.c:(.text.startup+0x1ec): undefined reference to `delivery(int, int, int, int*)'
collect2: error: ld returned 1 exit status