码迷,mamicode.com
首页 >  
搜索关键字:minimum    ( 3256个结果
HDU 3473 Minimum Sum 划分树,数据结构 难度:1
http://acm.hdu.edu.cn/showproblem.php?pid=3473划分树模板题目,需要注意的是划分树的k是由1开始的划分树:参考:http://blog.csdn.net/shiqi_614/article/details/8041390划分树的定义 划分树定义为,它的每一...
分类:其他好文   时间:2015-02-21 00:14:26    阅读次数:355
POJ2914 Minimum Cut【全局最小割】【Stoer-Wangner】
题目大意: 提一个无向有重边的图,有重边的边权累加起来,求全局最小割。 思路: 一个无向连通图,去掉一个边集可以使其变成两个连通分量则这个边集就是割集。最小割 集当然就是权和最小的割集。 这是一个最简单的全局最小割模板题。直接套上模板就可以了。来说说Stoer-Wangner算 法吧。 Stoer-Wangner算法: 对于图中的任意两个顶点u和v,若u,v属于最小割的同一个集合中,那么僵顶点u和顶点 v合并后并不影响图的最小割。那么,如果能求出图中某两个顶点之间的最小割,更新答案 后合并这两个顶点继续求...
分类:其他好文   时间:2015-02-20 23:12:06    阅读次数:361
【LeetCode】Min Stack 解题报告
【题目】Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Rem...
分类:其他好文   时间:2015-02-19 17:29:31    阅读次数:263
HDU 1385 Minimum Transport Cost 最短路径题解
本题就是使用Floyd算法求全部路径的最短路径,并且须要保存路径,并且更进一步须要依照字典顺序输出结果。还是有一定难度的。Floyd有一种非常巧妙的记录数据的方法,大多都是使用这种方法记录数据的。只是事实上本题数据不是非常大,一般太大的数据也无法使用Floyd,由于效率是O(N^3)。所以事实上也能...
分类:其他好文   时间:2015-02-19 11:49:19    阅读次数:187
LeetcodeOJ: Triangle 动态规划
Total Accepted: 31557 Total Submissions: 116793Given a triangle, find the minimum path sum from top to bottom.Each step you may move to adjacent numbe...
分类:其他好文   时间:2015-02-18 17:35:55    阅读次数:202
Codeforces Round #291 (Div. 2)
A. Chewbaсca and Number题意:Inverting digit t means replacing it with digit 9?-?t. Print the minimum possible positive number that Chewbacca can obtain ...
分类:其他好文   时间:2015-02-16 01:41:05    阅读次数:224
leetcode------Find Minimum in Rotated Sorted Array II
标题:Find Minimum in Rotated Sorted Array II通过率:31.1%难度:难Follow upfor "Find Minimum in Rotated Sorted Array":What ifduplicatesare allowed?Would this aff...
分类:其他好文   时间:2015-02-15 12:07:22    阅读次数:133
【算法导论】学习笔记——第12章 二叉搜索树
搜索树数据结构支持多种动态集合操作,包括SEARCH、MINIMUM、MAXIMUM、PREDECESSOR、SUCCESSOR、INSRT和DELETE操作等。基本的搜索树就是一棵二叉搜索树。12.1什么是二叉搜索树1. 二叉搜索树的性质:设x是二叉搜索树中的一个结点。如果y是x左子树中的一个结点...
分类:编程语言   时间:2015-02-14 22:27:38    阅读次数:351
[leetcode]Minimum Window Substring
Minimum Window Substring解题记录。
分类:Windows程序   时间:2015-02-14 18:54:54    阅读次数:194
Leetcode 120 Triangle (Dynamic Programming Method)
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 example, given the fol...
分类:其他好文   时间:2015-02-14 06:30:29    阅读次数:142
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!