소스 검색

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