Submission #64934

#TimeUsernameProblemLanguageResultExecution timeMemory
64934mirbek01Boxes with souvenirs (IOI15_boxes)C++17
10 / 100
3 ms404 KiB
#include "boxes.h" # include <bits/stdc++.h> using namespace std; long long delivery(int N, int K, int L, int p[]) { long long ans = 1e18; for(int i = 0; i < N; i ++){ long long res = 0; for(int j = i; j >= 0; j -= K){ res += p[j] * 2; } for(int j = i + 1; j < N; j += K){ res += (L - p[j]) * 2; } ans = min(ans, res); } return ans; }
#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...