随笔分类 -  ACM_Trie字典树

摘要:题目描述 You have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you have a 阅读全文
posted @ 2016-02-16 17:52 Vmetrio 阅读(233) 评论(0) 推荐(0)
摘要:Problem DescriptionThe contest is beginning! While preparing the contest, iSea wanted to print the teams' names separately on a single paper.Unfortuna... 阅读全文
posted @ 2015-12-04 09:29 Vmetrio 阅读(155) 评论(0) 推荐(0)
摘要:Problem Description We all use cell phone today. And we must be familiar with the intelligent English input method on the cell phone. To be specific,... 阅读全文
posted @ 2015-12-03 21:21 Vmetrio 阅读(183) 评论(0) 推荐(0)
摘要:描述小明得到了一张写有奇怪字符串的纸,他想知道一些字符串出现了多少次,但这些字符串太多了,他想找你帮忙,你能帮他吗?输入字符包括所有小写字母、‘@’、‘+’。输入第一行包含一个整数T(T 2 #include 3 #include 4 #include 5 #include 6 #inclu... 阅读全文
posted @ 2015-12-02 19:11 Vmetrio 阅读(239) 评论(0) 推荐(0)
摘要:Problem DescriptionGiven a list of phone numbers, determine if it is consistent in the sense that no number is the prefix of another. Let’s say the ph... 阅读全文
posted @ 2015-12-02 12:31 Vmetrio 阅读(213) 评论(0) 推荐(0)
摘要:实体化代码运行图:实现代码: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 using namespace std;11 12... 阅读全文
posted @ 2015-12-01 21:12 Vmetrio 阅读(198) 评论(0) 推荐(0)
摘要: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... 阅读全文
posted @ 2015-12-01 21:06 Vmetrio 阅读(210) 评论(0) 推荐(0)
摘要:题目链接:http://acm.hdu.edu.cn/status.php?user=NYNU_WMH&pid=1251&status=5Trie树的基本实现字母树的插入(Insert)、删除( Delete)和查找(Find)都非常简单,用一个一重循环即可,即第i 次循环找到前i 个字母所对应的子... 阅读全文
posted @ 2015-11-30 21:05 Vmetrio 阅读(238) 评论(0) 推荐(0)