Replies: 12 comments 5 replies
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
-
最小环用Dijkstra求的时候也可以枚举从1到n枚举s,用dij求解s的单元最短路径,把与s相连的点更新之后,再把d[s]设成inf,这样当s再一次被取出的时候,d[s]就是经过s的最小环长度,这样做是O(n(n+m)logn)的 |
Beta Was this translation helpful? Give feedback.
-
可以用dfs跑最小环吗? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
如果是求一个无向有环图里面所有的小环呢? 里面出现点要是顺时针或者逆时针,出现顺序可以不一定,但是不能乱序 |
Beta Was this translation helpful? Give feedback.
-
GDOI 的题哪里可以交啊 |
Beta Was this translation helpful? Give feedback.
-
如果图上的点有点权, 那怎么求最短路呀. |
Beta Was this translation helpful? Give feedback.
-
其实还有一种复杂度比较优秀的方法,不难发现最小环一定是一个简单环, |
Beta Was this translation helpful? Give feedback.
-
注意看例题,它提供了包含每个点最小环大小的两种求法:Floyd + 线段树分治;Dijkstra + 最短路树。即提供 Dijkstra 的 |
Beta Was this translation helpful? Give feedback.
-
可交的例题(弱化版):https://codeforces.com/gym/100917/problem/F |
Beta Was this translation helpful? Give feedback.
-
https://oi-wiki.org/graph/min-circle/
Beta Was this translation helpful? Give feedback.
All reactions