码迷,mamicode.com
首页 >  
搜索关键字:the unique mst    ( 5979个结果
【LeetCode】Permutations II
Permutations IIGiven a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2]have the follow...
分类:其他好文   时间:2014-12-13 19:16:20    阅读次数:180
leetcode. Unique Paths
A robot is located at the top-left corner of amxngrid (marked 'Start' in the diagram below).The robot can only move either down or right at any point ...
分类:其他好文   时间:2014-12-13 16:26:37    阅读次数:128
BZOJ3732 Network
这貌似是13年的noip最后一道吧?、、、蒟蒻只会这种题呢、、、Kruskal求出MST,然后倍增就好了 1 /************************************************************** 2 Problem: 3732 3 Us...
分类:Web程序   时间:2014-12-13 10:49:50    阅读次数:196
string中常用的函数
string中常用的函数发现在string在处理这符串是很好用,就找了一篇文章放在这里了..用string来代替char * 数组,使用sort排序算法来排序,用unique 函数来去重1、Define string s1 = "hello"; string s2 = "world"; string...
分类:其他好文   时间:2014-12-12 23:37:58    阅读次数:350
九度OJ 1174 查找第K小数 (STL)
题目1174:查找第K小数 时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:5161 解决:2081 题目描述: 查找一个数组的第K小的数,注意同样大小算一样大。  如  2 1 3 4 5 2 第三小数为3。 输入: 输入有多组数据。 每组输入n,然后输入n个整数(1 输出: 输出第k小的整数...
分类:其他好文   时间:2014-12-12 14:57:09    阅读次数:156
poj 1679 The Unique MST 最小生成树
点击打开链接 http://poj.org/problem?id=1679 题意:给一个无向图,问最小生成树是否唯一,如果唯一就输出最小生成树的所有边的权值的和,如果不唯一,那么就输出Not Unique! 思路:在用prime算法求最小生成树的过程中,在找到权值最小的一个节点之后,先判断一下,这个节点的权值是否可以由好几条路径求得,并且权值都等于当前权值,如果是的话,那么最小生成树就不唯...
分类:其他好文   时间:2014-12-11 20:58:28    阅读次数:291
【leetcode】 Unique Binary Search Trees (middle)☆
Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array[2,3,-2,4],the...
分类:其他好文   时间:2014-12-11 20:49:19    阅读次数:177
3118: Orz the MST(单纯形)
题目链接:http://www.lydsy.com:808/JudgeOnline/problem.php?id=3118题意:给出一个图以及图中指定的n-1条边组成的生成树。每条边权值加1或者减去1都有相应的代价。求一个最小代价使得给出的边是最小生成树。思路:对于每条非树边,必与某些树边形成环。设...
分类:其他好文   时间:2014-12-11 15:31:42    阅读次数:241
【LeetCode】Permutation Sequence
Permutation SequenceThe set[1,2,3,…,n]contains a total ofn! unique permutations.By listing and labeling all of the permutations in order,We get the fo...
分类:其他好文   时间:2014-12-10 21:11:32    阅读次数:194
iOS 的各种识别码
在iOS系统中,获取设备唯一标识的方法有很多:1. x UDID (Unique Device Identifier,已过期)2. x OPEN UDID (已过期)3. 广告标示符(IDFA-identifierForIdentifier)4. Vendor标示符 (IDFV-identifier...
分类:移动开发   时间:2014-12-10 19:37:41    阅读次数:329
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!