首页 > 其他 > 详细

可持久化并查集(草稿)

时间:2019-09-14 12:16:34      阅读:85      评论:0      收藏:0      [点我收藏+]
#include<bits/stdc++.h>
#define fi first
#define se second
#define INF 0x3f3f3f3f
#define LNF 0x3f3f3f3f3f3f3f3f
#define fio ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define pqueue priority_queue
#define NEW(a,b) memset(a,b,sizeof(a))
const double pi=4.0*atan(1.0);
const double e=exp(1.0);
const int maxn=4e5+8;
typedef long long LL;
typedef unsigned long long ULL;
const LL mod=998244353;
const ULL base=1e7+7;
const int maxp=26+5;
using namespace std;
struct Pus{
    struct node{
        int l,r,fa,dep;
    }tr[maxn*30];
    int root[maxn*30];
    int cnt;
    void build(int &rt,int l,int r){
        rt=++cnt;
        if(l==r) {tr[rt].fa=l;return ;}
        int mid=(l+r)>>1;
        build(tr[rt].l,l,mid);
        build(tr[rt].r,mid+1,r);
    }
    void Merge(){
        
    }
};
int main(){

}

 

可持久化并查集(草稿)

原文:https://www.cnblogs.com/Profish/p/11518722.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!