# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
883874 | chanhchuong123 | 공장들 (JOI14_factories) | C++14 | 4525 ms | 197392 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 task ""
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
const long long INF = 1e18 + 7;
const int MAX = 500005;
int n, q;
int timer;
int h[MAX];
int fr[MAX];
int to[MAX];
int co[MAX];
int sz[MAX];
int tin[MAX];
int par[MAX];
bool rem[MAX];
long long dep[MAX];
long long dist[MAX];
int dp[20][MAX << 1];
vector<int> adj[MAX];
#define COMBINE(u, v) (h[(u)] <= h[(v)] ? (u) : (v))
void dfs(int u, int p) {
dp[0][timer] = u;
tin[u] = timer++;
for (int &id: adj[u]) {
int v = fr[id] ^ to[id] ^ 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... |