# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
28859 | kavun | Rice Hub (IOI11_ricehub) | C++14 | 1000 ms | 104080 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "ricehub.h"
#include <bits/stdc++.h>
#include "ricehub.h"
using namespace std;
typedef long long ll;
int dp[5010][5010];
int pr(int i, int j, int X[])
{
if(dp[i][j])
return dp[i][j];
if(i == j)
return 0;
if(j == i+1)
return X[j] - X[i];
int median = i + (j-i)/2;
dp[i][j] = pr(i+1,j-1,X) - X[i] + X[j];
return dp[i][j];
}
int besthub(int R, int L, int X[], long long B)
{
for(int res = R; res > 0; res--)
{
for(int i = 0; i <= R - res; i++)
{
ll cost = pr(i,i+res-1,X);
if(cost <= B)
return res;
}
}
}
컴파일 시 표준 에러 (stderr) 메시지
# | 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... |