# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
477643 | SirCovidThe19th | 늑대인간 (IOI18_werewolf) | C++17 | 4091 ms | 347180 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "werewolf.h"
using namespace std;
#define vi vector<int>
const int mx = 6e5 + 5;
struct dsuTree{
int par[mx], tin[mx], tout[mx], ti, id; vector<int> adj[mx];
dsuTree(int n){
iota(par, par + n * 2, 0); id = n;
}
int get(int i){
return i == par[i] ? i : par[i] = get(par[i]);
}
void merge(int a, int b){
a = get(a); b = get(b); if (a == b) return;
adj[id].push_back(a); adj[id].push_back(b);
par[a] = par[b] = id++;
}
void dfs(int i){
tin[i] = ti++;
for (int x : adj[i]) dfs(x);
tout[i] = ti - 1;
}
};
struct segTree{
multiset<int> seg[mx * 2];
void upd(int i, int num){
# | 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... |