黑历史
文章平均质量分 91
oimwqo
这个作者很懒,什么都没留下…
展开
-
Dijkstra算法+优先队列优化
Dijstra算法用于求边的权值没有负数的图的单源最短路的问题。 算法的过程是: ①有两个集合A和B,集合A的点是已经得到到源点最小距离的点,集合B的点是还未得到距离源点最小距离的点; ②每次从集合B中选出一个距离源点距离最小的点u加入集合A,点u从集合B删除加入集合A后,更新集合B中与点u相连的点到源点的最小距离。 ③...原创 2019-04-02 15:54:56 · 1763 阅读 · 0 评论 -
HDU 1005
Problem Description A number sequence is defined as follows: f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7. Given A, B, and n, you are to calculate the value of f(n). Input The ...原创 2015-02-04 23:17:51 · 908 阅读 · 0 评论 -
HDU 5100
http://www.matrix67.com/blog/archives/5900解释的很详细 Problem Description Consider the problem of tiling an n×n chessboard by polyomino pieces that are k×1 in size; Every one of the k pieces of each ...原创 2015-02-04 23:11:57 · 401 阅读 · 0 评论 -
HDU 中国剩余定理
Problem Description Some people believe that there are three cycles in a person's life that start the day he or she is born. These three cycles are the physical, emotional, and intellectual cycles...原创 2015-02-04 22:56:57 · 458 阅读 · 0 评论