# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
97118 | luciocf | 공장들 (JOI14_factories) | C++14 | 7196 ms | 175280 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "factories.h"
#define ff first
#define ss second
using namespace std;
const int maxn = 5e5+10;
const long long inf = 1e18+10;
typedef pair<int, int> pii;
typedef long long ll;
int n;
int sz[maxn], pai[maxn], nivel[maxn];
ll dist[maxn][19], child[maxn];
bool mark[maxn];
vector<pii> grafo[maxn];
int dfs(int u, int p)
{
sz[u] = 1;
for (auto v: grafo[u])
if (v.first != p && !mark[v.first])
sz[u] += dfs(v.first, u);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |