splay
nexthexonextbutterflyvolantisyearnyiliashokaindigoapollolandscapecactusmateryicarusfluidmaterial
转移自老blog
splay
struct splay_tree{
static const int maxn=2e6+10;
int ch[maxn][2],fa[maxn];
int miv[maxn],val[maxn],add[maxn],rev[maxn],siz[maxn];
int rub[maxn],rub_;//回收池
int rt,tot;
//数据结束
void...
more...
区间加+区间乘+区间求和的双标记线段树
nexthexonextbutterflyvolantisyearnyiliashokaindigoapollolandscapecactusmateryicarusfluidmaterial
转移自老blog
线段树
typedef long long ll;
#define ls (rt<<1)
#define rs (ls|1)
#define ml ((l+r)>>1)
#define mr (ml+1)
const ll maxn=1e5+55;
ll mod=123456789;
ll...
more...
区间加+区间乘+区间赋值+区间p次方求和的三标记线段树
nexthexonextbutterflyvolantisyearnyiliashokaindigoapollolandscapecactusmateryicarusfluidmaterial
转移自老blog
线段树
//hdu 4578
#define ls (rt<<1)
#define rs (ls|1)
#define ml ((l+r)>>1)
#define mr (ml+1)
const int maxn=1e5+55;
int mod=10007;
int...
more...