- 博客(8)
- 资源 (1)
- 收藏
- 关注
转载 hash冲突处理
对于Hash冲突,我们是怎样来处理冲突的。现在就来介绍一些经典的Hash冲突处理的方法。主要包括 (1)开放地址法 (2)拉链法 (3)再哈希法 (4)建立公共溢出区 (1)开放地址法 基本思想:当发生地址冲突时,按照某种方法继续探测Hash表中其它存储单元,直到找到空位置为止。描述如下 其中,为关键字的直接H
2015-02-08 02:10:28 633
转载 跳跃的舞者,舞蹈链(Dancing Links)算法——求解精确覆盖问题
转自:http://www.cnblogs.com/grenet/p/3145800.htm精确覆盖问题的定义:给定一个由0-1组成的矩阵,是否能找到一个行的集合,使得集合中每一列都恰好包含一个1例如:如下的矩阵就包含了这样一个集合(第1、4、5行) 如何利用给定的矩阵求出相应的行的集合呢?我们采用回溯法 矩阵1: 先
2015-02-07 14:22:55 750
原创 hdu-1465 不容易系列之一 【排错公式】
问题提出:n封不同的信对应n个不同的信箱,问都装错信封的方法有多少种?分析:错排公式的递推式为: 不容易系列之一Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 15670 Accepted
2015-02-05 18:12:48 800
原创 hdu 1260 Tickets 【dp】
TicketsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1258 Accepted Submission(s): 599Problem DescriptionJesus, what a great
2015-02-05 15:58:41 655
原创 hdu-1257 最少拦截系统
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1257最少拦截系统Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 22272 Accepted Submission(
2015-02-04 22:29:59 580
原创 stl reverse 函数
功能:翻转字符串 ,翻转数组, 用于STL的翻转。头文件: 例子:#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;char s[100];
2015-02-04 13:49:16 2329
原创 Codeforces Round #290 (Div. 2) B. Fox And Two Dots
题目链接 :http://codeforces.com/contest/510/problem/BB. Fox And Two Dotstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandar
2015-02-03 21:56:14 527
原创 hdu-5167 Fibonacci
链接地址:http://acm.hdu.edu.cn/showproblem.php?pid=5167FibonacciTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 474 Accepted Submis
2015-02-01 00:28:03 802
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人