
字典树
@萌橙开心
这个作者很懒,什么都没留下…
展开
-
树状数组详解
先贴一下树状数组的模板代码: 1 int lowbit(int i) 2 { 3 return i & -i;//或者是return i-(i&(i-1));表示求数组下标二进制的非0最低位所表示的值 4 } 5 void update(int i,int val)//单点更新 6 { 7 while(i<=n){ 8 ...转载 2019-02-28 08:35:54 · 216 阅读 · 0 评论 -
Prefix Free Code 解题报告
Considernninitial strings of lower case letters, where no initial string is a prefix of any other initial string. Now, consider choosingkkof the strings (no string more than once), and concatenati...原创 2019-02-28 08:46:33 · 377 阅读 · 0 评论 -
字典树模板
这里给出两篇讲解非常详细的字典树博客:https://blog.youkuaiyun.com/piaocoder/article/details/47836559https://blog.youkuaiyun.com/SunnyYoona/article/details/43900425第一篇更注重于算法模板,而第二篇更注重于算法讲解。这里给出综合两篇文章的算法代码:#include <bit...原创 2019-02-26 19:36:54 · 205 阅读 · 0 评论