#include <iostream.h>
#include <stdio.h>
#include <iomanip.h>
#define noedge 10000 //定义noedge大小
int n, //顶点数
*x, //当前解
*bestx, //当前最优解
**a, //G的邻接矩阵
bestc; //当前最优值
void getdata()
{//从文件读取数据
int i;
FILE *fp;
if ((fp=fopen("travel.txt","r"))==NULL)
{cout<<"Connot open the file"<<endl;
return;
}
cout<<endl<<"图的邻接矩阵如下:"<<endl;
fscanf(fp,"%d",&n);
x=new int [n+1];
bestx=new int [n+1];
a=new int* [n+1];
bestc=noedge;
for (i=1;i<=n;i++)
a[i]=new int[n+1];
for (i=1;i<=n;i++){
for (int j=1;j<=n;j++){
fscanf(fp,