随笔分类 - size balance tree 初试~_~
摘要:1407 - 郁闷的小J 小J是国家图书馆的一位图书管理员,他的工作是管理一个巨大的书架。虽然他很能吃苦耐劳,但是由于这个书架十分巨大,所以他的工作效率总是很低,以致他面临着被解雇的危险,这也正是他所郁闷的。 具体说来,书架由N个书位组成,编号从1到N。每个书位放着一本书,每本书有一个特定的编码。 ...
阅读全文
摘要:As another one of their crazy antics, the N (1 ≤ N ≤ 100,000) cows want Farmer John to race against the clock to answer some of their pressing questio...
阅读全文
摘要:找不到题目了,试敲了一下感觉还是挺不错的,学习了下别人的代码,差不多能感受到他的强大。哈哈。sl :可以说算是超级水提了,只要清楚这个数据结构就知道了。 1#include2#include3#include4usingnamespacestd;5constintMAX=100000+10;6int...
阅读全文
摘要:1#include2#include3#include4#include5#defineN1000056usingnamespacestd;7structSBT{8//左子树指针,右子树指针,大小,键值9intleft,right,size,key;10voidInit(){11left=righ...
阅读全文