Submission #1129249

#TimeUsernameProblemLanguageResultExecution timeMemory
1129249coolavy999Boxes with souvenirs (IOI15_boxes)C++20
0 / 100
0 ms328 KiB
// Problem: https://oj.uz/problem/view/IOI15_boxes #include "bits/stdc++.h" using namespace std; using ll = long long; ll delivery(int n, int k, int l, int pos[]) { sort(pos, pos + n); if (k == 1) { // subtask 1 return (n * (l - 1) * 1ll + min(2ll * min(pos[0], l - pos[n - 1] + 1), 1ll * l)); } else if (k == n) { // subtask 2 return l; } else { // subtask 3-7 return 47; } }
#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...