└──字典树
文章平均质量分 73
Kuro同学
这个作者很懒,什么都没留下…
展开
-
hdu1247 Hat’s Words 字典树
Problem DescriptionA hat’s word is a word in the dictionary that is the concatenation of exactly two other words in the dictionary.You are to find all the hat’s words in a dictionary. Inpu原创 2014-12-24 12:03:26 · 1010 阅读 · 0 评论 -
POJ 2513 Colored Sticks 欧拉路的判断+字典树
题目链接:poj2513题意:给定一捆木棍。每根木棍的每个端点涂有某种颜色。问:是否能将这些棍子首尾相连,排成一条直线,且相邻两根棍子的连接处端点的颜色一样。输入描述:输入文件中包含若干行,每行为两个单词,用空格隔开,表示一根棍子两个端点的颜色。表示颜色的单词由小写字母组成,长度不超过10 个字符。木棍的数目不超过250000。输出描述:如果木棍原创 2015-05-13 17:18:45 · 919 阅读 · 0 评论 -
hihocoder 1014 Trie树 字典树
题目链接:hihocoder 1014代码:#include#include#includeusing namespace std;struct node{ int ans; node* next[26]; node() { ans=1; for(int ii=0;ii<26;ii++)原创 2015-05-25 17:53:40 · 736 阅读 · 0 评论