| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 139464 | Sorting | Rice Hub (IOI11_ricehub) | C++14 | 0 ms | 0 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 <bits/stdc++.h>
using namespace std;
long long *x;
long long r, l, b;
long long besthub(long long _r, long long _l, long long *_x, long long _b){
r = _r;
l = _l;
x = _x;
b = _b;
int ans = 0;
for(int i = 0; i < r; i++){
int j;
for(j = i; j < r && x[j] - x[i] <= 2 * b; j++);
j--;
ans = max(ans, j - i + 1);
}
return ans;
}
