码迷,mamicode.com
首页 >  
搜索关键字:unique paths ii    ( 12050个结果
[问题2014S15] 复旦高等代数II(13级)每周一题(第十五教学周)
[问题2014S15] 设 \(O\) 为 \(n\) 阶正交阵,\(A=\mathrm{diag}\{a_1,a_2,\cdots,a_n\}\) 为实对角阵, 证明: 方阵 \(OA\) 的特征值 \(\lambda_j\) 适合不等式: \[m\leq |\lambda_j|\leq M,\,...
分类:其他好文   时间:2014-06-02 20:45:15    阅读次数:246
【leetcode】N-queens II
问题: 返回N皇后问题解的个数。 分析: 详见 N-queens 实现: bool nextPermutation(vector &num) { int i = num.size() - 1; while (i >= 1) { if(num[i] > num[i - 1]) { --i; int ii = num.size() - 1; while (i...
分类:其他好文   时间:2014-06-01 18:24:45    阅读次数:398
hibernate 1-1(详解)
域模型 关系数据模型: 按照外键映射: 按照主键映射: 基于外键映射的 1-1 对于基于外键的1-1关联,其外键可以存放在任意一边,在需要存放外键一端,增加many-to-one元素。为many-to-one元素增加unique=“true” 属性来表示为1-1关联 另一端需要使用one-to-one元素,该元素使用...
分类:系统相关   时间:2014-06-01 16:20:13    阅读次数:508
LeetCode: Unique Binary Search Trees [095]
【题目】 Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For example, Given n = 3, there are a total of 5 unique BST's. 1 3 3 2 1 \ / / / \ 3 2 1 ...
分类:其他好文   时间:2014-06-01 15:34:24    阅读次数:231
LeetCode: Unique Binary Search Trees II [096]
【题目】 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 5 unique BST's shown below. 1 3 3 2 1 \ / / / \ ...
分类:其他好文   时间:2014-06-01 15:33:45    阅读次数:297
LeetCode: Reverse Linked List II [092]
【题目】 Reverse a linked list from position m to n. Do it in-place and in one-pass. For example: Given 1->2->3->4->5->NULL, m = 2 and n = 4, return 1->4->3->2->5->NULL. Note: Given m, n satisfy the following condition: 1 ≤ m ≤ n ≤ length of list. 【题意】 ...
分类:其他好文   时间:2014-06-01 15:08:34    阅读次数:237
POJ 1679 The Unique MST 次小生成树
题目来源:POJ 1679 The Unique MST 题意:判断最小生成树是否唯一 求出次小生成树比较 思路:慢一点的方法就是求出最小生成树 每次去掉最小生成树的一条边再求最小生成树 比较慢 更好的方法是 求出最小生成树后加上一条没有用到的边 然后必定出现一条回路 去掉回路上权值最大的边 做m-(n-1)次  求一次最小生成树 然后n^2的时间预处理最小生成树上两点之间最大的边权 最后...
分类:其他好文   时间:2014-06-01 13:53:03    阅读次数:225
【leetcode】Permutations II
问题: Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example, [1,1,2] have the following unique permutations: [1,1,2], [1,2,1], and...
分类:其他好文   时间:2014-06-01 13:03:12    阅读次数:324
LeetCode: Subsets II [091]
【题目】 Given a collection of integers that might contain duplicates, S, return all possible subsets. Note: Elements in a subset must be in non-descending order. The solution set must not contain duplicate subsets. For example, If S = [1,2,2], a solution ...
分类:其他好文   时间:2014-06-01 08:51:06    阅读次数:292
poj 2769 Reduced ID Numbers(memset使用技巧)
Description T. Chur teaches various groups of students at university U. Every U-student has a unique Student Identification Number (SIN). A SIN s is an integer in the range 0 ≤ s ≤ MaxSIN with MaxS...
分类:其他好文   时间:2014-06-01 07:40:18    阅读次数:248
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!