摘要: 后缀数组(SA)总结 这个东西鸽了好久了,今天补一下 概念 后缀数组$SA$是什么东西? 它是记录一个字符串每个后缀的字典序的数组 $sa[i]$:表示排名为$i$的后缀是哪一个。 $rnk[i]$:可以理解为$SA$数组的逆,记录后缀$i$的排名是多少,$rnk[SA[i]]=i$。 $lcp[i 阅读全文
posted @ 2019-01-21 19:38 heyujun 阅读(1443) 评论(8) 推荐(6) 编辑
摘要: 【HDU3117】Fibonacci Numbers 题面 求斐波那契数列的第$n$项的前四位及后四位。 其中$0\leq n include include include include include using namespace std; const int Mod = 1e4; stru 阅读全文
posted @ 2019-01-21 15:23 heyujun 阅读(226) 评论(2) 推荐(0) 编辑
摘要: 线性常系数齐次递推总结 本文为作者的一些理解,如有错误之处请指出。 概念 其实就是这样一个式子: $$ a_n=\alpha_1a_{n 1}+\alpha_2a_{n 2}+\alpha_3a_{n 3}+...+\alpha_ka_{n k} $$ 因为它是线性的,没有高次的项,而且次数都相等, 阅读全文
posted @ 2019-01-21 11:50 heyujun 阅读(513) 评论(1) 推荐(0) 编辑
摘要: 【HDU4565】So Easy! 题面 要你求 $$ \lceil (a+\sqrt b)^n \rceil \% m $$ 其中$0 include include include include include using namespace std; typedef long long ll 阅读全文
posted @ 2019-01-21 10:26 heyujun 阅读(176) 评论(0) 推荐(0) 编辑