# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
54016 | ernestvw | Boxes with souvenirs (IOI15_boxes) | C++11 | 2 ms | 428 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;
//#define int long long
void fast_io() {
ios_base::sync_with_stdio(false);
cin.tie(NULL); cout.tie(NULL);
}
int n, k, l;
int delivery(int N, int K, int L, int *positions) {
n = N, k = K, l = L;
if(k == n) {
int ans = L;
for(int i = 0; i < n; i++) {
int cur = 2 * positions[i];
if(i<n-1)cur += 2 * (L - positions[i+1]);
ans = min(ans, cur);
}
return ans;
}
}
/*
signed main() {
fast_io();
}*/
Compilation message (stderr)
# | 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... |