| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 444560 | BT21tata | Boxes with souvenirs (IOI15_boxes) | C++17 | 1 ms | 204 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "boxes.h"
#include<bits/stdc++.h>
typedef long long ll;
using namespace std;
ll ans;
ll delivery(int n, int k, int l, int p[])
{
sort(p, p+n);
for(int i=0; i<n; i++)
ans+=min(p[i]*2, (l-p[i])*2);
if(k==n)
{
ans=min(ans, 1ll*p[n-1]*2);
ans=min(ans, 1ll*(l-p[0])*2);
ans=min(ans, 1ll*l);
for(int i=0; i<n-1; i++)
ans=min(ans, 1ll*p[i]*2+1ll*(l-p[i+1])*2);
}
return ans;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
