with the help of rbtree, you can get the rank of a node immediately！