编写算法,由依次输入的顶点数目、弧数目、各顶点的信息和各条弧的信息,建立有向图的邻接链表。

[复制链接]
查看11 | 回复1 | 2011-11-14 19:48:27 | 显示全部楼层 |阅读模式
#include #include //stl直接引用#include //stl标准模板库直接应用现成的栈#include using namespace std;const int MaxVertices=10;const int MaxWeight=10000;class Vertex{public:Vertex(void);Vertex(int lab);int label;bool wasVisited;void setLv(int l, bool wasvisited);public:~Vertex(void)...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行