![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
图的构造
文章平均质量分 83
Neiloz
...
展开
-
图的存储(前向星)
推荐:(个人理解,若有错误,欢迎指正) 先百度百科,看懂后再看这个版本的。const int maxn=1e5+1; /* 前向星的优势: 通常用在点的数目太多,或两点之间有多条弧的时候。 一般在别的数据结构不能使用的时候才考虑用前向星。 除了不能直接用起点终点定位以外,前向星几乎是完美的 */ //前向星的构建 //模拟逆序建立链表的过程原创 2017-09-10 20:45:31 · 371 阅读 · 1 评论 -
Currency Exchange POJ - 1860(前向星存图+spfa+判断负环)
Several currency exchange points are working in our city. Let us suppose that each point specializes in two particular currencies and performs exchange operations only with these currencies. There can原创 2017-11-02 22:16:28 · 358 阅读 · 0 评论