제출 #31240

#제출 시각아이디문제언어결과실행 시간메모리
3124014kg쌀 창고 (IOI11_ricehub)C++11
0 / 100
26 ms5020 KiB
#include "ricehub.h" #define LL long long long long f(int x, int y, int *r){ if((y-x+1)%2) return r[y+1]-r[(x+y)/2]; return r[y+1]-r[(x+y)/2+1]; } int besthub(int n, int max_L, int in[], long long B){ int x=0, y=0, out=0; long long sum=0; while(x<n){ while(y+1<n && sum+f(x,y,in)<=B) sum+=f(x,y,in), y++; out=out>y-x+1?out:y-x+1, x++; } return out; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...