摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1075思路:这是字典树水题,只要对插入字典书中的单词标号,然后再根据标号的单词去找相对应的单词就好..............最需要注意的是,hello插入字典树后,如果查找hell应该是返回0的。这里需要对单词末尾进行标记.................#include<iostream>#include<string.h>using namespace std;typedef struct tree{ int num; int flag; tree *next[26];}tree 阅读全文
posted @ 2012-12-18 15:33 紫忆 阅读(1366) 评论(0) 推荐(1) 编辑