TSP问题_遗传算法(STL大量使用)
摘要:
#include#include#include//random_shuffle();sort();lower_bound();#include#includeusing namespace std;typedef vector VI;typedef vector VVI;#define PB push_back //在vector尾部加入一个数据#define MP make_pair //1.将2个数据组合成一个数据//2.当一个函数需要返回2个数据的时候,可以选择pair//pair的实现是一个结构体,主要的两个成员变量是first、second //因为是使用struct不是class 阅读全文
posted @ 2012-11-02 10:48 IThinktan 阅读(753) 评论(0) 推荐(0) 编辑