procedure plusCourtsCheminsPD3( int G[*,*], int n, res int D[*,*] ) { D = G; for [k = 1 to n] { for [i = 1 to n, j = 1 to n] { D[i,j] = min( D[i,j], plus( D[i,k], D[k,j] ) ); } } }