# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
995519 | abczz | Construction of Highway (JOI18_construction) | C++17 | 1036 ms | 37432 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <vector>
#include <array>
#include <algorithm>
#define ll long long
using namespace std;
vector <ll> adj[100000];
array <ll, 2> edge[100000];
vector <ll> dfn;
vector <array<ll, 2>> V;
array <ll, 2> R[100000];
ll n, a, b, x, l, r, d, t, f, C[100000], D[100000], T[100000], bl[100000][17];
struct SegTree{
vector <ll> st{vector <ll>(400000, 0)};
void update(ll id, ll l, ll r, ll q) {
if (l == r) {
st[id] = T[dfn[l]];
return;
}
ll mid = (l+r)/2;
if (q <= mid) update(id*2, l, mid, q);
else update(id*2+1, mid+1, r, q);
st[id] = max(st[id*2], st[id*2+1]);
}
ll query(ll id, ll l, ll r, ll ql, ll qr) {
if (qr < l || r < ql) return -1e18;
else if (ql <= l && r <= qr) return st[id];
ll mid = (l+r)/2;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |