# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
656635 | uylulu | Factories (JOI14_factories) | C++17 | 4794 ms | 301760 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 "factories.h"
#include<bits/stdc++.h>
#define ll long long
using namespace std;
const ll N = 5e5 + 5,K = 23,oo = 1e17;
vector<pair<ll,ll>> adj[N + 1];
ll dis[N + 1],fi[N + 1],t = 0;
ll eu[2*N + 1],sparse[2*N + 1][K + 1];
void dfs(ll s,ll pa) {
fi[s] = t;
eu[t] = s;
t++;
for(auto u : adj[s]) {
if(u.first == pa) continue;
dis[u.first] = dis[s] + u.second;
dfs(u.first,s);
eu[t] = s;
t++;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |