Submission #5986

#TimeUsernameProblemLanguageResultExecution timeMemory
5986kriiiRice Hub (IOI11_ricehub)C++98
100 / 100
20 ms4992 KiB
int besthub(int R, int L, int *X, long long B) { int A = 0; long long S = 0; for (int i=0,j=0;j<R;j++){ for (S+=X[j]-X[(i+j)/2];S>B;i++) S-=X[(i+j+1)/2]-X[i]; if (A < j - i) A = j - i; } return ++A; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...