# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
207951 | red1108 | 늑대인간 (IOI18_werewolf) | C++17 | 1010 ms | 155516 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "werewolf.h"
#include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
typedef pair<int,int> pii;
int n, m;
//1 이 N->1, 2가 1->N순서
vector<int> tree1[200010], tree2[200010], gr[200010];
pii rn1[200010], rn2[200010];
int mi[20][200010], ma[20][200010], par1[20][200010], par2[20][200010];
int anc[200010], ord;
int nh[200010], root[200010];
int findanc(int x){
if(x==anc[x]) return x;
return anc[x]=findanc(anc[x]);
}
void dfs1(int x, int par){
//printf("dfs1(%d %d)\n", x, par);
mi[0][x] = par;
par1[0][x]=par;
rn1[x].fi = ++ord;
for(auto i:tree1[x]) if(i!=par){
dfs1(i,x);
}
rn1[x].se = ord;
}
void dfs2(int x, int par){
//printf("dfs2(%d %d)\n", x, par);
# | 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... |