Summary:
The Balance Tree is probably the most commonly used high-level data structure, while treap is used for general information maintenance, and splay is used for advanced information maintenance (such as interval operations and LCT) (MAP, set party self-respect Qaq ).
Tips and notes:
There are many details.
In treap, if a small root heap is set (it is best to set a small root heap), the weight of null must be set to INF.
The duplicate elements in the balance tree can be used as needed.
The rank and select in the balance tree should be combined with the previous considerations.
In splay, if you write LCT, You need to determine the root. In many cases, pointer reference is required for treap, and splay is not required. After writing it, you 'd better create several sets of hentai data (corresponding to the requirements of the question) and check whether re or WA is used.
The array must not be small, but should be large if it can be opened.
Example:
Treap: [bzoj] 3224: tyvj 1728 normal balance tree (an unscientific OJ), [bzoj] 3196: tyvj 1730 binary Force Balance Tree (K in the interval + decision tree ), [bzoj] 1146: [ctsc2008] Network Management Network (tree link splitting + line segment tree cover Balance Tree + binary/DFS sequence + tree array + Chairman tree), [bzoj] 1862: [zjoi2006] Gamez game ranking system & 1056: [haoi2008] ranking system (treap + very careful)
Splay: the template and its details. For details, refer to [bzoj] 1507: [noi2003] Editor (splay) and [bzoj] 1901: zju2112 dynamic rankings (number K in the interval + decision tree), [bzoj] 1503: [noi2004] splay, and then LCT. Let's take a look at another topic ..
Summary: Balance Tree