close

第一題SSSP用Dijkstra with heap完成的

我想到時候可能會需要看一看Johnson's algorithm

這題SPFA效能不足以通過需求

因為他非接近樹狀圖的話可能就沒有很快了

這邊是4 adjacent directions都可以走

另外沒有寫很快 可能還要再加強

前後加上除蟲竟然花約一小時Orz

 

http://nopaste.csie.org/2b737

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 robertanders 的頭像
    robertanders

    Robert Anderson's Blog

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