# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
96832 | youngyojun | Werewolf (IOI18_werewolf) | C++11 | 1946 ms | 114752 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>
#define eb emplace_back
#define sz(V) ((int)(V).size())
#define allv(V) ((V).begin()),((V).end())
#define sorv(V) sort(allv(V))
#define rb(x) ((x)&(-(x)))
using namespace std;
const int MAXN = 200055;
const int MAXM = 400055;
const int MAXQ = 200055;
struct TRE {
vector<int> G[MAXN];
int prt[18][MAXN], cnt[MAXN], dfo[MAXN];
int N, Rt;
void add(int p, int v) { G[p].eb(v); }
void dfs(int i, int &c) {
cnt[i] = 1; dfo[i] = c++;
for(int v : G[i]) {
prt[0][v] = i;
dfs(v, c);
cnt[i] += cnt[v];
}
}
void run() {
prt[0][Rt] = N;
# | 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... |