# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
476679 | cookiemonster04 | Werewolf (IOI18_werewolf) | C++17 | 1128 ms | 129536 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>
#include<unordered_set>
using namespace std;
#define LL long long
#define pb push_back
#define pii pair<int, int>
#define mp make_pair
#define f first
#define s second
vector<vector<int>> adj;
struct DSU {
vector<int> par, size, top;
bool topmax;
DSU(int N, bool mx){
par.resize(N); size.resize(N); top.resize(N);
for (int i = 0; i < N; ++i) {
size[i] = 1;
par[i] = i;
top[i] = i;
}
topmax = mx;
}
int find(int node) {
if (par[node] != node) {
par[node] = find(par[node]);
}
return par[node];
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... |