This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "boxes.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define ff first
#define ss second
ll n, k, l;
vector <ll> arr;
ll delivery(int N, int K, int L, int p[]) {
    ll cnt = 0;
    n = (ll)N;
    k = (ll)K;
    l = (ll)L;
    arr.resize(n);
    for (int i=0; i<n; i++) arr[i] = (ll)p[i];
    for (ll x : arr) cnt += min(x, l-x);
    return cnt*2LL;
}
| # | 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... |