| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 520492 | krit3379 | 쌀 창고 (IOI11_ricehub) | C++17 | 18 ms | 2512 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
long long qs[100005],l,r,mid,new_mid,new_val,ans;
int besthub(int n, int m, int x[100005], long long b){
int i;
for(i=n;i>0;i--)x[i]=x[i-1];
x[0]=0;
for(i=1;i<=n;i++)qs[i]=qs[i-1]+x[i];
l=1,r=1,mid=1;
for(l=1;l<=n;l++){
while(1){
if(r==n)break;
new_mid=(l+r+1)/2;
new_val=x[new_mid]*(new_mid-l)-qs[new_mid-1]+qs[l-1]+qs[r+1]-qs[new_mid]-x[new_mid]*(r+1-new_mid);
if(new_val<=b)mid=new_mid,r++;
else break;
}
ans=max(ans,r-l+1);
}
return ans;
}
| # | 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... | ||||
