| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 1210062 | sula2 | 선물상자 (IOI15_boxes) | C++20 | 0 ms | 0 KiB | 
#include <bits/stdc++.h>
#define all(a) a.begin(), a.end()
#define popcount(x) __builtin_popcountll(x)
using namespace std;
using namespace chrono;
long long delivery(int n, int k, int l, int* a) {
    return min({
        a[n-1]*2,
        2*(l - a[0]),
        l
    });
}
int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int a[] = {1, 2, 5};
    cout << delivery(3, 3, 8, a);
}
