
哈希表
__铭
这个作者很懒,什么都没留下…
展开
-
poj 3349 Snowflake Snow Snowflakes
题意:一共n组数,每组有六个数,查询在n组数列里有没有(包含的数字相同,并且数字顺序符合,可以是顺序也可以是逆序,也可以是从任意一个数开始的顺序)DescriptionYou may have heard that no two snowflakes are alike. Your task is to write a program to determine whether th原创 2015-08-10 21:17:41 · 246 阅读 · 0 评论 -
poj 3274 Gold Balanced Lineup
DescriptionFarmer John's N cows (1 ≤ N ≤ 100,000) share many similarities. In fact, FJ has been able to narrow down the list of features shared by his cows to a list of onlyK different features原创 2015-08-10 21:20:50 · 330 阅读 · 0 评论 -
poj 2503 Babelfish
DescriptionYou have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you have a dictionary to help you understand them.原创 2015-08-14 11:26:30 · 347 阅读 · 0 评论 -
poj 2002 Squares
DescriptionA square is a 4-sided polygon whose sides have equal length and adjacent sides form 90-degree angles. It is also a polygon such that rotating about its centre by 90 degrees gives the same原创 2015-08-14 11:17:54 · 427 阅读 · 0 评论 -
poj 3080 Blue Jeans
DescriptionThe Genographic Project is a research partnership between IBM and The National Geographic Society that is analyzing DNA from hundreds of thousands of contributors to map how the Earth was原创 2015-08-14 11:35:24 · 431 阅读 · 0 评论 -
poj 3007 Organize Your Train part II (字符串哈希)
这应该是一道考STL的题,然而用STL试过2^n遍后,只剩下伤心与落泪没办法,还是得用字符串哈希#include #include #include #include #include #include #include #include #include #include #include #include #include #define RR freop原创 2016-01-28 09:25:32 · 1455 阅读 · 0 评论 -
数据结构实验之查找五:平方之哈希表
数据结构实验之查找五:平方之哈希表Time Limit: 400MS Memory limit: 65536K题目描述给定的一组无重复数据的正整数,根据给定的哈希函数建立其对应hash表,哈希函数是H(Key)=Key%P,P是哈希表表长,P是素数,处理冲突的方法采用平方探测方法,增量di=±i^2,i=1,2,3,...,m-1输入原创 2015-12-04 23:28:52 · 1627 阅读 · 2 评论 -
数据结构实验之查找七:线性之哈希表
数据结构实验之查找七:线性之哈希表Time Limit: 1000MS Memory limit: 65536K题目描述根据给定的一系列整数关键字和素数p,用除留余数法定义hash函数H(Key)=Key%p,将关键字映射到长度为p的哈希表中,用线性探测法解决冲突。重复关键字放在hash表中的同一位置。输入连续输入多组数据,每原创 2015-12-04 22:39:10 · 2375 阅读 · 0 评论