瀏覽代碼

had an array with 1 element times 5 instead of an array with 5 of the same element

tarfeef101 6 年之前
父節點
當前提交
81b5902427
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      a3/router.py

+ 1 - 1
a3/router.py

@@ -121,7 +121,7 @@ class graph:
         this.alist[dest - 1][src] = weight
             
     def rebuild(this):
-        this.sssp = [inf * 5]
+        this.sssp = [inf] * 5
         this.sssp[rid - 1] = 0
         
         curnode = rid - 1