# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
262501 | yabsed | Werewolf (IOI18_werewolf) | C++17 | 1133 ms | 126984 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>
using namespace std;
#define MAXN 200005
#define pb push_back
#define sz(v) ((int)(v).size())
#define all(v) (v).begin(), (v).end()
int N, M, Q;
int djs[MAXN];
vector <int> con[MAXN];
// 아래에서부터 올라오는 트리 구조
int par[MAXN][18], num[MAXN], out[MAXN];
vector <int> child[MAXN];
// 위에서부터 내려가는 트리 구조
int par2[MAXN][18], num2[MAXN], out2[MAXN];
vector <int> child2[MAXN];
const int TS = 1<<19, ST = TS/2-1;
vector <int> tree[TS];
int find(int n){ return djs[n] == n ? n : (djs[n] = find(djs[n])); }
int K = 0;
void dfs(int n)
{
num[n] = ++K;
for (int t: child[n]) dfs(t);
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |