Submission #1084882

#TimeUsernameProblemLanguageResultExecution timeMemory
1084882the_coding_poohBoxes with souvenirs (IOI15_boxes)C++14
0 / 100
1 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 += 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...