이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "ricehub.h"
#define LL long long
long long f(int x, int y, int *r){
long long temp=(y-x+1)/2;
return (LL)(r[y]-r[x])*temp;
}
int besthub(int n, int max_L, int in[], long long B){
int x=0, y=0, out=0;
while(x<n){
while(y+1<n && f(x,y+1,in)<=B) y++;
out=out>y-x+1?out:y-x+1, x++;
} return out;
}
| # | 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... |