# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
315950 | jhnah917 | Werewolf (IOI18_werewolf) | C++14 | 1703 ms | 136580 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.
#ifndef LOCAL
#include "werewolf.h"
#endif
#include <bits/stdc++.h>
#define x first
#define y second
#define all(v) v.begin(), v.end()
#define compress(v) sort(all(v)), v.erase(unique(all(v)), v.end())
using namespace std;
typedef long long ll;
struct UnionFind{
int par[202020];
UnionFind(){ iota(par, par+202020, 0); }
int find(int v){ return v == par[v] ? v : par[v] = find(par[v]); }
bool merge(int P, int C){
P = find(P); C = find(C);
if(P == C) return false;
par[C] = P; return true;
}
} uf;
struct MergeSortTree{
static const int sz = 1 << 18;
vector<int> tree[1 << 19];
void set(int x, int v){
tree[x|sz].push_back(v);
}
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... |