Jungle Roads Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 5451    Accepted Submission(s): 3932 Problem Description
原创 2023-04-20 15:30:03
55阅读
欢迎参加——每周六晚的BestCoder(有米!)Jung
转载 2015-08-11 19:15:00
67阅读
2评论
A - Jungle Roads A - Jungle Roads A - Jungle Roads 思路:并查集的板子,重点是字符的转换,不能忘了加上1。 #include<cmath> #include<cstdio> #include<cstdlib> #include<cstring> #i
转载 2018-02-23 08:01:00
60阅读
2评论
# Python Jungle框架实现教程 ## 1. 概述 Python Jungle是一个基于Python语言的开源框架,它提供了一系列的工具和功能,帮助开发者更高效地构建Web应用程序。本教程将指导你如何使用Python Jungle框架。 ## 2. 搭建Python Jungle框架的步骤 下面是使用Python Jungle框架的典型步骤: | 步骤 | 描述 | | --- |
原创 2023-09-16 09:30:59
735阅读
题解:最小生成树…………#include #include using namespace std;struct node{int a,b,l;}seg[900];int f[27],m,n,a,b; char c;int sf(int x){return f[x]==x?x:f[x]=sf(f[x]);}bool cmp(node a,node b){return a.l'Z');x=c-'A';}void scan(int &x){ while(c=getchar(),c'9');x=c-'0'; while(c=ge
转载 2014-03-16 14:14:00
19阅读
2评论
一、内容The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes roads relentlessl...
原创 2021-08-27 14:20:02
217阅读
知道是最小生成树 都懒得再一句一句翻译题目了...
转载 2016-02-20 02:46:00
40阅读
Jungle RoadsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5012Accepted Submission(s): 3641Proble...
转载 2015-05-31 15:28:00
62阅读
2评论
题意:给你n个点  n-1行每行代表的是这个点到给定点的距离   求最短路 解题思路:开始是用getchar  发现runtime error   后来用了  字符串  才改进了   裸Kruskal 解题代码: poj 1251 // File Name: c.cpp // Author: darkdream // Created Time: 2013年04月24日 星期三 22时43分39
转载 2013-04-25 13:27:00
40阅读
2评论
$MST$裸题。 struct Node { int a,b,c; bool operator<(const Node &W) const { return c < W.c; } }e[80]; int p[30]; int n,m; int find(int x) { if(x != p[x])
转载 2021-03-02 16:07:00
54阅读
Jungle RoadsTime Limit: 1000msMemory Limit: 10000KBThis problem will be judged onPKU. Original ID:125164-bit integer IO format:%lld Java class name:Ma...
转载 2014-08-28 10:10:00
47阅读
基础最小生成树。 Kruskal 比較简单。排序+并查集。 最多26个点。 处理下字母。输入共n-1行。 算是复习了。 #include<cstdio> #include<cstring> #include<string> #include<queue> #include<algorithm> #include<que
转载 2017-07-26 15:24:00
14阅读
2评论
题目:http://acm.hdu.edu.cn/showproblem.php?pid=1301很好写的prim吧,同样Kruskal也可以#include #include #incl
原创 2022-08-22 16:45:22
47阅读
The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes roads relentlessly, so the large road network is too expensive to maintain. The Council of Elders must choose to stop main
原创 2021-07-29 16:19:23
92阅读
#include <iostream> // 最小生成树kruskal算法#include <algorithm>using namespace std;const int maxn=30,maxm=80;int n,m; //n,m分别是结点数和边数int p[maxn]; //记录并查集中该结点的父亲int u[maxm],v[maxm],w[maxm]; //保存边的端点序号和权值int r[maxm]; //用于间接排序--排序的关键字是对象的“代号”,而不是对象本身int cmp(const int i,const int j){ ...
转载 2011-07-22 19:04:00
29阅读
2评论
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1301//HDOJ1301#include#includeusing namespace std;#define MAX 99999#define LEN 30int dist[LEN];//某点的权值 ...
转载 2014-07-28 14:49:00
48阅读
2评论
一、内容The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes roads relentlessl...
原创 2022-01-06 17:06:22
24阅读
Jungle Roads Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 4439    Accepted Submission(s): 3251 Prob
原创 2022-12-02 00:35:37
49阅读
问题 E: Jungle Roads时间限制: 1 Sec  内存限制: 32 MB提交: 21  解决: 18 题目描述 
原创 精选 2022-10-21 17:56:20
162阅读
POJ-1251-Jungle Roads
原创 2022-11-09 18:30:44
38阅读
  • 1
  • 2
  • 3
  • 4
  • 5