# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
97396 | Shafin666 | Rice Hub (IOI11_ricehub) | C++14 | 24 ms | 3200 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define mp make_pair
#define pb push_back
#define pii pair<ll, ll>
#define to second
#define cost first
typedef long long ll;
typedef long double ld;
using namespace std;
ll a[1000005];
ll l[1000005];
bool can(int i, int j, ll b) {
int mid = (i+j)/2;
ll left = (mid-i+1)*a[mid] - (l[mid]-l[i-1]);
ll right = l[j]-l[mid-1] - (j-mid+1)*a[mid];
return left+right <= b;
}
ll besthub(int r, int L, int x[], ll b) {
int maxlen = -1;
for(int i = 0; i < r; i++) a[i+1] = x[i];
for(int i = 1; i <= r; i++) l[i] = l[i-1] + a[i];
int ptr = 1;
for(int i = 1; i <= r; i++) {
ptr = max(i, ptr);
# | 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... |