# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
563103 | CyberSleeper | Boxes with souvenirs (IOI15_boxes) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
//#include "boxes.h"
#include <bits/stdc++.h>
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
#define debug(x) cout << "Line " << __LINE__ << ", " << #x << " is " << x << endl
#define all(x) x.begin(), x.end()
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define ll long long
#define ull unsigned long long
#define pll pair<ll, ll>
#define pii pair<ll, ll>
#define ld long double
#define nl endl
#define tb '\t'
#define sp ' '
#define sqr(x) (x)*(x)
#define arr3 array<ll, 3>
using namespace std;
const ll MX=200005, MOD=1000000007, BLOCK=160, INF=1e9+7, LG=62;
const ll INFF=1000000000000000004;
const ld ERR=1e-6, pi=3.14159265358979323846;
long long delivery(int N, int K, int L, int p[]) {
ll pref[N], suff[N], ans;
for(int i=0; i<N; i++){
pref[i]=2*p[i];
if(i>=K){