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>
using namespace std;
int besthub(int n, int x, int v[], long long k) {
int l = 0, r = 0, c = 0, ans = 0;
while(r != n-1) {
r++, c += v[r]-v[(l+r)/2];
while(c > k) c -= v[(l+r+1)/2]-v[l], l++;
ans = max(ans, r-l+1);
}
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... |