5 7 0 1 1 2 0 2 1 2 3 1 3 1 3 2 2 2 4 3 4 3 2You can download the example by clicking here.
Note that a link (u,v) between nodes u and v can also be written (v,u).
Your program should, for each node x, compute the number of links incident to it and the sum of the costs of those links. For example, in the example above, node 0 has two links incident to it (one connected to node 1 and the other connected to node 2), and the sum of the costs of those links is 3. The following is the output for the above example:
0 2 3 1 3 5 2 4 10 3 3 5 4 2 5
Your program should run on spectra.
Submit by email to me (galens@hawaii.edu) on March 23, 2007 a gzipped tar'd directory that includes
To tar a directory "DIR" and to name the tar'd file "x.tar":
tar cvf x.tar DIR
To untar:
tar xvf x.tarand the director DIR is restored.