![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM-图
Sky-J
这个作者很懒,什么都没留下…
展开
-
Dijstra
/** * [Dijkstra description] * @param mp 权值矩阵,从1开始 * @param n 点数 * @param s 起始点 * @param t 终点 * @param path 起始点到各点的路(前驱) * @return 起点到终点的最短长度 */int Dijkstra(int s, int t,原创 2014-02-21 16:08:27 · 700 阅读 · 0 评论 -
uva599 The Forrest for the Trees并查集求树的数目
The Forrest for the TreesTime Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %lluSubmit StatusDescription The Forrest for the Trees A graph原创 2014-07-05 16:37:05 · 955 阅读 · 0 评论 -
uva627The Net 多源最短路bfs,floyd都行
A - The NetTime Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %lluSubmit StatusDescription The Net Taking into account the present interes原创 2014-07-05 16:31:44 · 645 阅读 · 0 评论 -
HDU1385 Floyd加正序记录路径
Minimum Transport CostTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6902 Accepted Submission(s): 1740Problem DescriptionThese a原创 2014-04-25 16:59:05 · 784 阅读 · 0 评论 -
HDU2680dij和spfa模板
Choose the best routeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6247 Accepted Submission(s): 2055Problem DescriptionOne day原创 2014-04-24 13:07:43 · 531 阅读 · 0 评论 -
HDU1317 floyd + SPFA判环(最长路正环)
XYZZYTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2299 Accepted Submission(s): 579Problem DescriptionIt has recently been disc原创 2014-05-02 10:07:33 · 739 阅读 · 0 评论 -
HDU 3339最短路+背包
In ActionTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3791 Accepted Submission(s): 1202Problem DescriptionSince 1945, when t原创 2014-04-29 16:16:35 · 612 阅读 · 0 评论 -
fzu 2038图的遍历,递归求解
Problem 2038 Another Postman Problem Accept: 219 Submit: 738Time Limit: 2000 mSec Memory Limit : 32768 KB Problem DescriptionChinese Postman Problem is a very famous hard problem转载 2014-03-18 21:56:29 · 639 阅读 · 0 评论 -
hdu1507二维状态匹配(还没看懂)
先把解题报告贴这了,回头再发现类似题过来看看感谢:http://hi.baidu.com/qian_yunhua/item/5861959ca7f97f42f0421526这题问的是最多能分到多少财产,而每一份财产都是由两个连着的正方形组成,那么,对于图中的某个正方形,它只有可能与周边的未超出边界,且能使用的正方形相连组成一份财产,那究竟是和其中的哪个相连,这就是配对的问题了。如果相连转载 2014-03-08 17:40:07 · 768 阅读 · 0 评论 -
hdu1281二分匹配关键边
Online JudgeOnline ExerciseOnline TeachingOnline ContestsExercise AuthorF.A.QHand In HandOnline Acmers Forum | DiscussStatistical ChartsProblem ArchiveRealtime Judge StatusAuthors Ranklist原创 2014-03-06 17:34:06 · 763 阅读 · 0 评论 -
HDU2473 删点并查集
转自http://hi.baidu.com/newmyl/item/7054e6e9a6ad980e64db000a/*这题一眼就可以看出是并查集的问题,但众所周知,并查集一般说来只能对集合实现两个操作:并和查,但这题恰恰要对集合进行删点操作,而本题中操作的规模达到10^6,所以删点操作只能是O(1)的操作,在现场赛时一直没有对删点操作想到过什么好的算法,也许是那时太有压力了吧,在现场赛时转载 2014-03-11 21:20:58 · 592 阅读 · 0 评论 -
hdu1281二分匹配关键边
Online JudgeOnline ExerciseOnline TeachingOnline ContestsExercise AuthorF.A.QHand In HandOnline AcmersForum |DiscussStatistical ChartsProblem ArchiveRealtime Judge Stat原创 2014-03-06 17:34:31 · 533 阅读 · 0 评论 -
hdu2389 1151 最小路径覆盖HK算法
//1151的两种做法,注释为匈牙利算法 DAG图的最小路径覆盖数=节点数(n)- 最大匹配数(m)#define DeBUG#include #include #include #include #include #include #include #include #include #include #include #include #include转载 2014-03-06 15:06:14 · 634 阅读 · 0 评论 -
hdu1054 二分图最小点覆盖与树形dp解法
1、二分图#define DeBUG#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std ;#define zero {0}转载 2014-03-04 21:17:49 · 681 阅读 · 0 评论 -
HDU1528二分匹配标准代码~
//题目大意:Adam和Eve打牌,Eve可以看到Adam的牌,牌的顺序先看大小,如果大小一样,再看C,D,SorH(依次增大),每次出一张牌,大的赢一次,求出Eve能赢得最多次。#define DeBUG#include #include #include #include #include #include #include #include #include #inclu原创 2014-03-11 10:58:30 · 573 阅读 · 0 评论 -
UVA10514 River Crossing
River CrossingInput: Standard InputOutput: Standard OutputA group of travelers have reached a river, which they intend to cross by building a small raft. However, they're terrified of the water原创 2014-07-27 18:29:08 · 691 阅读 · 0 评论