字典树
文章平均质量分 52
xiaoyulunUSC
这个作者很懒,什么都没留下…
展开
-
HDU 1251 统计难题
纯属拿来练字典树模板的原创 2014-10-06 09:03:39 · 498 阅读 · 0 评论 -
poj 2001 Shortest Prefixes
题目要求的是每个单词的直接前缀是什么,什么是直接前缀呢,直接前缀就是以该直接前缀的子树有且只有该单词 所以,我们只需要沿着以该单词构建的字典树走,输出所有cnt>1的结点和最后一个cnt==1的结点既得答案#include #include #include #include using namespace std;char ch[1500][30];int le=1;str原创 2015-05-10 16:18:14 · 401 阅读 · 0 评论