# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
251225 | teee | 족보 (KOI18_family) | C++14 | 368 ms | 64340 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int par[300'010];
int sz[300'010];
int kk;
int find(int n){
return par[n]?par[n]=find(par[n]):n;
}
void merge(int a,int b){
a=find(a);
b=find(b);
if(a^b){
sz[a]+=sz[b];
par[b]=a;
}
}
vector<int> v[2][300'010];
vector<pair<int,vector<int>>> check;
pair<int,int> dfs(int n,int idx){
if(n&&n<=kk){
sz[n]=1;
return {1,n};
}
int cnt=0;
vector<int> t;
int c=0;
for(auto i:v[idx][n]){
pair<int,int> k=dfs(i,idx);
# | 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... |