摘要: 题目 Chosen Problem Solving and Program design as an optional course, you are required to solve all kinds of problems. Here, we get a new problem. There 阅读全文
posted @ 2019-08-09 12:20 Cl0ud_z 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 题目 A rooted tree is a well-known data structure in computer science and engineering. An example is shown below: In the figure, each node is labeled wi 阅读全文
posted @ 2019-08-02 10:41 Cl0ud_z 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 题目 Write a program that takes as input a rooted tree and a list of pairs of vertices. For each pair (u,v) the program determines the closest common an 阅读全文
posted @ 2019-08-02 10:02 Cl0ud_z 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 题目 Good morning, agent W-12. Your mission, should you choose to accept it, is as follows. We are infiltrating the ever so insidious Association of Cha 阅读全文
posted @ 2019-08-02 09:16 Cl0ud_z 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 题目 给你n个点,m条无向边,每条边都有长度d和花费p,给你起点s终点t,要求输出起点到终点的最短距离及其花费,如果最短距离有多条路线,则输出花费最少的。 Input 输入n,m,点的编号是1~n,然后是m行,每行4个数 a,b,d,p,表示a和b之间有一条边,且其长度为d,花费为p。最后一行是两个 阅读全文
posted @ 2019-08-02 09:15 Cl0ud_z 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 题目 One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be held at farm #X (1 ≤ X ≤ N). A to 阅读全文
posted @ 2019-08-01 11:51 Cl0ud_z 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 题目 In Land waterless, water is a very limited resource. People always fight for the biggest source of water. Given a sequence of water sources with a1 阅读全文
posted @ 2019-08-01 11:35 Cl0ud_z 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 题目 For the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game of Ul 阅读全文
posted @ 2019-07-31 23:51 Cl0ud_z 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 题目 经过锦囊相助,海东集团终于度过了危机,从此,HDU的发展就一直顺风顺水,到了2050年,集团已经相当规模了,据说进入了钱江肉丝经济开发区500强。这时候,XHD夫妇也退居了二线,并在风景秀美的诸暨市浬浦镇陶姚村买了个房子,开始安度晚年了。 这样住了一段时间,徐总对当地的交通还是不太了解。有时很 阅读全文
posted @ 2019-07-31 12:53 Cl0ud_z 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 题目 在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线,你可以帮助他们吗? Input 输入包括多组数据。每组数据第一行是两个整数N、M(N<=100,M<=1 阅读全文
posted @ 2019-07-30 23:34 Cl0ud_z 阅读(228) 评论(0) 推荐(0) 编辑