# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
126444 | keko37 | Street Lamps (APIO19_street_lamps) | C++14 | 2634 ms | 117484 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;
const int MAXN = 300005;
const int SIZ = 120;
int n, q, ofs = 1, cnt;
string s;
map <int, int> mp, rst;
set <int> st;
set <int> :: iterator it;
int t[MAXN * SIZ], lef[MAXN * SIZ], rig[MAXN * SIZ];
struct tournament {
int root;
tournament () {
root = ++cnt;
}
void update (int x, int pos, int lo, int hi, int val) {
if (lo == hi) {
t[x] += val;
return;
}
int mid = (lo + hi) / 2;
if (pos <= mid) {
if (lef[x] == 0) lef[x] = ++cnt;
update(lef[x], pos, lo, mid, val);
} else {
if (rig[x] == 0) rig[x] = ++cnt;
# | 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... |