# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
421626 | amoo_safar | Werewolf (IOI18_werewolf) | C++17 | 811 ms | 87960 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 F first
#define S second
#define pb push_back
#define all(x) x.begin(), x.end()
using namespace std;
typedef pair<int, int> pii;
typedef vector<int> vi;
const int N = 2e5 + 10;
int n, m, q;
vector<int> V[N], G[N];
int par[N];
int pos[N];
void Merge(int u, int v){
u = par[u]; v = par[v];
if(u == v) return ;
if(V[u].size() > V[v].size()) swap(u, v);
for(auto x : V[u]){
pos[x] = V[v].size();
par[x] = v;
V[v].pb(x);
}
# | 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... |