![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法
文章平均质量分 80
robotonyszu
这个作者很懒,什么都没留下…
展开
-
MIT算法导论笔记
Universal Hashing Def: : Let u be a universe of keys, and let H be a finite collection of hash functions mapping u to {0, 1, 2, 3, ... m - 1} H is universal if for all pairs of keys,原创 2013-02-02 15:07:56 · 358 阅读 · 0 评论 -
Probabilistic Graphical Models
Week1: 贝叶斯网络: Bayesian Networks 更多介绍请点这里 A Bayesian network is : a Directed Acyclic(No cycle) Graph(DAG) G whose nodes represent the random variables X1,...Xn for each node Xi a C原创 2013-04-12 13:57:11 · 846 阅读 · 0 评论 -
Algorithm Practice for 1574
The Triangle Game Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 542 Accepted: 315 Description In the triangle game you start off with six triangles n原创 2013-03-02 07:11:37 · 408 阅读 · 0 评论 -
Algorithm Practice for 1576
Colorville Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 283 Accepted: 162 Description A simple matching game for children uses a board that is a sequenc原创 2013-02-28 06:40:34 · 1047 阅读 · 0 评论 -
Algorithm Practice for 1582
Which Way Do I Go? Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 394 Accepted: 66 Description You've decided that the time is right for the next Internet原创 2013-02-20 13:56:03 · 276 阅读 · 0 评论 -
Algorithm Practice for 1581
A Contesting Decision Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 2065 Accepted: 1508 Description Judging a programming contest is hard work, with dema原创 2013-02-20 13:36:06 · 383 阅读 · 0 评论 -
Algorithm Practice for 1580
String Matching Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 3266 Accepted: 1691 Description It's easy to tell if two words are identical - just check t原创 2013-02-19 04:57:38 · 247 阅读 · 0 评论 -
Algorithm Practice for 1578
Instruens Fabulam Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 598 Accepted: 288 Description Instruens Fabulam means drawing a chart (or table) in Latin原创 2013-02-18 17:03:13 · 339 阅读 · 0 评论 -
Dijkstra解单源最大路径
问题三、单源最大路径 给定带权有向图G =(V,E),其中每条边的权是非负实数。另外,还给定V中的一个顶点,称为源。现在要计算从源到所有其它各顶点的最短路长度。这里路的长度是指路上各边权之和。这个问题通常称为单源最短路径问题。 1、算法基本思想 Dijkstra算法是解单源最短路径问题的贪心算法。 其基本思想是,设置顶点集合S并不断地作贪心选择来扩充这个集合。一个顶点属于集原创 2013-02-18 09:13:36 · 884 阅读 · 0 评论 -
Algorithm Practice for 2002
Squares Time Limit: 3500MS Memory Limit: 65536K Total Submissions: 13089 Accepted: 4840 Description A square is a 4-sided polygon whose sides have equal length and ad原创 2013-02-17 13:45:04 · 242 阅读 · 0 评论 -
二叉树中的前趋和后继
后来发现,这个认识是不正确的。对于顺序结构的节点来说(线性结构)节点的前趋和后继节点很直接就找到了。而二叉树是非线性结构的,所以,说二叉树的前趋和后继的前提必须是以二叉树的线索化为前提的。而二叉树的线索化,跟二叉树的遍历方式是密切相关的。所以,在某种遍历方式形成的二叉树的线性结构线索下,再去讨论某个结点的前趋和后继才是有意义的。 现在以一个非单一结点的树作为讨论参照看看三种典型遍历转载 2013-02-08 02:20:45 · 1586 阅读 · 4 评论 -
sieve of Eratosthenes 找质素
由于一个合数总是可以分解成若干个质数的乘积,那么如果把质数(最初只知道2是质数)的倍数都去掉,那么剩下的就是质数了。 例如要查找100以内的质数,首先2是质数,把2的倍数去掉;此时3没有被去掉,可认为是质数,所以把3的倍数去掉;再到5,再到7,7之后呢,因为8,9,10刚才都被去掉了,而100以内的任意合数肯定都有一个因子小于10(100的开方),所以,去掉,2,3,5,7的倍数后剩下的都是质数转载 2013-06-08 14:02:29 · 477 阅读 · 0 评论