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>
int besthub(int n, int _, int* a, long long b) {
    int ret = 0;
    for (int l = 0, r = 0; l < n; ++l) {
        for (; r != n && b >= 0; ++r) {
            b -= a[r] - a[(l + r) >> 1];
        }
        ret = std::max(ret, r - l);
        b += a[(l + r) >> 1] - a[l];
    }
    return ret;
}
| # | 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... |