제출 #64934

#제출 시각아이디문제언어결과실행 시간메모리
64934mirbek01선물상자 (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...