可持久化并查集(草稿)

#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(){

}

 

posted @ 2019-09-14 11:44  我要见血小板  阅读(153)  评论(0编辑  收藏  举报