摘要: 没什么好说的。。被坑了。。查询排名为k的数时,二分这个数,转化成查找w的排名。若w这个数不存在,就先插入w,然后把w旋转到根,既可以求w的排名。View Code 1 #include <iostream> 2 #include <cstring> 3 #include <cstdio> 4 #include <cstdlib> 5 #include <algorithm> 6 7 #define INF 100000000 8 #define N 1110000 9 #define BUG system("pause&qu 阅读全文
posted @ 2013-03-17 16:37 proverbs 阅读(1022) 评论(0) 推荐(0) 编辑