题目
Smart Beaver recently got interested in a new word game. The point is as follows: count the number of distinct good substrings of some string
s.[……]
渺渺苍天,星光烁烁,美丽家园球外乡
Smart Beaver recently got interested in a new word game. The point is as follows: count the number of distinct good substrings of some string
s.[……]
S是用到的数组,S0~S3代表四个阶段
系数向量是a
其实本来我是想写个类似讲解的东西的……然后发现智商太低写不出来……然后就像这样弄了个演示……然后就发现它变成了公式恐惧症患者的福音(╯‵□′)╯︵┻━[……]
这道题中的摩天大楼描述了被称作跳跃表(Skip List)的数据结构。跳跃表在某种意义上和AVL、红黑树相似,因为它支持O(logN)的插入,操作和查找(包括上下界查[……]