- Touch symbian S60 5TH 的一个TOUCH源码
- ds1302-1602 89C52控制ds1302+lcd1602
- SCM-C8051F040 说明:该资料详细讲解了c8051f040的特点及其结构
- acnt_reg7.63 AlphaControls v7.63 Stable Released (02.04.2012) Full Source
- sem Linux Device support for audit of ipc object properties and permission changes
- lineage LINEAGE 1.82 自修改 自行汇入 SQL(LINEAGE 1.82c Modify the version yourself)
文件名称:trie
-
所属分类:
- 标签属性:
- 上传时间:2016-07-13
-
文件大小:1.32mb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
trie 树实现
输入
输入的第一行为一个正整数n,表示词典的大小,其后n行,每一行一个单词(不保证是英文单词,也有可能是火星文单词哦),单词由不超过10个的小写英文字母组成,可能存在相同的单词,此时应将其视作不同的单词。接下来的一行为一个正整数m,表示小Hi询问的次数,其后m行,每一行一个字符串,该字符串由不超过10个的小写英文字母组成,表示小Hi的一个询问。
在20 的数据中n, m< 10,词典的字母表大小< 2.
在60 的数据中n, m< 1000,词典的字母表大小< 5.
在100 的数据中n, m< 100000,词典的字母表大小< 26.
本题按通过的数据量排名哦~
输出
对于小Hi的每一个询问,输出一个整数Ans,表示词典中以小Hi给出的字符串为前缀的单词的个数。-Trie tree implementation
input
Input the first act a positive integer n, said the dictionary size, followed by N lines, each line of a word (not guaranteed is English words, there may be a Martian words Oh), words consist of no more than 10 lowercase letters, may the same word, this should be regarded as different words. The next act a positive integer m, said the number of small Hi query, then m lines, each line of a string, the string consists of no more than 10 lowercase letters of the alphabet, said a small Hi of a query.
In 20 of the data in the m< 10, N, dictionary of the alphabet size < 2.
In 60 of the data in the m< 1000, N, dictionary of the alphabet size < 5.
In 100 of the data in the m< 100000, N, dictionary of the alphabet size < 26.
According to the amount of data by ranking Oh ~
output
For each of the small Hi query, the output of an integer Ans, which is a small Hi in the dictionary given the string as the prefix of the number of words.
输入
输入的第一行为一个正整数n,表示词典的大小,其后n行,每一行一个单词(不保证是英文单词,也有可能是火星文单词哦),单词由不超过10个的小写英文字母组成,可能存在相同的单词,此时应将其视作不同的单词。接下来的一行为一个正整数m,表示小Hi询问的次数,其后m行,每一行一个字符串,该字符串由不超过10个的小写英文字母组成,表示小Hi的一个询问。
在20 的数据中n, m< 10,词典的字母表大小< 2.
在60 的数据中n, m< 1000,词典的字母表大小< 5.
在100 的数据中n, m< 100000,词典的字母表大小< 26.
本题按通过的数据量排名哦~
输出
对于小Hi的每一个询问,输出一个整数Ans,表示词典中以小Hi给出的字符串为前缀的单词的个数。-Trie tree implementation
input
Input the first act a positive integer n, said the dictionary size, followed by N lines, each line of a word (not guaranteed is English words, there may be a Martian words Oh), words consist of no more than 10 lowercase letters, may the same word, this should be regarded as different words. The next act a positive integer m, said the number of small Hi query, then m lines, each line of a string, the string consists of no more than 10 lowercase letters of the alphabet, said a small Hi of a query.
In 20 of the data in the m< 10, N, dictionary of the alphabet size < 2.
In 60 of the data in the m< 1000, N, dictionary of the alphabet size < 5.
In 100 of the data in the m< 100000, N, dictionary of the alphabet size < 26.
According to the amount of data by ranking Oh ~
output
For each of the small Hi query, the output of an integer Ans, which is a small Hi in the dictionary given the string as the prefix of the number of words.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
trie/trie/main.cpp
trie/trie/trie.vcxproj
trie/trie/trie.vcxproj.filters
trie/trie.sdf
trie/trie.sln
trie/trie.v12.suo
trie/trie
trie
trie/trie/trie.vcxproj
trie/trie/trie.vcxproj.filters
trie/trie.sdf
trie/trie.sln
trie/trie.v12.suo
trie/trie
trie
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.