版本比较
二逼平衡树
正文
增加 5 行删除 5 行
90 行未改动91929394959596979899128 行未改动全部展开22822923023123223223323423523644 行未改动28128228328428528528628728828920 行未改动31031131231331431431531631731854 行未改动37337437537637737737837938038169 行未改动90 行未改动 for(int i=1;i<=cnt[1];i++) tmp[i][1]=rc(tmp[i][1]); return query_kth(mid+1,r,c-s); } else else { for(int i=1;i<=cnt[0];i++) tmp[i][0]=lc(tmp[i][0]); for(int i=1;i<=cnt[1];i++)128 行未改动全部展开 TP void debugsp(const T x){fprintf(stderr,"%d ",x);} TP void debug(const T x){fprintf(stderr,"%d\n",x);} TP_ void debug(const T x,const T_...y){debugsp(x);debug(y...);} TP inline T max(const T &a,const T &b){return a>b?a:b;} TP_ inline T max(const T &a,const T_&...b){return max(a,max(b...));} TP_ inline T max(const T &a,const T_&...b){return max(a,max(b...));} TP inline T min(const T &a,const T &b){return a<b?a:b;} TP_ inline T min(const T &a,const T_&...b){return min(a,min(b...));} TP inline void swap(T &a,T &b){static T t;t=a;a=b;b=t;} TP inline T abs(const T &a){return a>0?a:-a;}44 行未改动 for(int i=1;i<=cnt[1];i++) tmp[i][1]=rc(tmp[i][1]); return query_kth(mid+1,r,c-s); } else else { for(int i=1;i<=cnt[0];i++) tmp[i][0]=lc(tmp[i][0]); for(int i=1;i<=cnt[1];i++)20 行未改动 tmp[i][1]=rc(tmp[i][1]); } return s+query_rank(mid+1,r,c); } else else { for(int i=1;i<=cnt[0];i++) tmp[i][0]=lc(tmp[i][0]); for(int i=1;i<=cnt[1];i++)54 行未改动int prepare_query(int l,int r,int c,int nxt){ if(nxt) return query_nxt(l,r,c); else else return query_pre(l,r,c);}bool _End;int main()69 行未改动