2019年1月1日

HDU 2544 最短路(dijkstra)

摘要: Problem Description 在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线,你可以帮助他们吗? Input 输入包括多组数据。每组数据第一行是两个 阅读全文

posted @ 2019-01-01 11:01 甜甜圈不懂巧克力的苦 阅读(106) 评论(0) 推荐(0) 编辑

HDU 3790 最短路径问题(Dijkstra 迪杰斯特法最短路径算法)

摘要: Problem Description 给你n个点,m条无向边,每条边都有长度d和花费p,给你起点s终点t,要求输出起点到终点的最短距离及其花费,如果最短距离有多条路线,则输出花费最少的。 Input 输入n,m,点的编号是1~n,然后是m行,每行4个数 a,b,d,p,表示a和b之间有一条边,且其 阅读全文

posted @ 2019-01-01 09:45 甜甜圈不懂巧克力的苦 阅读(215) 评论(0) 推荐(0) 编辑

2018年12月31日

HDU 1217 Arbitrage(最短路径,Floyd算法,map函数)

摘要: Problem Description Arbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more than one unit of th 阅读全文

posted @ 2018-12-31 15:16 甜甜圈不懂巧克力的苦 阅读(154) 评论(0) 推荐(0) 编辑

HDU 1045 Fire Net(dfs)

摘要: Problem Description Suppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each repres 阅读全文

posted @ 2018-12-31 09:09 甜甜圈不懂巧克力的苦 阅读(107) 评论(0) 推荐(0) 编辑

2018年12月30日

HDU 1050 Moving Tables(贪心)

摘要: Problem Description The famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. The floo 阅读全文

posted @ 2018-12-30 16:47 甜甜圈不懂巧克力的苦 阅读(162) 评论(0) 推荐(0) 编辑

HDU 1009 FatMouse' Trade(贪心)

摘要: Problem Description FatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean 阅读全文

posted @ 2018-12-30 16:13 甜甜圈不懂巧克力的苦 阅读(126) 评论(0) 推荐(0) 编辑

2018年12月29日

HDU 1097 A hard puzzle(快速幂)

摘要: Problem Description lcy gives a hard puzzle to feng5166,lwg,JGShining and Ignatius: gave a and b,how to know the a^b.everybody objects to this BT prob 阅读全文

posted @ 2018-12-29 20:49 甜甜圈不懂巧克力的苦 阅读(111) 评论(0) 推荐(0) 编辑

HDU 1016 Prime Ring Problem(dfs)

摘要: Problem Description A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of nu 阅读全文

posted @ 2018-12-29 19:29 甜甜圈不懂巧克力的苦 阅读(101) 评论(0) 推荐(0) 编辑

HDU 1010 Tempter of the Bone(dfs)

摘要: Problem Description The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, an 阅读全文

posted @ 2018-12-29 18:51 甜甜圈不懂巧克力的苦 阅读(91) 评论(0) 推荐(0) 编辑

HDU 1003 Max Sum (dp)

摘要: Problem Description Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7 阅读全文

posted @ 2018-12-29 18:20 甜甜圈不懂巧克力的苦 阅读(110) 评论(0) 推荐(0) 编辑

导航