图
求知 求是
这个作者很懒,什么都没留下…
展开
-
列出连通集
给定一个有N个顶点和E条边的无向图,请用DFS和BFS分别列出其所有的连通集。假设顶点从0到N−1编号。进行搜索时,假设我们总是从编号最小的顶点出发,按编号递增的顺序访问邻接点。 输入格式: 输入第1行给出2个整数N(0 #include #include #include #define MAXVERTEXNUM 100//最大顶点数 typedef int vertex; typ原创 2018-01-17 21:21:02 · 493 阅读 · 0 评论 -
Saving James Bond - Easy Version
This time let us consider the situation in the movie “Live and Let Die” in which James Bond, the world’s most famous spy, was captured by a group of drug dealers. He was sent to a small piece of land原创 2018-01-19 11:36:30 · 173 阅读 · 0 评论