- 博客(11)
- 资源 (4)
- 收藏
- 关注
原创 hdu 2544 最短路 Bellman_Ford 解题报告
代码:#include #include #include #include #include #include using namespace std;#define MAXN 200010#define INF 0x3f3f3f3fstruct edge{ int from, to, cost;};edge es[MAXN];int n, m, d[MAX
2016-05-24 19:13:00 289
原创 hhu 5177 旅游路线 floyd 解题报告
描述 中国的城市有很多,我们选取其中N个城市,城市之间有一些双向的路来连接,现在想找一条旅游路线,路线从X点出发并且最后回到X点,而且不能重复经过同一个城市,且至少走了2个城市以上。现在小A需要你帮他找一条这样的路线,并且花费越少越好。输入第一行是2个整数N和M(N 接下来的M行里,每行包括3个整数a,b,c.代表a和b之间有一条通路,并且
2016-05-24 18:42:44 10699
原创 hdu 3631 Shortest Path floyd 解题报告
Problem DescriptionWhen YY was a boy and LMY was a girl, they trained for NOI (National Olympiad in Informatics) in GD team. One day, GD team’s coach, Prof. GUO asked them to solve the following s
2016-05-23 21:32:48 359
原创 poj 2204 hdu 1217 Arbitrage spfa判环 解题报告
Problem DescriptionArbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more than one unit of the same currency. For example, suppose that 1 US
2016-05-23 20:08:37 359
原创 poj 3259 Wormholes spfa判断负环 解题报告
DescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its destination a
2016-05-23 19:09:24 680
原创 HHU 3919 Travel spfa与dijkstra 解题报告
描述There are N cities in this country, and some of them are connected by roads. Given two cities, can you find the shortest distance between them?输入The first line contains the number of t
2016-05-23 11:06:55 297
原创 hdu 2544 最短路 spfa 解题报告
Problem Description在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线,你可以帮助他们吗? Input输入包括多组数据。每组数据第一行是两个整数N、M(N输入保证至少存在1条商店到赛场的路线。
2016-05-23 10:40:38 432
原创 poj 2367 Genealogical tree 拓扑排序 解题报告
DescriptionThe system of Martians' blood relations is confusing enough. Actually, Martians bud when they want and where they want. They gather together in different groups, so that a Martian can h
2016-05-11 15:16:58 534
原创 poj 1984 Navigation Nightmare 并查集 解题报告
DescriptionFarmer John's pastoral neighborhood has N farms (2 <= N <= 40,000), usually numbered/labeled 1..N. A series of M (1 <= M < 40,000) vertical and horizontal roads each of varying lengths
2016-05-10 10:28:30 884
原创 acm 头文件及宏定义
#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define lson 2*i #define rso
2016-05-05 19:21:39 2087
原创 整数大数模拟 高精度加法 高精度减法 高精度乘法 高精度除法 c/c++ java
整数大数模拟 高精度加法 高精度减法 高精度乘法 高精度除法 c/c++ java大数加法 大数减法 大数除法 大数乘法
2016-05-04 15:09:48 2421
graphviz-2.38.msi(windows下python图形工具)
2019-03-01
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人