remove the second matrix
Floyd algorithm