# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
404727 | usuyus | Examination (JOI19_examination) | C++14 | 949 ms | 311632 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 N 200005
#define M 1000000007
using namespace std;
using ll = long long;
struct ImplicitSegTree {
struct Node {
ll val;
Node *lft, *rgt;;
Node() : val(0), lft(nullptr), rgt(nullptr) {}
void push() {
if (!lft) lft = new Node();
if (!rgt) rgt = new Node();
}
void update(ll l, ll r, ll idx) {
++val;
if (l == r) return;
push();
ll m = (l+r) / 2;
if (idx <= m) lft->update(l, m, idx);
else rgt->update(m+1, r, idx);
}
ll query(ll l, ll r, ll lq, ll rq) {
if (r < lq || rq < l) return 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |