# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
164760 | FutymyClone | Valley (BOI19_valley) | C++14 | 859 ms | 39680 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 N = 1e5 + 5;
int n, s, q, e, h[N], par[20][N], st[N], en[N], in[N], Time = 0;
long long d[N], ans[N];
vector <pair <int, int> > g[N];
pair <int, pair <int, int> > edge[N];
bool marked[N];
vector <pair <int, int> > queries[N];
struct SegmentTree {
long long node[N << 2], lz[N << 2];
void init (int i, int l, int r) {
if (l == r) {
node[i] = (marked[in[l]] ? d[in[l]] : (long long)1e18);
lz[i] = 0;
return;
}
int mid = l + r >> 1;
init(i << 1, l, mid);
init(i << 1 | 1, mid + 1, r);
node[i] = min(node[i << 1], node[i << 1 | 1]);
lz[i] = 0;
}
void propagate (int i, int l, int r) {
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... |