| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 743273 | vjudge1 | Rice Hub (IOI11_ricehub) | C++17 | 1062 ms | 668 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
#include "ricehub.h"
using namespace std;
int besthub(int R, int L, int X[], long long B)
{
long long mx = -1;
for(int i=0;i<R;++i)
{
int pos = X[i];
priority_queue<int,vector<int>,greater<int>> pq;
for(int j=0;j<R;++j)
{
int dist = abs(pos-X[j]);
pq.push(dist);
}
long long cost = 0,rice = 0;
while(!pq.empty() && cost < B)
{
cost += pq.top();
++rice;
pq.pop();
}
mx = max(mx,rice);
}
return mx;
}
| # | 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... | ||||
