码迷,mamicode.com
首页 >  
搜索关键字:the unique mst    ( 5979个结果
最小生成树之 prim算法和kruskal算法(以 hdu 1863为例)
最小生成树的性质MST性质:设G=(V,E)是连通带权图,U是V的真子集。如果(u,v)∈E,且u∈U,v∈V-U,且在所有这样的边中,(u,v)的权c[u][v]最小,那么一定存在G的一棵最小生成树,(u,v)为其中一条边。构造最小生成树,要解决以下两个问题:(1).尽可能选取权值小的边,但不能构...
分类:其他好文   时间:2014-07-26 00:58:06    阅读次数:251
QTP使用小技巧
一、添加固定注释新建一TXT文档,将要添加的注释写在文档中将文档名改为:ActionTemplate.mst将文件放到QTP安装目录的dat文件夹中设置好后,在QTP中每次新建一个测试就会自动添加固定的注释 二、调用外部vbs文件方法 1.将通用函数写在一个vbs文件中,以供其他脚本调用 2.调用....
分类:其他好文   时间:2014-07-25 19:11:31    阅读次数:401
【leetcode刷题笔记】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 ...
分类:其他好文   时间:2014-07-25 14:13:21    阅读次数:317
LeetCode_61uniquePaths [Unique Paths]
#pragma warning(disable:4996) #include <cstdio> #include <Windows.h> #include <tchar.h> /* submit time : 3 1. Time Limit Exceeded 23, 12 request : A robot is located at the top-left corn...
分类:其他好文   时间:2014-07-25 11:40:41    阅读次数:315
[LeetCode] Unique Paths
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).The robot can only move either down or right at any po...
分类:其他好文   时间:2014-07-25 10:54:31    阅读次数:229
【HDU1162】Eddy's picture(MST基础题)
很基础的点坐标MST,一不留神就AC了, - - !! 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 11 #define t...
分类:其他好文   时间:2014-07-25 02:32:14    阅读次数:318
POJ 1679:The Unique MST(次小生成树&&Kruskal)
The Unique MST Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 19941   Accepted: 6999 Description Given a connected undirected graph, tell if its min...
分类:其他好文   时间:2014-07-24 23:36:24    阅读次数:403
Leetcode--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 unlimited numb...
分类:其他好文   时间:2014-07-24 23:18:03    阅读次数:293
【HDU1301】Jungle Roads(MST基础题)
爽爆。史上个人最快MST的记录7分40s。。一次A。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 10 #define typec int11 us...
分类:其他好文   时间:2014-07-24 22:53:33    阅读次数:247
【HDU3371】Connect the Cities(MST基础题)
注意输入的数据分别是做什么的就好。还有,以下代码用C++交可以过,而且是500+ms,但是用g++就会TLE,很奇怪。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #inc...
分类:其他好文   时间:2014-07-24 22:10:12    阅读次数:234
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!