Skip to content

Latest commit

 

History

History

1131

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

1131 . Assignment 17 - Shortest Closed Walk

分別以 u, v, w 為起點各自做一次 single-source shortest path,
令 dis[a][b] 為 a 到 b 的最短距離,
答案為 min(dis[u][v] + dis[v][w] + dis[w][u], dis[u][w] + dis[w][v] + dis[v][u])