码迷,mamicode.com
首页 >  
搜索关键字:aizu 2224    ( 97个结果
Aizu-2224Save your cats并查集+最小生成树
Save your cats 题意:存在n个点,有m条边( input中读入的是 边的端点,要先转化为边的长度 ),做一个最小生成树,使得要去除的边的长度总和最小; 思路:利用并查集和求最小生成树的方法,注意这里的排序要从大到小排,这样最后建树的消耗最大,反过来去除的最小; 当然题意不是这么直白,感 ...
分类:其他好文   时间:2018-02-14 17:06:27    阅读次数:157
Aizu-Insertion Sort
原题链接:https://vjudge.net/problem/Aizu-ALDS1_1_A 题目描述 Write a program of the Insertion Sort algorithm which sorts a sequence A in ascending order. The a ...
分类:其他好文   时间:2018-01-28 22:30:36    阅读次数:210
搜索的应用-分配货物
题目链接: http://judge.u aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_4_D You are given $n$ packages of $w_i$ kg from a belt conveyor in order ($i=0,1, ...
分类:其他好文   时间:2017-12-13 20:08:56    阅读次数:284
AOJ 0118: Property Distribution (简单DFS)
题目链接:http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0118 题意:给定一个矩阵,同类字符相连的为一个块,问总共有几个块。 输入:h,w(行和列)0 <= h <= 100,0 <= w <= 100 矩阵 输入包含多组用例,以 ...
分类:其他好文   时间:2017-11-09 15:04:02    阅读次数:152
AOJ GRL_1_A: Single Source Shortest Path (Dijktra算法求单源最短路径,邻接表)
题目链接:http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=GRL_1_A Single Source Shortest Path Input An edge-weighted graph G (V, E) and the source ...
分类:编程语言   时间:2017-10-25 00:53:31    阅读次数:264
AOJ GRL_1_B: Shortest Path - Single Source Shortest Path (Negative Edges) (Bellman-Frod算法求负圈和单源最短路径)
题目链接: http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=GRL_1_B Single Source Shortest Path (Negative Edges) Input An edge-weighted graph G (V, ...
分类:编程语言   时间:2017-10-25 00:51:33    阅读次数:328
AOJ GRL_1_C: All Pairs Shortest Path (Floyd-Warshall算法求任意两点间的最短路径)(Bellman-Ford算法判断负圈)
题目链接:http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=GRL_1_C All Pairs Shortest Path Input An edge-weighted graph G (V, E). |V| is the number ...
分类:编程语言   时间:2017-10-25 00:38:34    阅读次数:369
Aizu-2200 Mr. Rito Post Office
题目大意: 在一些城市中有水路和陆路连接,每一条路都有长度。但是水路必须乘船,且坐船到达某个位置后船必须留在那里,下次坐必须回到该地。现在有m城市要到达,且必须按照指定的顺序,问最小代价。 Tag: 最短路+dp 做法: 预处理出任意两点间只走水路或陆路的最小代价,然后考虑dp。 记状态dp[i][ ...
分类:其他好文   时间:2017-10-02 16:41:25    阅读次数:196
Aizu - ALDS1_7_C Tree Walk
Binary trees are defined recursively. A binary tree T is a structure defined on a finite set of nodes that either contains no nodes, or is composed of ...
分类:其他好文   时间:2017-09-16 17:21:08    阅读次数:225
Aizu - ALDS1_7_B Binary Trees(二叉树的表达)
A rooted binary tree is a tree with a root node in which every node has at most two children. Your task is to write a program which reads a rooted bin ...
分类:其他好文   时间:2017-09-14 21:51:07    阅读次数:243
97条   上一页 1 2 3 4 5 6 ... 10 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!