如果你写的是 Treap 那么一定要注意:查找排名时的 xxx 有可能不在已有的数中。
所以,当你写出 if (!u) 后,应该写的是 return 1; 而不是 return 0;。
if (!u)
return 1;
return 0;