码迷,mamicode.com
首页 >  
搜索关键字:the unique mst    ( 5979个结果
Leetcode#62 Unique Paths
原题地址基本动态规划题代码: 1 int uniquePaths(int m, int n) { 2 vector sum(n, 0); 3 4 sum[n - 1] = 1; 5 for (int i = m - 1; i >= 0...
分类:其他好文   时间:2015-01-27 19:55:39    阅读次数:238
LeetCode Longest Palindromic Substring 最长回文子串
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.(最长回文子串) 中心扩展法: pub...
分类:其他好文   时间:2015-01-27 18:31:08    阅读次数:151
[LeetCode]39.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 repeated number may be chosen from C unli...
分类:其他好文   时间:2015-01-27 18:23:32    阅读次数:194
[LeetCode]40.Combination Sum II
【题目】 Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. Each number in C may only be used once in t...
分类:其他好文   时间:2015-01-27 18:21:00    阅读次数:180
leetcode-----------Longest Palindromic Substring
题目:Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring. 下面是英文,祝你好运 ...
分类:其他好文   时间:2015-01-27 16:35:09    阅读次数:363
poj-1679 The Unique MST
http://poj.org/problem?id=1679 The Unique MST Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 21550   Accepted: 7619 Description Given a connected...
分类:其他好文   时间:2015-01-27 15:05:39    阅读次数:169
图论——次小生成树
次小生成树模板 通过poj 1679 #include #include #include #include #include #include #include #include using namespace std; #define INF 10000000 /* * 次小生成树 * 求最小生成树时,用数组Max[i][j]来表示MST中i到j最大边权 ...
分类:其他好文   时间:2015-01-27 15:05:28    阅读次数:119
Longest Palindromic Substring
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring. #include #includ...
分类:其他好文   时间:2015-01-27 15:02:38    阅读次数:164
LeetCode No.18 4Sum
Given an arraySofnintegers, are there elementsa,b,c, anddinSsuch thata+b+c+d= target? Find all unique quadruplets in the array which gives the sum of ...
分类:其他好文   时间:2015-01-27 14:50:17    阅读次数:198
LeetCode Unique Paths II
Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space is marked as 1 and 0 respectively in the grid.For e...
分类:其他好文   时间:2015-01-27 13:28:19    阅读次数:149
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!