| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 307659 | amunduzbaev | Boxes with souvenirs (IOI15_boxes) | C++14 | 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 "boxes.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
long long delivery(int n, int k, int m, int p[]) {
ll ans=0;
sort(p,p+n);
if(k==1){
for(int i=0;i<n;i++){
int a=(p[i]<=l/2 ? p[i]:l-p[i]);
ans+=2*a;
}
}
return ans;
}
