码迷,mamicode.com
首页 >  
搜索关键字:minimum    ( 3256个结果
eclipse 安装scons
http://www.sconsolidator.com/updateInstallationTo use SConsolidator, you first have to installSCons(version 2.0 is the minimum requirement). SConsolid...
分类:系统相关   时间:2014-07-07 16:19:42    阅读次数:458
[Leetcode][Tree][Depth of Binary Tree]
计算树的深度1、minimum depth of binary tree 1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * ...
分类:其他好文   时间:2014-07-07 15:31:40    阅读次数:182
Problem Triangle
Problem Description:Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For ex...
分类:其他好文   时间:2014-07-07 15:29:11    阅读次数:280
[leetcode] Minimum Window Substring
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).
分类:Windows程序   时间:2014-07-07 15:11:15    阅读次数:278
Leetcode Edit Distance
Given two wordsword1andword2, find the minimum number of steps required to convertword1toword2. (each operation is counted as 1 step.)You have the fol...
分类:其他好文   时间:2014-07-06 19:31:04    阅读次数:181
HDU 3473 Minimum Sum
Minimum Sum Time Limit: 16000/8000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 2667    Accepted Submission(s): 609 Problem Description You are given ...
分类:其他好文   时间:2014-07-06 12:26:41    阅读次数:200
HDU 1385 Minimum Transport Cost 最短路径题解
本题就是使用Floyd算法求所有路径的最短路径,并且需要保存路径,而且更进一步需要按照字典顺序输出结果。 还是有一定难度的。 Floyd有一种很巧妙的记录数据的方法,大多都是使用这个方法记录数据的。 不过其实本题数据不是很大,一般太大的数据也无法使用Floyd,因为效率是O(N^3)。 所以其实也可以使用一般的Floyd算法,然后增加个三维数组记录数据。下面就是这种做法,0ms过了...
分类:其他好文   时间:2014-07-04 07:18:33    阅读次数:193
[leetcode] Minimum Depth of Binary Tree
Given a binary tree, find its minimum depth.
分类:其他好文   时间:2014-07-03 18:54:32    阅读次数:189
UVA 10560 - Minimum Weight(数论)
UVA 10560 - Minimum Weight 题目链接 题意:有一个天枰,给定n,要求出能称出1 - n重量所需最少的砝码,然后给k个数字,分别表示出怎么去称这k个数字。 思路:首先先求出最少砝码,1肯定是需要的,然后1可以组成1,然后要1个3,就可以组成2,3,4观察后发现,其实每次添加砝码,就添加当前砝码总质量和 * 2 + 1. 证明:当前砝码能组成[1, s...
分类:其他好文   时间:2014-07-01 08:48:14    阅读次数:242
HDU 1394 Minimum Inversion Number 树状数组&&线段树
题目给了你一串序列,然后每次 把最后一个数提到最前面来,直到原来的第一个数到了最后一个,每次操作都会产生一个新的序列,这个序列具有一个逆序数的值,问最小的你逆序数的值为多少 逆序数么 最好想到的是树状数组,敲了一把很快,注意把握把最后一个数提上来对逆序数的影响即可, #include #include #include #include #include #includ...
分类:其他好文   时间:2014-07-01 06:42:09    阅读次数:186
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!