/* 2005/04, Data structure and algorithm by kameda */ /* Graph G5 (8 vertices, 9 edges) */ /* Result of Longest Path : 2->3->7, cost=8 */ #define N 8 int arc[N][N] = { /* 0 1 2 3 4 5 6 7 */ {0,4,0,0,2,0,0,0}, /* 0 */ {0,0,0,0,0,0,1,0}, /* 1 */ {0,0,0,3,0,0,3,0}, /* 2 */ {0,0,0,0,0,0,0,5}, /* 3 */ {0,0,0,0,0,2,0,0}, /* 4 */ {0,0,0,0,0,0,2,0}, /* 5 */ {0,0,0,0,0,0,0,1}, /* 6 */ {0,0,0,0,0,0,0,0} /* 7 */ };