# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
813142 | OrazB | Boxes with souvenirs (IOI15_boxes) | C++14 | 1 ms | 304 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;
#define all(x) (x).begin(), (x).end()
#define ll long long int
#define pii pair <int, int>
#define pb push_back
#define ff first
#define ss second
// const int N = 1e5+5;
ll delivery(int n, int K, int L, int p[]){
ll sum = 0;
int j = -1;
for (int i = 0; i < n; i++){
sum += min(p[i], L-p[i])*2;
// if (L-p[i] >= p[i]) j = i;
}
return sum;
// if (j == -1 or j == n-1) return n;
// return min(n, min(n, p[j]*2)+min(n, (L-p[j+1])*2));
}
// int main ()
// {
// ios::sync_with_stdio(false);
// cin.tie(0);
// cin >> t;
// while (t--){
// }
// }
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... |