# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
969739 | starchan | Factories (JOI14_factories) | C++17 | 5133 ms | 212208 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<bits/stdc++.h>
#include "factories.h"
using namespace std;
#define ll long long
#define in array<ll, 2>
#define pb push_back
#define pob pop_back
#define fast() ios_base::sync_with_stdio(false); cin.tie(NULL)
const int MX = 5e5+5;
const int LOGM = 19;
const ll INF = 1e18;
vector<ll> d(MX, INF);
vector<in> adj[MX], edge[MX];
int pa[LOGM][MX];
int tin[MX], tout[MX];
ll dep[MX];
int timer;
void dfs(int u, ll lvl)
{
tin[u] = ++timer;
dep[u] = lvl;
for(int i = 1; i < LOGM; i++)
pa[i][u] = pa[i-1][pa[i-1][u]];
for(auto [v, w]: adj[u])
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |