제출 #420276

#제출 시각아이디문제언어결과실행 시간메모리
420276Azimjon선물상자 (IOI15_boxes)C++17
0 / 100
1 ms332 KiB
#include "boxes.h" #include <bits/stdc++.h> using namespace std; const int INF = 2e9; long long delivery(int n, int k, int L, int p[]) { long long ans = 0; double ur = L / 2; int l, r; l = 0; r = n - 1; while (p[l + k - 1] <= ur) { ans += 2 * p[l + k - 1]; l += k; } // cerr << ans << endl; while (p[r - k + 1] > (ur)) { ans += 2 * (L - p[r - k + 1]); r -= k; } 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...