状压dp初步——最优配对问题,货郎担问题(TSP)

最优配对问题 :node 枚举集合s‘中任意两点i,j使得s’集合中的状态最优,并将s'中的最优状态转移给s集合。c++ #include<bits/stdc++.h> #include<iomanip> using namespace std; const int inf=1e9; struct node{ double x,y; }p[25]; double dp[1<<25]; do
相关文章
相关标签/搜索