码迷,mamicode.com
首页 >  
搜索关键字:perfect    ( 572个结果
二分图水题三发
POJ1274 The Perfect Stall题目大意:n个奶牛m个仓库,每个奶牛都有喜欢的仓库,当然一个奶牛只能住进一个仓库,一个仓库也只能让一个奶牛吃,问最多有多少奶牛能住进喜欢的仓库思路:裸的匹配 练下模板//poj1274#include #include #include#includ...
分类:其他好文   时间:2014-10-31 18:50:56    阅读次数:218
POJ 3905 Perfect Election(2-sat)
POJ 3905 Perfect Election 题目链接 思路:很裸的2-sat,就根据题意建边即可 代码: #include #include #include #include #include using namespace std; const int MAXNODE = 2005; struct TwoSet { int n; vector ...
分类:其他好文   时间:2014-10-27 01:46:37    阅读次数:183
jpegtran图片压缩工具
首先下载 jpegtran 下载地址为http://jpegclub.org/jpegtran.exejpegtran -copy none -optimize -perfect aa.jpg new.jpg
分类:其他好文   时间:2014-10-25 00:49:34    阅读次数:226
poj 1730Perfect Pth Powers(分解质因数)
Perfect Pth Powers Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 16746   Accepted: 3799 Description We say that x is a perfect square if, for some inte...
分类:其他好文   时间:2014-10-18 12:37:41    阅读次数:211
二分图最大匹配
在图论中,匹配是指两两没有公共点的边集。二分图的最大匹配是这样的:给出一个二分图,找到一个边数最大的匹配,即选尽量多的边,使得任意两条选中的边没有公共点。如果所有的点都是匹配点(匹配中的某一条边的端点),则称这个匹配是完美匹配(perfect matching)。下面我们考虑二分图都是联通图,如果是...
分类:其他好文   时间:2014-10-12 12:16:17    阅读次数:200
【限定条件的0-1背包】
Perfect decisionTimeLimit:2 SecondMemoryLimit:32 MegabyteTotalsubmit:128Accepted:23Description有N个物品(1#include#include#includeusing namespace std;int n...
分类:其他好文   时间:2014-10-10 13:00:44    阅读次数:149
网络流专栏
最大流 POJ 1273 Drainage Ditches POJ 1274 The Perfect Stall (二分图匹配) POJ 1698 Alice's Chance(构图) POJ 1459 Power Network(构图) POJ 2112 Optimal Milking (二分) POJ 2455 Secret Milking Machine (二分) POJ 31...
分类:其他好文   时间:2014-10-07 10:03:43    阅读次数:486
POJ1730_Perfect Pth Powers【水题】
题目大意:对于一些整数b,n = b^p,(b为正整数)若p最大时,n为完美平方数 给你一个数n,求使n为完美平方数时,最大的p值 思路:p从31到1遍历,求n的p次开方,转为int型的t,再求t的p次方,转为int型的x 若x和n相等,则求得的p为最大值,break出循环 注意:求n的p次开方用pow()求,因为pow()函数得到的为double型,而double型数据 精度问题,比如4可表示为3.99999……或4.0000001,所以转为int型时+0.1...
分类:其他好文   时间:2014-09-23 11:42:54    阅读次数:194
pat 1085. Perfect Sequence (25)
pat 1085. Perfect Sequence (25) 时间限制 300 ms 内存限制 32000 kB 代码长度限制 16000 B 判题程序 Standard 作者 CAO, Peng Given a sequence of positive integers...
分类:其他好文   时间:2014-09-13 04:08:14    阅读次数:278
POJ 1274 The Perfect Stall(二分匹配 最大匹配数)
POJ 1274 The Perfect Stall(二分匹配 最大匹配数)...
分类:其他好文   时间:2014-09-10 19:33:20    阅读次数:171
572条   上一页 1 ... 51 52 53 54 55 ... 58 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!