ajout de tous les cours et TP préparés cet été

This commit is contained in:
2026-01-17 23:10:49 +01:00
parent ed9415bc81
commit 301cf5a98f
125 changed files with 21614 additions and 542 deletions

View File

@@ -24,13 +24,13 @@ def dijkstra(g, s):
res[IND[s]] = 0
a_faire = [e for e in g[0]]
while a_faire != []:
ind_courrant = select_min(res, a_faire)
sommet_courrant = g[0][ind_courrant]
a_faire.remove(sommet_courrant)
cout_courrant = res[ind_courrant]
ind_courant = select_min(res, a_faire)
sommet_courant = g[0][ind_courant]
a_faire.remove(sommet_courant)
cout_courant = res[ind_courant]
for l in g[1]:
if l[0]==sommet_courrant:
cout_tmp=l[2]+cout_courrant
if l[0]==sommet_courant:
cout_tmp=l[2]+cout_courant
if res[IND[l[1]]]>=cout_tmp:
res[IND[l[1]]] = cout_tmp
return res