# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
523069 | Blondie | Magic Tree (CEOI19_magictree) | C++17 | 837 ms | 596568 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;
#define sz(x) ((int)(x.size()))
#define all(x) x.begin(), x.end()
template<typename T> void pr(T a){std::cerr<<a<<std::endl;}
template<typename T, typename... Args> void pr(T a, Args... args){std::cerr<<a<<' ',pr(args...);}
using ll = long long;
const char nl = '\n';
const int MX = 1e5 + 10;
struct Node {
Node *ls, *rs;
ll mx, mn, lz;
Node(ll hi = 0, ll lo = 0) : ls(NULL), rs(NULL), mx(hi), mn(lo), lz(0) {}
};
void addChild(Node* v) {
if(v->ls) return;
// cerr << v->mx << " " << v->mn << nl;
assert(v->mx == v->mn);
v->ls = new Node(v->mx - v->lz, v->mn - v->lz);
v->rs = new Node(v->mx - v->lz, v->mn - v->lz);
}
void prop(Node* v) {
if(!v->ls) return;
# | 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... |