Explorar o código

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

tarfeef101 %!s(int64=6) %!d(string=hai) anos
pai
achega
81b5902427
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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