# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
97421 | silxikys | Exhibition (JOI19_ho_t2) | C++14 | 345 ms | 69792 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;
using ll = long long;
const int maxn = 1e5+5;
int N, M;
int frames[maxn];
int dp[maxn];
struct SegDyn
{
int s, e, m; //represents range [s,e]
SegDyn *l, *r;
int sum; //sum for this interval
SegDyn(int _s, int _e) {
s = _s;
e = _e;
m = (s+e)/2;
l = NULL;
r = NULL;
sum = 0;
}
void prepareL() { if (l == NULL) l = new SegDyn(s,m); }
void prepareR() { if (r == NULL) r = new SegDyn(m+1,e); }
void pull() {
sum = 0;
if (l) sum = max(sum,l->sum);
if (r) sum = max(sum,r->sum);
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... |