# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
340503 | keta_tsimakuridze | Werewolf (IOI18_werewolf) | C++14 | 2509 ms | 240204 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 <cstdio>
#include <cstdlib>
#include <vector>
#include<bits/stdc++.h>
#include "werewolf.h"
using namespace std;
const int N=4e5+5;
int par[2][N],p[2][N][25],sz[2][N],tmin[2][N],tmout[2][N],timer,Lg,F;
vector<int>v[N],V[2][N],tree[4*N];
set<int> P[2][N];
namespace {
int read_int() {
int x;
if (scanf("%d", &x) != 1) {
fprintf(stderr, "Error while reading input\n");
exit(1);
}
return x;
}
}
int find_parent(int u,int t){
if(par[t][u]==u) return u;
return par[t][u]=find_parent(par[t][u],t);
}
void merge(int u,int v,int t){
int p1=find_parent(u,t);
int p2=find_parent(v,t);
if(p1==p2) return;
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... |