随笔分类 -  字典树

HDU 4099 Revenge of Fibonacci(字典树)
摘要:Revenge of FibonacciTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 204800/204800 K (Java/Others)Total Submission(s): 914Accepted Submission(s): 197Problem DescriptionThe well-known Fibonacci sequence is defined as following:Here we regard n as the index of the Fibonacci number F(n).This sequen 阅读全文

posted @ 2012-09-06 17:36 kuangbin 阅读(2178) 评论(1) 推荐(0)

POJ 2513 Colored Sticks(欧拉回路,字典树,并查集)
摘要:Colored SticksTime Limit: 5000MSMemory Limit: 128000KTotal Submissions: 24748Accepted: 6519DescriptionYou are given a bunch of wooden sticks. Each endpoint of each stick is colored with some color. Is it possible to align the sticks in a straight line such that the colors of the endpoints that touch 阅读全文

posted @ 2012-08-07 10:18 kuangbin 阅读(2439) 评论(2) 推荐(0)

POJ 1056 IMMEDIATE DECODABILITY(字典树,判断有没有一个是另一个的前缀)
摘要:IMMEDIATE DECODABILITYTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 8895Accepted: 4222DescriptionAn encoding of a set of symbols is said to be immediately decodable if no code for one symbol is the prefix of a code for another symbol. We will assume for this problem that all codes are in 阅读全文

posted @ 2012-08-06 12:41 kuangbin 阅读(1823) 评论(2) 推荐(0)

HDU 1247 Hat’s Words(字典树)
摘要:Hat’s WordsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3565Accepted Submission(s): 1355Problem 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 ha 阅读全文

posted @ 2012-08-06 10:50 kuangbin 阅读(1462) 评论(0) 推荐(0)

HDU 1617 HDU 3630 Phone List(字典树)
摘要:Phone ListTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 16341Accepted: 5228DescriptionGiven 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 phone catalogue listed these numbers:Emergency 911Alice 97 625 999Bob 阅读全文

posted @ 2012-08-05 11:10 kuangbin 阅读(822) 评论(0) 推荐(0)

HDU 1251 统计难题(字典树)
摘要:统计难题Time Limit: 4000/2000 MS (Java/Others)Memory Limit: 131070/65535 K (Java/Others)Total Submission(s): 10295Accepted Submission(s): 4216Problem DescriptionIgnatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀).Input输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表的是老师交给Ignatius统 阅读全文

posted @ 2012-08-04 23:22 kuangbin 阅读(2644) 评论(0) 推荐(0)

导航

JAVASCRIPT: