# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
133001 | Boxworld | 쌀 창고 (IOI11_ricehub) | C++14 | 499 ms | 54828 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "ricehub.h"
#include <bits/stdc++.h>
using namespace std;
const int maxN=100100;
long long S[maxN];
int besthub(int R, int L, int X[], long long B){
for (int i=0;i<R;i++)S[i]=S[i-1]+X[i];
int l,r,ans=1;
for (int l=0;l<R;l++)
for (int r=l;r<R;r++){
int m=(l+r)/2,nL=l-1;
long long cost=S[m]-S[l-1]-(m-l+1)*X[l]+S[r]-S[m]-(r-m)*X[m];
printf("l=%d r=%d m=%d cost=%lld\n",l,r,m,cost);
if(cost<=B)ans=max(ans,r-l+1);
else break;
}
return ans;
}
컴파일 시 표준 에러 (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... |