# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
114103 | Alexa2001 | Werewolf (IOI18_werewolf) | C++17 | 1513 ms | 163288 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 "werewolf.h"
#include <bits/stdc++.h>
using namespace std;
const int Nmax = 2e5 + 5, lg = 19;
int n, q;
vector<int> edge[Nmax];
int node_A[Nmax], node_B[Nmax];
vector<pair<int,int>> when[Nmax];
struct Arb
{
vector<int> son[Nmax];
int L[Nmax], R[Nmax], tmp = 0;
int root;
int up[lg+2][Nmax];
void dfs(int node, int dad = -1)
{
L[node] = ++tmp;
up[0][node] = dad;
int i;
for(i=1; up[i-1][node] != -1; ++i)
up[i][node] = up[i-1][up[i-1][node]];
for(; i<=lg; ++i) up[i][node] = -1;
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... |