![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
图论
文章平均质量分 86
zy_sarah
这个作者很懒,什么都没留下…
展开
-
Codeforces Beta Round #27 (Codeforces format, Div. 2) D Ring Road 2(二分图染色版)
D. Ring Road 2 time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output It is well known that Berland has n cities, which form原创 2012-07-14 20:41:51 · 2057 阅读 · 0 评论 -
关于dijkstra
//v表示起始点,n表示总点数,pre表示上一个点,dis[i]表示当前起始点到i的最短路径,c为所保存的邻接矩阵 void dijkstra(int n,int v,int pre[],int dis[],int c[][]) { bool vis[maxn];//是否用过 for(int i=1;i<=n;i++)//初始化,从起始点开始有路径相连的更新,所有点都未走过,距离更新 {转载 2012-07-12 20:46:18 · 342 阅读 · 0 评论