# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
668801 | Astrayt | Boxes with souvenirs (IOI15_boxes) | C++17 | 0 ms | 0 KiB |
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 <bits/stdc++.h>
using namespace std;
ll delivery(int N, int K, int L, int pos[]){
if(K == 1){
long long ret = 0;
for(int i = 0; i < N; ++i){
int dist = min(pos[i], L - pos[i]);
ret += 2ll * dist;
}
return ret;
}
}