Submission #60728

#TimeUsernameProblemLanguageResultExecution timeMemory
60728Eae02Boxes with souvenirs (IOI15_boxes)C++14
0 / 100
2 ms376 KiB
#include "boxes.h" #include <bits/stdc++.h> long long delivery(int numTeams, int capacity, int numSections, int p[]) { std::vector<int64_t> timeL(numTeams); std::vector<int64_t> timeR(numTeams); for (int i = 0; i < numTeams; i++) { timeL[i] = std::min(p[i] * 2, numSections); timeR[i] = std::min((numSections - p[i]) * 2, numSections); } for (int i = capacity + 1; i < numTeams; i++) { timeL[i] += timeL[i - capacity]; int ri = numTeams - i - 1; timeR[ri] += timeR[ri + capacity]; } int64_t t = INT64_MAX; for (int i = 0; i < numTeams; i++) { t = std::min(t, timeL[i] + timeR[i]); } return t; }
#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...