# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1147146 | Pablo_No | Werewolf (IOI18_werewolf) | C++20 | 619 ms | 96152 KiB |
// TODO: Do sweepline.
#include "werewolf.h"
#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
vi P;
const int BB = 22;
int find(int vv) {
if (P[vv] == vv) return vv;
return P[vv] = find(P[vv]);
}
vector<vi> G2;
vi ORD, ORD2, TIN, TOU, POS;
vector<vi> PR;
void dfs(int v, int p) {
PR[v][0] = p;
TIN[v] = ORD.size();
ORD.push_back(v);
for (int u : G2[v]) if (u != p) {
dfs(u, v);
}
TOU[v] = ORD.size()-1;
}
# | 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... |