Skip to content

Commit 5663256

Browse files
author
tt'ct'c'y田宸宇
committed
finished
1 parent 1915bf1 commit 5663256

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

week7/week7_task2.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ def Unweighted(net):
3232
return -2
3333
#第一步能跳到的点
3434
while queue:
35-
V = queue.pop()
36-
print(net[V],path[V])
35+
V = queue.pop(0)
3736
if if_land(net[V]):
3837
return V
3938
for i in range(len(net)):
@@ -69,10 +68,10 @@ def Unweighted(net):
6968
print(node[0],node[1])
7069

7170
'''
72-
0 sample1 多条最短路,同一点有多路,最近点无路,多连通 答案错误 30 ms 3184KB
73-
1 sample 2 聚集型,均离岸远 答案正确 18 ms 3296KB
74-
2 分散型,均跳不到,有在角上 答案正确 17 ms 3256KB
75-
3 有一只在岸上,有一只在岛上,不能算在内 答案正确 17 ms 3308KB
76-
4 最大N,sample1的复杂版,可选路径8条,后面要更新前面的最短路 答案错误 20 ms 3184KB
77-
5 最小N,一步跳到岸 答案正确 17 ms 3184KB
71+
0 sample1 多条最短路,同一点有多路,最近点无路,多连通 答案正确 33 ms 3184KB
72+
1 sample 2 聚集型,均离岸远 答案正确 34 ms 3184KB
73+
2 分散型,均跳不到,有在角上 答案正确 27 ms 3184KB
74+
3 有一只在岸上,有一只在岛上,不能算在内 答案正确 20 ms 3184KB
75+
4 最大N,sample1的复杂版,可选路径8条,后面要更新前面的最短路 答案正确 31 ms 3240KB
76+
5 最小N,一步跳到岸 答案正确 18 ms 3184KB
7877
'''

0 commit comments

Comments
 (0)