hdu3726专题

Treap树经典题 [HDU3726] Graph and Queries

模板:求第k小的key值 和 求数key是第k小的k值 struct Node {int size;int rank;int key;Node* lson, * rson;Node(int x) {lson = rson = NULL;rank = rand();key = x;size = 1;}};int getSize(Node* o) {if (o == NULL)return 0;