上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 47 下一页

2014年8月9日

摘要: #include #include #include #include #include using namespace std; #define MAXN 9999#define MAXSIZE 10#define DLEN 4class BigInt{ private: int a[50... 阅读全文
posted @ 2014-08-09 21:53 LegendaryAC 阅读(132) 评论(0) 推荐(0) 编辑

2014年8月5日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2853题意:给一个n-m二分图,边权用一个n*m的矩阵表示,给出初始匹配,求二分图完美匹配相比初始匹配改变了几条边以及改变的数值这类题的主要思想是增加原配边的权值,但又不影响最后结果。步骤1:观察顶点数,每条边乘一... 阅读全文
posted @ 2014-08-05 09:52 LegendaryAC 阅读(392) 评论(0) 推荐(0) 编辑

2014年8月3日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4888这题时限给的太短了,以至于卡了一些奇怪的东西,我开始先输入再建图一直T,一边输入一边连边就AC了题意:n*m的矩阵,每个点可以放0-k的数,给你每行每列的和,问可行否,可行的话解是否唯一,唯一则输出那组解网络... 阅读全文
posted @ 2014-08-03 16:12 LegendaryAC 阅读(765) 评论(0) 推荐(0) 编辑

2014年7月30日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3376题意:一个矩阵,每个点有价值,起点左上角终点右下角,每次只能走当前点的下一点或右一点,从起点走到终点,再从终点回到起点,走的点不能重复,问能取到的最大价值用费用流做建图:拆点(保证每个点只取1次),除了起点和... 阅读全文
posted @ 2014-07-30 18:49 LegendaryAC 阅读(318) 评论(0) 推荐(0) 编辑

2014年7月28日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1853和下题一模一样,求一个图环的并,此题的题干说的非常之裸露http://www.cnblogs.com/xiaohongmao/p/3873957.html#include #include #include ... 阅读全文
posted @ 2014-07-28 21:37 LegendaryAC 阅读(202) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3435同下题,只是这题是双向边,同时让我认识到了一个问题,一个图拆点做二分图完美匹配的本质是求该图环的并http://www.cnblogs.com/xiaohongmao/p/3873957.html#inclu... 阅读全文
posted @ 2014-07-28 21:30 LegendaryAC 阅读(165) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4861结论题:p是奇素数,1^n+2^n+...+(p-1)^n=0(mod p),其中p-1不整除n#include #include #include #include #include #include #i... 阅读全文
posted @ 2014-07-28 21:10 LegendaryAC 阅读(324) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4862#include #include #include #include #include using namespace std ;const int INF=0xfffffff ;struct node{ ... 阅读全文
posted @ 2014-07-28 21:04 LegendaryAC 阅读(176) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3488原来写过的一道题,今天重新看费用流又做了一遍题意:给一个图,求环的并(权值和最小)思路:每个点只能走一次,且都要走,所以一个点的出度入度均为1,因此拆点建图跑二分图最优匹配用费用流写的,速度比km慢#incl... 阅读全文
posted @ 2014-07-28 20:46 LegendaryAC 阅读(425) 评论(0) 推荐(0) 编辑

2014年7月21日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3998求LIS的长度,并且求有多少组互不相交的LIS求组数用最大流建图如下:if(dp[i]==1)add(S,i,1) ; if(dp[i]==ans)add(i+n,T,1) ;if(j>i && dp[j... 阅读全文
posted @ 2014-07-21 22:57 LegendaryAC 阅读(553) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 47 下一页