This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
int besthub(int N, int L, int X[], long long B)
{
int A = 0; long long S = 0;
for (int i=0,j=0;j<N;){
S += X[j] - X[(i+j)/2];
j++;
while (i < j && S > B){
S -= X[(i+j)/2] - X[i];
i++;
}
if (A < j - i)
A = j - i;
}
return A;
}
# | 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... |