随笔分类 -  图论

摘要:One way that the police finds the head of a gang is to check people's phone calls. If there is a phone call between A and B , we say that A and B is r 阅读全文
posted @ 2020-03-11 22:52 阳离子 阅读(142) 评论(0) 推荐(0)
摘要:A traveler's map gives the distances between cities along the highways, together with the cost of each highway. Now you are supposed to write a progra 阅读全文
posted @ 2020-03-09 11:06 阳离子 阅读(194) 评论(0) 推荐(0)
摘要:A graph which is connected and acyclic can be considered a tree. The height of the tree depends on the selected root. Now you are supposed to find the 阅读全文
posted @ 2020-03-04 17:55 阳离子 阅读(119) 评论(0) 推荐(0)
摘要:题意 There is a public bike service in Hangzhou City which provides great convenience to the tourists from all over the world. One may rent a bike at an 阅读全文
posted @ 2020-02-29 22:49 阳离子 阅读(130) 评论(0) 推荐(0)
摘要:It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that c 阅读全文
posted @ 2020-02-22 22:39 阳离子 阅读(110) 评论(0) 推荐(0)
摘要:朴素版 阅读全文
posted @ 2019-11-18 16:43 阳离子 阅读(144) 评论(0) 推荐(0)
摘要:问题描述 给定一个有向图G,以及两个顶点s和t,判定s和t是否存在一条有向路径(s->t) 输入描述 输入文件,包含多组数据,每个测试数据的第一行为两个整数n和m,分别表示图G的顶点数和变数, 接下来有m行,每行为两个整数u,v,描述一条有向边<u,v>, 最后有一行为两个整数,s,t,其中s≠t, 阅读全文
posted @ 2018-12-03 10:51 阳离子 阅读(386) 评论(0) 推荐(0)