# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
528766 | dxz05 | Bigger segments (IZhO19_segments) | C++14 | 214 ms | 31416 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;
typedef long long ll;
#define MP make_pair
struct SegmentTree{
int size = 1;
vector<pair<int, ll>> tree;
SegmentTree(int n){
size = n;
tree.resize((1 << 20) + 50);
};
void update(int v, int tl, int tr, int pos, pair<int, ll> val){
if (tl == tr){
tree[v] = max(tree[v], val);
return;
}
int tm = (tl + tr) >> 1;
if (pos <= tm) update(v << 1, tl, tm, pos, val); else
update(v << 1 | 1, tm + 1, tr, pos, val);
tree[v] = max(tree[v << 1], tree[v << 1 | 1]);
}
void update(int pos, pair<int, ll> val){
update(1, 0, size - 1, pos, 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |