# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
127993 | MoNsTeR_CuBe | Boxes with souvenirs (IOI15_boxes) | C++17 | 170 ms | 828 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>
#include "boxes.h"
using namespace std;
long long delivery(int N, int K, int L, int p[]) {
#define int long long
if(N <= 10){
vector< int > v(N);
for(int i = 0; i < N; i++){
v[i] = p[i];
}
int ans = numeric_limits<int>::max();
do{
for(int a : v) cout << a << ' ';
cout << endl;
int last = 0;
int curr = K;
int cost = 0;
for(int i = 0; i < (int) v.size(); i++){
if(abs(v[i]-last) + (curr ? 0 : min(last, abs(L-last))) < min(abs(L-v[i]), v[i]) + min(abs(L-last), last)){
if(!curr){
curr = K;
# | 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... |