C++Boost2容器在线文档:http://www.boost.org/doc/离线文档:解压Boost压缩包,浏览boost_1_62_0/boost_1_62_0/libs/libraries.htm#Containers
目录:
Boostany容器
引用与指针复习,引用并不会退化
boost.tuple,类似STL的pair键值对,但是tuple可以装10种不同的任意数据类型
tuple..
分类:
编程语言 时间:
2016-12-02 03:39:33
阅读次数:
193
题解: 首先将相邻点进行二进制,保存在p[i]中 然后将不同组合的p[i]组合的值记录下来,保存在cover[i]中 然后从小到大进行dp s0为集合s的子集 if(cover[ s0 ] == all - 1) f[s] = max( f[s], f[s ^ s0] + 1); 代码: ...
分类:
其他好文 时间:
2016-12-02 02:38:15
阅读次数:
141
1.泛型 泛型用于指定方法或类可以接受任意类型参数,参数在实际使用时才被确定,泛型可以有效地增强程序的适用性, 使用泛型可以使得类或方法具有更强的通用性。 在Scala中用方括号来定义类型参数,即用[]表示, 如 class Pair[T, S](val first, val) 以上将定义一个带有两 ...
分类:
其他好文 时间:
2016-12-01 21:48:12
阅读次数:
268
题解: 这个题的题意挺误解人的。 每次选取的最优策略。我的理解每次从左开始。或从右开始。选取最大值(每个位置选取的最大值的位置是固定的).把剩下的序列给对方....但题意并不是这样 看了题解。 表示dp[ i ][ j ] 表示 区间 i j 先选得到的最大值. dp[ i ][ j ] = sum ...
分类:
其他好文 时间:
2016-12-01 02:58:41
阅读次数:
212
Pre-requirment: compile and install openssl library, which includes a command line utility openssl Step 1: Generate a RSA key pair and save them to tw ...
分类:
其他好文 时间:
2016-11-29 21:33:01
阅读次数:
153
1、定义 A graph consists of a set of vertices V and a set of edges E. Each edge is a pair (v, w), where v,w belong to V. 路径 A path in a graph is a sequen ...
分类:
其他好文 时间:
2016-11-28 23:00:12
阅读次数:
289
Game of Connections Problem Description This is a small but ancient game. You are supposed to write down the numbers 1, 2, 3, ... , 2n - 1, 2n consecu ...
分类:
其他好文 时间:
2016-11-27 13:56:38
阅读次数:
212
给出一棵有N个节点(2 <= N <= 500000)和N-1条边的树,每条边拥有一个长度L(1 <= L <= 500000)。 定义: (1) path(u, v) = 顶点u和v之间的最短路。 (2) xor-distance(u, v) = ⊕e∈path(u,v)length(e), ⊕代 ...
分类:
其他好文 时间:
2016-11-27 07:31:50
阅读次数:
200