# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
164831 | arnold518 | Rice Hub (IOI11_ricehub) | C++14 | 19 ms | 760 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 "ricehub.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
int R, L, *X, ans;
ll B;
int besthub(int _R, int _L, int *_X, ll _B)
{
int i, j;
R=_R; L=_L; X=_X; B=_B;
ll S=0;
for(i=0, j=0; i<R; i++)
{
while(S<=B && j<R) { j++; S+=X[j]-X[i+j>>1]; }
S-=X[i+j+1>>1]-X[i];
ans=max(ans, j-i);
}
return ans;
}
Compilation message (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... |