编程及软件开发解决方案库

2000万优秀解决方案库,覆盖所有编程及软件开发类,极速查询

今日已更新 1188 篇代码解决方案

  • 1:普利姆算法(最小生成树)

                        int prim(){    int minid, i, j;    double mincost;    for(i = 2; i <= n; i ++){        lowcost[i] = map[1][i];    }    lowcost[1] = -1;    f

    https://www.u72.net/daima/sbvu.html - 2024-07-12 22:20:13 - 代码库
  • 2:POJ 1287:Networking(最小生成树Kruskal)

                        NetworkingTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 5976 Accepted: 3231DescriptionYou are assigned to design network conne

    https://www.u72.net/daima/sfdd.html - 2024-07-12 22:56:54 - 代码库
  • 3:POJ 1789 Truck History 最小生成树

                        Truck HistoryTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 17606 Accepted: 6784DescriptionAdvanced Cargo Movement, Ltd. uses tru

    https://www.u72.net/daima/scd5.html - 2024-07-12 23:47:50 - 代码库
  • 4:hdu 1301 最小生成树prim实现

                        http://acm.hdu.edu.cn/showproblem.php?pid=1301Jungle RoadsTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others

    https://www.u72.net/daima/c1cx.html - 2024-07-11 05:27:10 - 代码库
  • 5:hdu 3371 最小生成树prim算法

                        Connect the CitiesTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8992    Accepted

    https://www.u72.net/daima/c3ks.html - 2024-07-11 07:12:07 - 代码库
  • 6:hdu 4750 Count The Pairs 最小生成树

                        题意就是给出一个f值,然后假如两个点u,v间的所有路径上的最大边中的最小值大于f,那么这个点对是合法的,对于每个询问f,输出有多少个合法点对。最大边最小就

    https://www.u72.net/daima/ce4k.html - 2024-07-11 13:59:40 - 代码库
  • 7:【待修改】nyoj 38 最小生成树

                        package nyoj;import java.util.Scanner;public class Main {    public static void main(String args[])    {        //System.out.println(Integer

    https://www.u72.net/daima/3cr0.html - 2024-07-21 02:37:09 - 代码库
  • 8:hdu 1102 Constructing Roads(最小生成树)

                        题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1102Problem DescriptionThere are N villages, which are numbered from 1 to N, and you shou

    https://www.u72.net/daima/01mm.html - 2024-07-18 07:40:40 - 代码库
  • 9:poj 1789 Truck History(最小生成树)

                        题目链接:http://poj.org/problem?id=1789DescriptionAdvanced Cargo Movement, Ltd. uses trucks of different types. Some trucks are used for veg

    https://www.u72.net/daima/04ur.html - 2024-07-18 09:49:22 - 代码库
  • 10:POJ 3265 Building Roads(最小生成树)

                        Building RoadsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9255 Accepted: 2669DescriptionFarmer John had just acquired several

    https://www.u72.net/daima/0rh4.html - 2024-07-18 00:53:24 - 代码库
  • 11:(寒假集训)Watering the Fields (最小生成树)

                        Watering the Fields时间限制: 1 Sec  内存限制: 64 MB提交: 26  解决: 10[提交][状态][讨论版]题目描述Due to a lack of rain, Farmer John wa

    https://www.u72.net/daima/2hwh.html - 2024-08-31 20:05:13 - 代码库
  • 12:hdu 1102 Constructing Roads (最小生成树)

                        题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1102Constructing RoadsTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768

    https://www.u72.net/daima/1uhm.html - 2024-07-19 02:43:46 - 代码库
  • 13:CSU 1116 Kingdoms(枚举最小生成树)

                        题目链接:http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1116解题报告:一个国家有n个城市,有m条路可以修,修每条路要一定的金币,现在这个国家只有K个金

    https://www.u72.net/daima/79rz.html - 2024-07-25 21:09:21 - 代码库
  • 14:CodeForces 76A Gift - 最小生成树

                        The kingdom of Olympia consists of N cities and M bidirectional roads. Each road connects exactly two cities and two cities can be connected

    https://www.u72.net/daima/7ekh.html - 2024-09-10 22:38:44 - 代码库
  • 15:hdu 1233(最小生成树 prim算法)

                        还是畅通工程Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 43080    Accepted Subm

    https://www.u72.net/daima/5kk8.html - 2024-09-06 04:53:48 - 代码库
  • 16:cf Inverse the Problem (最小生成树+DFS)

                        题意:N个点。N行N列d[i][j]。d[i][j]:结点i到结点j的距离。问这N个点是否可能是一棵树。是输出YES,否则输出NO。 思路:假设这个完全图是由一棵树得来的,则我

    https://www.u72.net/daima/7ku7.html - 2024-07-25 02:50:58 - 代码库
  • 17:POJ 1789 Truck History(最小生成树)

                        题意  有n辆卡车  每辆卡车用7个字符表示  输入n  再输入n行字符  第i行与第j行的两个字符串有多少个对应位置的字符不同  i与j之间的距离就是几  求连

    https://www.u72.net/daima/maxr.html - 2024-07-29 03:27:08 - 代码库
  • 18:小生成树模板(poj3625)

                        Building RoadsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9360 Accepted: 2690DescriptionFarmer John had just acquired several

    https://www.u72.net/daima/e92f.html - 2024-07-29 00:49:19 - 代码库
  • 19:【裸最小生成树】 模板 poj 1258

                        #include<iostream>#include<cstdio>#include<cstdlib>#include<cstring>#define MAX 102void read();using namespace std;int map[MAX][MAX],best[MA

    https://www.u72.net/daima/8r17.html - 2024-07-26 08:15:21 - 代码库
  • 20:POJ - 1251 Jungle Roads(最小生成树)

                        题意:求连通所有路需要修的最短路径。和上次的hdu1233差不多的题目,只不过这里要把输入的字母转换成数字,这样会方便很多。 1 #include <iostream> 2

    https://www.u72.net/daima/8r66.html - 2024-09-11 16:20:33 - 代码库