# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
376823 | casperwang | Cake 3 (JOI19_cake3) | C++14 | 2970 ms | 26172 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>
#define int long long
#define tiiii tuple<int,int,int,int>
#define pb emplace_back
#define All(x) x.begin(), x.end()
#define pii pair<int,int>
#define ff first
#define ss second
using namespace std;
#define debug(args...) kout("[ " + string(#args) + " ]", args)
void kout() { cerr << endl; }
template <class T, class ...U> void kout(T a, U ...b) { cerr << a << ' ',kout(b...); }
template <class T> void pary(T L, T R) { while (L != R) cerr << *L << " \n"[++L==R]; }
const int MAXN = 200000;
const int INF = 1e18;
int N, M;
int ans = -INF;
struct Node {
int c, v, vid;
} arr[MAXN+1];
class Seg {
private:
int cnt[MAXN*4+5];
int sum[MAXN*4+5];
void pull(int now) {
cnt[now] = cnt[now*2] + cnt[now*2+1];
sum[now] = sum[now*2] * (cnt[now*2] > 0) + sum[now*2+1] * (cnt[now*2+1] > 0);
}
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... |