Submission #291398

#TimeUsernameProblemLanguageResultExecution timeMemory
291398BertedBoxes with souvenirs (IOI15_boxes)C++14
10 / 100
1 ms256 KiB
#include "boxes.h" #include <iostream> #include <utility> #include <algorithm> using namespace std; long long delivery(int N, int K, int L, int p[]) { long long res = 0; int i = 0; for (; i < N && p[i] == 0; i++); for (;i < N; i += K) { res += min({L, 2 * p[min(N - 1, i + K - 1)], 2 * (L - p[i])}); } return res; }
#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...