# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
710291 | LittleCube | Cake 3 (JOI19_cake3) | C++14 | 3171 ms | 211484 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.
#pragma GCC optimize("Ofast,unroll-loops")
#include <bits/stdc++.h>
#define ll long long
#define pll pair<ll, ll>
#define pii pair<int, int>
#define F first
#define S second
using namespace std;
int N, M;
ll ans = -1e18, dp[200005], v[200005], c[200005];
pii p[200005];
struct Mset
{
vector<pair<int, ll>> op;
priority_queue<ll, vector<ll>, greater<ll>> lms, rms;
ll sum = 0;
void init(int sz)
{
for(int i = 0; i < sz; i++)
lms.push(-10'000'000'000'000LL);
sum = sz * -10'000'000'000'000LL;
}
void insert(ll k)
{
while(!rms.empty() && rms.top() == lms.top())
{
rms.pop();
lms.pop();
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |