Submission #383119

#TimeUsernameProblemLanguageResultExecution timeMemory
383119BenmathRice Hub (IOI11_ricehub)C++14
42 / 100
1089 ms492 KiB
int besthub(int r,int l, int x[],long long int b){ int maxi=1; for(int i=0;i<r;i++){ long long int sum2=0; for(int j=i-1;j>=0;j--){ sum2=sum2+x[i]-x[j]; long long int sum3=0; for(int k=i;k<r;k++){ sum3=sum3+x[k]-x[i]; long long int sum=sum2+sum3; if(sum<=b){ int x1=k-j+1; if(x1>maxi){ maxi=x1; } } } } } return maxi; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...