This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
// moreflags=grader.cpp
//
// 10
#include "boxes.h"
#include<vector>
#include<cstdint>
#include<climits>
long long delivery(int N, int K, int L, int p[]) {
if(N>1000) return -1;
std::vector<int64_t> value(N+1);
value.back()=0;
for(auto index=N; index--;){
value[index]=INT64_MAX;
for(int next=index+1; next<=std::min(N, index+K); ++next){
value[index]=std::min(value[index], value[next]+
std::min(L, 2*std::min(L-p[index], p[next-1]))
);
}
}
return value[0];
}
# | 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... |