# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
971776 | duckindog | Werewolf (IOI18_werewolf) | C++17 | 926 ms | 212048 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>
#ifndef LOCAL
#include "werewolf.h"
#endif
using namespace std;
const int N = 400'000 + 10;
int n, m, q;
vector<int> ad[N];
struct Edge {
int u, v;
} edge[N];
struct couldCan {
vector<int> ad[N << 1];
int f[N << 1][20];
int sz[N << 1], st[N << 1], ed[N << 1], it;
int w[N << 1];
int id[N << 1];
couldCan() { memset(id, -1, sizeof id); }
int root(int u) { return id[u] < 0 ? u : id[u] = root(id[u]); }
void add(int u, int v) {
u = root(u); v = root(v);
if (u == v) return;
# | 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... |