# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
260170 | mjkocijan | Two Dishes (JOI19_dishes) | C++14 | 6997 ms | 215340 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 <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> ii;
#define X first
#define Y second
#define pb push_back
typedef long double ld;
#define MAXN 1001001
#define INF 1001001001001001001LL
int n, m, nn = 1 << 20;
ll a[MAXN], s[MAXN], p[MAXN];
ll b[MAXN], u[MAXN], k[MAXN];
vector<ii> x[MAXN];
ll ap[MAXN], bp[MAXN];
ll t[4 * MAXN];
ll pd[4 * MAXN], pm[4 * MAXN];
void propaj(int cv)
{
//if (cv >= nn) cout << " (" << cv - nn << ' ' << t[cv] << ' '<< pd[cv] << ' ' << (pm[cv] < -INF / 2 ? -9 : pm[cv])<<") ";
t[cv] += pd[cv];
t[cv] = max(t[cv], pm[cv]);
if (cv < nn) {
pd[cv * 2] += pd[cv];
pd[cv * 2 + 1] += pd[cv];
pm[cv * 2] += pd[cv];
pm[cv * 2 + 1] += pd[cv];
pm[cv * 2] = max(pm[cv * 2], pm[cv]);
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... |
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |