狀壓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
相關文章
相關標籤/搜索