# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
372342 | denkendoemeer | Werewolf (IOI18_werewolf) | C++14 | 899 ms | 151660 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 "werewolf.h"
using namespace std;
int t[400005],sz[400005],l[400005],st[400005],en[400005],cur[400005],sz2[400005];
vector<int>g[400005],g2[400005],ev[400005];
set<int>nod[400005];
int n,m,q;
int findt(int x)
{
if (x==t[x])
return x;
return t[x]=findt(t[x]);
}
void onion(int a,int b,bool tip)
{
a=findt(a);
b=findt(b);
if (a==b)
return ;
if (sz[a]<sz[b])
swap(a,b);
if (tip==0)
g[a].push_back(b);
else
for(auto it:nod[b])
nod[a].insert(it);
t[b]=a;
sz[a]+=sz[b];
}
void dfs(int 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... |