This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
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 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... |