제출 #1179389

#제출 시각아이디문제언어결과실행 시간메모리
1179389aguss선물상자 (IOI15_boxes)C++20
10 / 100
0 ms328 KiB
#include "boxes.h" #include <bits/stdc++.h> using namespace std; using ll = long long; long long delivery(int N, int K, int l, int p[]) { ll L = l; vector<ll> firsthalf, secondhalf; firsthalf.push_back(0); for(int i = 0; i < N; i++){ if(p[i] <= L / 2){ firsthalf.push_back(p[i]); } else { secondhalf.push_back(p[i]); } } secondhalf.push_back(L); return min(firsthalf.back() * 2 + (L - secondhalf[0]) * 2, L); }
#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...