close

題目連結:   202101: Problem 8. 阿 北 !出事了阿 北 (itsa.org.tw)

題目大意:  所有A到B最短路徑。

思路:  看到最短路徑,BFS直接做就可。標記狀態是否窄路。然後用一個陣列存最短路值,避免繞圈圈

代碼:  

ITSA/Problem 8. 阿 北 !出事了阿 北.cpp at master · louisfghbvc/ITSA (github.com)

arrow
arrow

    尾玉 發表在 痞客邦 留言(0) 人氣()