# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
529223 | KoD | 늑대인간 (IOI18_werewolf) | C++17 | 595 ms | 70804 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "werewolf.h"
#include <bits/stdc++.h>
using std::vector;
using std::array;
using std::pair;
using std::tuple;
template <class F> struct RecLambda : private F {
RecLambda(F&& f) : F(std::forward<F>(f)) {}
template <class... Args> decltype(auto) operator()(Args&&... args) const {
return F::operator()(*this, std::forward<Args>(args)...);
}
};
struct UnionFind {
vector<int> par;
vector<vector<int>> child;
UnionFind(const int n) : par(n, -1), child(n) {}
int find(const int u) {
return par[u] < 0 ? u : par[u] = find(par[u]);
}
int merge(int x, int y) {
x = find(x), y = find(y);
if (x == y) return x;
const int z = (int)par.size();
par.push_back(-1);
child.emplace_back();
par[x] = par[y] = z;
# | 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... |