#include "ricehub.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int besthub(int n, int L, int *xx, ll d)
{
int k = 0;
for (int i = 0, j = 0; j < n; j++)
{
d -= xx[j] - xx[(i + j) / 2];
while (d < 0)
{
d += xx[(i + 1 + j) / 2] - xx[i];
i++;
}
k = max(k, j - i + 1);
}
return k;
}
| # | 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... |