| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 345051 | daniel920712 | Rice Hub (IOI11_ricehub) | C++14 | 1090 ms | 876 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "ricehub.h"
#include <algorithm>
#include <vector>
using namespace std;
vector < long long > all;
int besthub(int R, int L, int X[], long long B)
{
long long now=0,ans=0,i,j;
for(i=0;i<R;i++)
{
all.clear();
for(j=0;j<R;j++) all.push_back((long long) abs(X[j]-X[i]));
sort(all.begin(),all.end());
now=0;
for(j=0;j<R;j++)
{
///printf("%d %lld\n",i,all[j]);
if(now+all[j]>B) break;
now+=all[j];
}
ans=max(ans,j);
}
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... | ||||
