码迷,mamicode.com
首页 >  
搜索关键字:unique paths    ( 5916个结果
[leetcode]Unique Paths II
Unique Paths IIFollow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle an...
分类:其他好文   时间:2014-08-08 23:55:17    阅读次数:263
[LeetCode: 题解] Combination Sum
Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.The same repeate...
分类:其他好文   时间:2014-08-08 20:54:46    阅读次数:246
Permutations II leetcode java
题目:Given a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2] have the following unique....
分类:编程语言   时间:2014-08-08 01:54:55    阅读次数:292
mnesia 动态改变数据库字段
create() ->mnesia:create_table(?ID_TABLE, [{disc_copies, [node()]}, {attributes, record_info(fields, unique_id)}]),Fun = fun(Old) ->#game_server_data{...
分类:数据库   时间:2014-08-07 21:43:30    阅读次数:241
Hibernate之实体类配置
1、@Column属性(1)设置字段属性唯一@Column(unique=true)private String name;Done
分类:系统相关   时间:2014-08-07 18:36:40    阅读次数:266
boost uuid
uuid:uuid库是一个小的使用工具,可以表示和生成UUIDUUID是University Unique Identifier的缩写,它是一个128位的数字(16字节),不需要有一个中央认证机构就可以创建全国唯一的标示符。别名:GUIDuuid位于名字空间boost::uuisd,没有集中的头文件...
分类:其他好文   时间:2014-08-07 15:38:30    阅读次数:259
HDU 4912 Paths on the tree
http://acm.hdu.edu.cn/showproblem.php?pid=4912题意:给一棵树,再给一些路径,求最多有多少条路径不相交。题解:主要是贪心的想法。用LCA处理出路径的层数,然后从最深处的节点往上找。因为节点越深,对其他路径影响度越小,相交的可能性越低。需要手动扩栈。 1 ....
分类:其他好文   时间:2014-08-07 09:44:10    阅读次数:209
[LeetCode] Unique Binary Search Trees II (难以忍受的递归)
Given n, generate all structurally unique BST's (binary search trees) that store values 1...n.For example, Given n = 3, your program should return all...
分类:其他好文   时间:2014-08-07 00:16:36    阅读次数:276
hdu4912 Paths on the tree --- LCA贪心
给一棵n个结点的树,m条路径的起点和终点, 问至多可以选择多少条路径使其两两间没有公共点。 这题的主要问题是, 1、如何判断两条路径上没有交点 2、按什么策略来选 看上去感觉是最大匹配问题,但nm的范围较大问题1无法高效的解决。 画个图发现可能和LCA有关,但比赛时不知道这到底有什么用,完全没想贪心。 要选择尽量多,就是要尽量避免冲突。 我们选择一个点作为根,把给的边画出来...
分类:其他好文   时间:2014-08-06 23:06:12    阅读次数:282
HDU 4912 LCA+贪心
Paths on the treeTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 531Accepted Submission(s): 182P...
分类:其他好文   时间:2014-08-06 22:48:32    阅读次数:302
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!