# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
31193 | 2017-08-13T06:12:31 Z | pasa3232 | 선물상자 (IOI15_boxes) | C++14 | 2 ms | 376 KB |
#include<bits/stdc++.h> #include "boxes.h" using namespace std; typedef long long ll; ll n, k, l, A[10000010], D[10000010], R[10000010], ans; long long delivery(int N, int K, int L, int p[]){ n=N, k=K, l=L; for(int i=0;i<n;i++){ if(A[i] == 0) n--, A[i]=p[i]; D[i]=(i<k?0:D[i-k])+min(l,A[i]*2); } ans=D[n-1]; for(int i=n-1;i>=0;i--){ R[i]=(i+k<n?R[i+k]:0)+(l-A[i])*2; ans=min(ans,R[i]+(i?D[i-1]:0)); } return ans; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Incorrect | 2 ms | 376 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |