# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
763586 | boris_mihov | Wiring (IOI17_wiring) | C++17 | 135 ms | 17944 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 "wiring.h"
#include <algorithm>
#include <iostream>
#include <numeric>
#include <cassert>
#include <vector>
#include <set>
typedef long long llong;
const int MAXN = 200000 + 10;
const llong LLINF = 1e18;
const int INF = 1e9;
int n, m;
struct SegmentTree
{
llong tree[4*MAXN];
void update(int l, int r, int node, int queryPos, llong queryValue)
{
if (l == r)
{
tree[node] = queryValue;
return;
}
int mid = (l + r) / 2;
if (queryPos <= mid) update(l, mid, 2*node, queryPos, queryValue);
else update(mid + 1, r, 2*node + 1, queryPos, queryValue);
tree[node] = std::min(tree[2*node], tree[2*node + 1]);
}
# | 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... |