摘要: 题目 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) 编辑