# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
584650 | teki | 쌀 창고 (IOI11_ricehub) | C++11 | 15 ms | 2516 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "ricehub.h"
typedef long long ll;
#define pb push_back
#define MS(x,y) memset((x),(y),sizeof((x)))
const ll MN = 1000000007;
using namespace std;
int besthub(int n, int l, int poz[], ll b) {
ll prefSuma[n];
MS(prefSuma,0);
for (ll i = 0; i<n; i++) {
prefSuma[i] = poz[i];
if (i != 0) prefSuma[i] += prefSuma[i-1];
}
ll from = 0;
ll res = 0;
for (ll to = 0; to<n; to++) {
ll mid = (from+to)/2;
ll levoS = mid-from;
ll desnoS = to-mid;
ll necBud = levoS*poz[mid];
# | 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... |