Submission #288978

#TimeUsernameProblemLanguageResultExecution timeMemory
288978user202729Boxes with souvenirs (IOI15_boxes)C++17
50 / 100
41 ms5116 KiB
// 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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...