資源簡介
c++ 最大最小蟻群算法的代碼,幫助你學會編寫簡單的代碼
代碼片段和文件信息
//?MMAS.cpp?:?定義控制臺應用程序的入口點。
//
#include?“stdafx.h“
#include?“Tsp.h“
int?main()
{
//初始化隨機種子
time_t?tm;
time(&tm);
unsigned?int?nSeed=(unsigned?int)tm;
srand(nSeed);
//開始搜索
CTsp?tsp;
tsp.InitData();
tsp.Search();
//輸出結果
printf(“\nThe?best?tour?is?:
- 上一篇:funcode桌球代碼完整版 基于C語言
- 下一篇:funcode拼圖
評論
共有 條評論