| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1346273 | nathlol2 | 선물상자 (IOI15_boxes) | C++20 | 2095 ms | 12048 KiB |
#include "boxes.h"
#include <bits/stdc++.h>
#define ll long long
using namespace std;
const ll INF = 4e18;
ll delivery(int n, int k, int l, int p[]){
auto f = [&](ll x, ll y){
return min((ll)l, min(y * 2, (l - x) * 2));
};
vector<ll> dp(n + 1, INF);
dp[0] = 0;
for(int i = 1;i<=n;i++){
for(int j = i;j>=1 && j > i - k;j--){
dp[i] = min(dp[i], dp[j - 1] + f(p[j - 1], p[i - 1]));
}
}
return dp[n];
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
