# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
26580 | rubabredwan | 공장들 (JOI14_factories) | C++14 | 5826 ms | 205268 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
/* Bismillahir Rahmanir Rahim */
#include <bits/stdc++.h>
#include "factories.h"
using namespace std;
typedef pair <int, int> pii;
const int N = 500005;
const long long oo = 1e18;
vector < vector <pii>> g(N);
vector < int > e[N];
long long mn[N], dis[N];
long long pre[N][25], idx[N];
int n, anc[N], sub[N], vis[N];
void dfs(int at, int par){
pre[at][++idx[at]] = dis[at];
sub[at] = 1;
for(auto u : g[at]){
if(vis[u.first] || u.first == par) continue;
dis[u.first] = dis[at] + u.second;
dfs(u.first, at);
sub[at] += sub[u.first];
}
}
void decompose(int at, int par, int tot){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |