# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
198117 | model_code | Magic Tree (CEOI19_magictree) | C++17 | 958 ms | 53052 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.
// Compressed Fenwick trees over implicit HLD. Compression done using map<>.
// O(N log^2 N)
#include <bits/stdc++.h>
using namespace std;
using wgt = unsigned long long;
class Solver {
using day = int;
class IntervalTree {
struct node {
wgt val, add;
int l, r;
};
vector<node> T;
void upd(int i) {
node & n = T[i];
n.val += n.add;
if(n.l+1 < n.r) {
T[2*i].add += n.add;
T[2*i+1].add += n.add;
}
n.add = 0;
}
public:
IntervalTree() {}
# | 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... |