제출 #1084889

#제출 시각아이디문제언어결과실행 시간메모리
1084889the_coding_pooh선물상자 (IOI15_boxes)C++14
10 / 100
0 ms348 KiB
#include "boxes.h" #include <bits/stdc++.h> #define uwu return ans; using namespace std; long long delivery(int N, int K, int L, int p[]) { long long ans = 0; if(K == 1){ for(int i = 0; i < N; i++){ ans += 2 * min(p[i], L - p[i]); } } else if(K == N){ int mn = 1e9 + 7, mx = 0; for(int i = 0; i < N; i++){ mn = min(mn, p[i]); mx = max(mx, p[i]); } ans = min({L, 2 * (L - mn), 2 * mx}); } uwu }
#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...