# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
223191 | oolimry | Putovanje (COCI20_putovanje) | C++14 | 125 ms | 18912 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
static vector<int> adj[100005];
static int heavy[100005];
static int depth[100005];
static int head[100005];
static int p[100005];
static int pos[100005];
static int sz[100005];
int cnt = 0; ///set to 1 if you're using fenwick tree
void dfs(int u){
sz[u] = 1;
int maxChild = 0;
for(int v : adj[u]){
if(sz[v] == 0){
depth[v] = depth[u] + 1;
dfs(v);
sz[u] += sz[v];
p[v] = u;
if(sz[v] > maxChild){
maxChild = sz[v];
heavy[u] = v;
}
}
}
}
void decompose(int u, int h){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |