最大独立集 = 补图的最大团
最小顶点覆盖 + 最大独立集 = V
#include
#include
const int maxn =100 + 10;
int g[maxn][maxn], dp[maxn], n;
int x[maxn], ans[maxn], mx;
int dfs(int *adj, int ns, int dep) {
int t[maxn];...
分类:
其他好文 时间:
2014-09-11 11:11:11
阅读次数:
188
Given a graph G(V, E), a clique is a sub-graph g(v, e), so that for all vertex pairs v1, v2 in v, there exists an edge (v1, v2) in e. Maximum clique is the clique that has maximum number of
vertex.
...
分类:
其他好文 时间:
2014-09-11 08:47:58
阅读次数:
260
将边权拆成两半加到它所关联的两个点的点权中即可。因为当两个人分别选择不同的点时,这一权值将互相抵消。然后排序从最优开始取。
#include
#include
#include
#include
#include
#include
#include
#include
#define LL long long
using namespace std;
const int maxn=...
分类:
其他好文 时间:
2014-09-10 22:32:11
阅读次数:
226
安装好git客户端和搭好服务器之后,第一步要做的是 git clone 远程主机 添加本地项目时,在git目录下 git add . //表示把当前文件添加到版本库中 git rm -rf 版本库名 //可以删除本地仓库 查看git记录用 git log git...
分类:
其他好文 时间:
2014-09-10 15:40:30
阅读次数:
177
前端时间开发的时候,需要将Ext.data.Store中的data先储存到一个变量中,然后将把这个store的data清空,最后再把变量中的data load到store中。代码是这样的:var tempData = this.store.data.clone();/* Something else...
分类:
其他好文 时间:
2014-09-10 15:32:00
阅读次数:
289
balance = $balance; }}class Person { private $id; private $name; private $age; public $account; public function __construct($name, $...
分类:
Web程序 时间:
2014-09-10 14:02:40
阅读次数:
250
Clone Graph
Total Accepted: 16482 Total
Submissions: 72324My Submissions
Clone an undirected graph. Each node in the graph contains a label and
a list of its neighbors.
OJ's undirect...
分类:
其他好文 时间:
2014-09-09 16:03:18
阅读次数:
236
首先了解下OGNL的概念: OGNL是Object-Graph Navigation Language的缩写,全称为对象图导航语言,是一种功能强大的表达式语言,它通过简单一致的语法,可以任意存取对象的属性或者调用对象的方法,能够遍历整个对...
分类:
其他好文 时间:
2014-09-09 09:16:40
阅读次数:
383
关键词:软件测试, 代码覆盖,质量测试环境:ubuntu 12.04代码覆盖 CFG(Control flow graph)图。控制流图(CFG)是一个有向图抽象数据结构。它是一个过程或程序的抽象表现。每个在图形中的节点代表一个基本块,例如,没有任何跳跃或跳跃目标的直线代码块;跳跃目标以一个块开始,...
分类:
其他好文 时间:
2014-09-08 09:36:06
阅读次数:
292
题目如下:
Problem D
Knights in FEN
Input: standard input
Output: standard output
Time Limit: 10 seconds
There are black and white knightson a 5 by 5 chessboard. There are twelve of each color,...
分类:
其他好文 时间:
2014-09-07 13:36:25
阅读次数:
153