Modifying the distance information to be able to printf when needed.
Extended the test program to print out node ids and distances between random pairs.