| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 388061 | Pichon5 | 쌀 창고 (IOI11_ricehub) | C++17 | 338 ms | 472 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "ricehub.h"
#include <bits/stdc++.h>
#define vi vector<int>
#define pb push_back
#define ll long long int
using namespace std;
int besthub(int R, int L, int X[], long long B)
{
vi v;
int res=0;
for(int i=0;i<R;i++){
int b=i,e=R-1;
while(b<=e){
int mid=(b+e)/2;
v.clear();
for(int l=i;l<=mid;l++){
v.pb(X[l]);
}
int MID=v.size()/2;
ll aux=0;
for(int l=0;l<v.size();l++){
aux+=abs(v[l]-v[MID]);
}
if(aux<=B){
res=max(res,e-b+1);
b=mid+1;
}else{
e=mid-1;
}
}
}
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... | ||||
