| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1310383 | kawhiet | 선물상자 (IOI15_boxes) | C++20 | 2 ms | 616 KiB |
#include <bits/stdc++.h>
#include "boxes.h"
using namespace std;
long long delivery(int n, int k, int l, int _p[]) {
vector<int> pos(n);
for (int i = 0; i < n; i++) {
pos[i] = _p[i];
}
vector<int> d(n);
for (int i = 0; i < n; i++) {
d[i] = min(pos[i], l - pos[i]);
}
long long ans = l;
for (int i = 0; i < n - 1; i++) {
ans = min(ans, 2LL * (pos[i] + l - pos[i + 1]));
}
ans = min(ans, 2LL * (l - pos[0]));
ans = min(ans, 2LL * pos[n - 1]);
return ans;
}| # | 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... | ||||
