# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
44062 | cheater2k | Construction of Highway (JOI18_construction) | C++14 | 751 ms | 105564 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int n, c[N];
vector < pair<int,int> > ed;
vector <int> z; // compression
vector <int> g[N];
int skip[N], par[N], dep[N], nchild[N];
struct data {
int low; int cnt; int val;
bool operator < (const data &other) const {
return low < other.low;
}
};
deque <data> dq[N]; // (lowest_depth, cnt, val)
void dfs(int u) {
nchild[u] = 1;
skip[u] = u;
for (int &v : g[u]) {
dep[v] = dep[u] + 1;
par[v] = u;
dfs(v);
nchild[u] += nchild[v];
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |