# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1169354 | duccnamm | Werewolf (IOI18_werewolf) | C++20 | 536 ms | 90848 KiB |
#include<bits/stdc++.h>
#include "werewolf.h"
using namespace std;
#define ll int
ll n,m,q,f[200005],in1[200005],out1[200005],timedfs1,pos1[200005],in2[200005],out2[200005],timedfs2,st[200005][19][2],d1,d2,query1[200005],query2[200005],u,v,seg[800005];
vector<ll>a[200005],aa[200005];
struct node
{
ll a,b,c,d;
};
vector<node>query[200005];
vector<ll>ans;
ll check(ll i)
{
if(f[i]<0)
return i;
return f[i]=check(f[i]);
}
void connect(ll x,ll y,ll z)
{
if(x>y&&z==1)
swap(x,y);
if(x<y&&z==2)
swap(x,y);
f[x]+=f[y];
f[y]=x;
}
void dfs(ll x,ll pa)
{
st[x][0][0]=pa;
# | 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... |