# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
249606 | huuducpro | Werewolf (IOI18_werewolf) | C++14 | 775 ms | 98276 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;
const int N=200002;
typedef vector <int> vi;
typedef pair <int,int> pp;
int m,q,n;
vector <pp> pl[N],pr[N];
vector <int> A[N],vl[N],vr[N];
int dsu[N],gl[N],gr[N],fl[N],fr[N],x[N],y[N],rx[N],ry[N];
int type,dem;
int bit[N];
vector <int> res;
int root(int u)
{
while (dsu[u]>0) u=dsu[u];
return u;
}
void unionn(int u,int v)
{
if (dsu[u]>dsu[v]) swap(u,v);
dsu[u]+=dsu[v];dsu[v]=u;
if (type==0) vl[u].push_back(v);
else vr[u].push_back(v);
// cout<<type<<' '<<u<<' '<<v<<endl;
}
void dfsl(int u)
{
x[u]=++dem;
for (int v:vl[u])
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... |