随笔分类 - 图论
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:题意 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
阅读全文
摘要: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
阅读全文
摘要:问题描述 给定一个有向图G,以及两个顶点s和t,判定s和t是否存在一条有向路径(s->t) 输入描述 输入文件,包含多组数据,每个测试数据的第一行为两个整数n和m,分别表示图G的顶点数和变数, 接下来有m行,每行为两个整数u,v,描述一条有向边<u,v>, 最后有一行为两个整数,s,t,其中s≠t,
阅读全文

浙公网安备 33010602011771号