# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
672126 | Hacv16 | 쌀 창고 (IOI11_ricehub) | C++17 | 11 ms | 2388 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#include "ricehub.h"
#pragma GCC optimize("Ofast,unroll-loops")
#pragma GCC target("avx2")
using namespace std;
typedef long long ll;
const int MAX = 2e6 + 15;
const ll INF = 5e18 + 15;
ll n, x[MAX], px[MAX], L;
ll b;
ll sum(ll l, ll r){
return px[r] - (l == 0 ? 0LL : px[l - 1]);
}
bool f(ll s){
for(ll l = 0, r = s - 1; r < n; l++, r++){
ll m = (l + r) >> 1, cost = 0;
cost += sum(m + 1, r) - (r - m) * x[m];
cost += (m - l) * x[m] - sum(l, m - 1);
if(cost <= b) return true;
}
return false;
# | 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... |