# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
197466 | AaronNaidu | 선물상자 (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 <bits/stdc++.h>
using namespace std;
int delivery(int n, int k, int l, int positions[]) {
int sum = 0;
if(k == 1) {
for(int i = 0; i < n; i++) {
sum += min(positions[i], n - positions[i]);
}
return sum;
}
sort(positions, positions + n);
if(k == n) {
if(positions[0] > (double) n/2) {
return 2 * (n - positions[0]);
}
if(positions[n-1] < (double) n/2) {
return 2 * positions[n-1];
}
return n;
}
int delivered = 0;
int frontIndex = 0;
while (delivered < n)
{
int carrying = k;
int current = 0;
while (carrying and current)
{
/* code */
}
}
return n;
}
int main() {
return 0;
}