摘要:
字典树(讲解+模版)又称单词查找树,Trie树,是一种树形结构,是一种哈希树的变种。典型应用是用于统计,排序和保存大量的字符串(但不仅限于字符串),所以经常被搜索引擎系统用于文本词频统计。它的优点是:利用字符串的公共前缀来节约存储空间,最大限度地减少无谓的字符串比较,查询效率比哈希表高。字典树与字典... 阅读全文
posted @ 2014-08-01 20:51
我喜欢旅行
阅读(182)
评论(0)
推荐(0)
摘要:
给出n(1#include #include #include #include const int N = 20010;using namespace std;struct node{ int flag; node *next[26];};int n,m,ans = 0;struct node *... 阅读全文
posted @ 2014-08-01 20:34
我喜欢旅行
阅读(230)
评论(0)
推荐(0)
摘要:
一个人的旅行 Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescription虽然草儿是个路痴(就是在杭电待了一年多,居然... 阅读全文
posted @ 2014-08-01 18:48
我喜欢旅行
阅读(177)
评论(0)
推荐(0)
摘要:
六度分离 Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescription 1967年,美国著名的社会学家斯坦利・米尔格兰姆提出了一个名为“小世界现象(small world ph... 阅读全文
posted @ 2014-08-01 14:47
我喜欢旅行
阅读(428)
评论(0)
推荐(0)
摘要:
产生冠军 Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescription有一群人,打乒乓球比赛,两两捉对撕杀,每两个人之间最多打一场比赛。球赛的规则如下:... 阅读全文
posted @ 2014-08-01 14:08
我喜欢旅行
阅读(174)
评论(0)
推荐(0)
摘要:
最短路径问题 Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescription给你n个点,m条无向边,每条边都有长度d和花费p,给你起点s终点t,要求输出起点到终点的最短距离及其... 阅读全文
posted @ 2014-08-01 10:55
我喜欢旅行
阅读(275)
评论(0)
推荐(0)
摘要:
确定比赛名次 Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescription有 N个比赛队(1#include int ... 阅读全文
posted @ 2014-08-01 08:37
我喜欢旅行
阅读(297)
评论(0)
推荐(0)

浙公网安备 33010602011771号