# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
869951 | overwatch9 | Examination (JOI19_examination) | C++17 | 1720 ms | 440520 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 <iostream>
#include <vector>
#include <array>
#include <map>
using namespace std;
using ll = long long;
int n, q;
vector <pair <ll, ll>> ppl;
vector <array <ll, 3>> queries;
struct stree {
#define lc v*2
#define rc v*2+1
vector <map <int, ll>> tree;
vector <vector <pair <ll, ll>>> tree_pfx;
stree (int s) {
tree.resize(s*4);
tree_pfx.resize(s*4);
}
void pushup(int v, int val) {
tree[v][val]++;
}
void update(int v, int tl, int tr, int p, ll val) {
if (tl > p || tr < p)
return;
if (tl == tr) {
tree[v][val]++;
return;
}
int tm = (tl + tr) / 2;
update(lc, tl, tm, p, val);
# | 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... |