| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1334599 | Zone_zonee | 쌀 창고 (IOI11_ricehub) | C++20 | 1 ms | 344 KiB |
#include "ricehub.h"
#include <bits/stdc++.h>
using namespace std;
int besthub(int N, int L, int x[], long long B)
{
//N^2
int res = 1;
for(int i = 0; i < N; ++i){
int l = i, r = i;
long long t = B;
while(t > 0 && (l > 0 || r < N-1)){
long long dl = l>0 ? x[i] - x[l-1] : LLONG_MAX;
long long dr = r<N-1 ? x[r+1] - x[i] : LLONG_MAX;
if (dl <= dr && dl <= t){
t -= dl;
--l;
} else if (dr <= t){
t -= dr;
++r;
} else break;
}
res = max(res, r-l+1);
}
return res;
}
| # | 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... | ||||
