Submission #31238

#TimeUsernameProblemLanguageResultExecution timeMemory
3123814kgRice Hub (IOI11_ricehub)C++11
0 / 100
3 ms5020 KiB
#include "ricehub.h" #define LL long long long long f(int x, int y, int *r){ return (LL)(r[y]-r[x])*(LL)(y-x+1)/(LL)2; } 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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...