# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
69100 | 2018-08-20T03:36:51 Z | TuGSGeReL | Boxes with souvenirs (IOI15_boxes) | C++14 | 3 ms | 380 KB |
#include "boxes.h" #include<bits/stdc++.h> using namespace std; int i; vector<long long> a,b; long long delivery(int n, int k, int l, int p[]) { sort(p,p+n); a.push_back(0); b.push_back(0); for(i=0;i<n;i++) a.push_back(min(p[i]*2,l)),p[i]=l-p[i]; for(i=n-1;i>=0;i--) b.push_back(min(p[i]*2,l)); for(i=k;i<a.size();i++){ a[i]+=a[i-k]; b[i]+=b[i-k]; } long long ans=1e15; for(i=0;i<n;i++)ans=min(ans,a[i]+b[n-i]); return ans; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 256 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 2 ms | 380 KB | Output is correct |
3 | Incorrect | 2 ms | 308 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Incorrect | 3 ms | 256 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 256 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 256 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 256 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |