# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
75006 | ainta | Werewolf (IOI18_werewolf) | C++17 | 1850 ms | 146652 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<algorithm>
#include<vector>
#define N_ 201000
#define M_ 401000
using namespace std;
int n, m, Q, UF[N_], par[N_][2][20], Num[N_][2], Ed[N_][2], cnt, ReNum[N_][2];
vector<int> UU[N_], DD[N_];
vector<int> T[N_][2];
int Find(int a) {
if (a == UF[a])return a;
return UF[a] = Find(UF[a]);
}
void DFS(int a, int ck) {
Num[a][ck] = ++cnt;
ReNum[cnt][ck] = a;
for (auto &x : T[a][ck]) {
par[x][ck][0] = a;
DFS(x, ck);
}
Ed[a][ck] = cnt;
}
struct PST {
int l, r, s;
}IT[N_*20];
# | 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... |