单源最短路径问题
第一组测试参数
const int n = 6; //图顶点个数加1
int c[n][n] = {
{0,0,0,0,0,0}, {0,0,2,3,5000,5000},
{0,5000,0,1,2,5000}, {0,5000,5000,0,9,2},
{0,5000,5000,5000,0,2}, {0,5000,5000,5000,5000,0}}; //
图的邻接矩阵
第二组测试参数
const int n = 5; //图顶点个数加1
int c[][n] = {
{0,0,0,0,0}, {0,0,2,3,5000}, {0,5000,0,1,2},
{0,5000,5000,0,9}, {0,5000,5000,5000,0}};
第三组测试参数
const int n = 12; //图顶点个数加1
int c[n][n] = {
{0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,2,3,4,inf,inf,inf,inf,inf,inf,inf},
{0,inf,0,3,inf,7,2,inf,inf,inf,inf,inf},
{0,inf,inf,0,inf,inf,9,2,inf,inf,inf,inf},
{0,inf,inf,inf,0,inf,inf,2,inf,inf,inf,inf},
{0,inf,inf,inf,inf,0,inf,inf,3