链接:http://www.lightoj.com/volume_showproblem.php?problem=1201最大独立集= 顶点数- 最大匹配代码:#include
#include
#include
#include
#include
#include
#...
分类:
其他好文 时间:
2015-08-26 22:28:06
阅读次数:
200
概要:有一树形结构的网络,要在一些结点安装服务器使得不是服务器的结点周围恰好有一个服务器,问服务器最小数量。先转成有根树(枚举子节点的时候忽略其父亲),然后dp[u][s]表示u的子树安装服务器的最小数量,影响决策的是u是不是服务器以及其父节点的状态,所以s的取值为u是服务器(0),u不是服务器u的...
分类:
其他好文 时间:
2015-08-20 10:16:14
阅读次数:
120
[leetcode]?https://leetcode.com/problems/shortest-word-distance/ For example, Assume that words =?["practice", "makes", "perfect", "coding", "makes"]. Given?word1?=?“coding”,?word2?=?“p...
分类:
编程语言 时间:
2015-08-18 23:00:35
阅读次数:
755
1085. Perfect Sequence (25)Given a sequence of positive integers and another positive integer p. The sequence is said to be a "perfect sequence" if M ...
分类:
其他好文 时间:
2015-08-17 18:46:10
阅读次数:
91
LOJ 1201 - A Perfect Murder(二分匹配 最大独立集)...
分类:
其他好文 时间:
2015-08-16 19:54:12
阅读次数:
140
最大流POJ 1273 Drainage DitchesPOJ 1274 The Perfect Stall (二分图匹配)POJ 1698 Alice's Chance(构图)POJ 1459 Power Network(构图)POJ 2112 Optimal Milking (二分)POJ 24...
分类:
其他好文 时间:
2015-08-16 12:00:41
阅读次数:
187
散列表之完美散列
完美散列perfect hashing
两级散列法
gperf工具来自动生成完美散列函数
gperf的安装
gperf关键字文件的书写格式
gperf应用举例
注意本文中的所有代码你都可以在这里:https://github.com/qeesung/algorithm/tree/master/chapter11/11-5/gperf(这里会及时更新)或者是这里:http://dow...
分类:
其他好文 时间:
2015-07-27 15:09:29
阅读次数:
322
Description
A magic island Geraldion, where Gerald lives, has its own currency system. It uses banknotes of several values. But the problem is, the system is not perfect and sometimes it happens th...
分类:
其他好文 时间:
2015-07-24 20:52:47
阅读次数:
101
转载至: http://www.dutor.net/index.php/2013/11/rvalue-reference-move-semantics-and-perfect-forwarding/ C++11 引入的新特性中,除了并发内存模型和相关设施,这些高帅富之外,最引人入胜且接地气的特性.....
分类:
移动开发 时间:
2015-07-21 21:59:56
阅读次数:
139
最大流量POJ 1273 Drainage DitchesPOJ 1274 The Perfect Stall (二分图匹配)POJ 1698 Alice's Chance(构图)POJ 1459 Power Network(构图)POJ 2112 Optimal Milking (二分)POJ ....
分类:
其他好文 时间:
2015-07-17 20:34:26
阅读次数:
135