摘要:
题目背景为TSP。View Code 1 #include<cstdio> 2 #include<cstdlib> 3 #include<cstring> 4 #include<algorithm> 5 #include<cmath> 6 #include<ctime> 7 8 using namespace std; 9 10 const int maxn=100; 11 const double max_t=10000.0; 12 const double ratio=0.98; 13 const double eps 阅读全文
摘要:
题目:http://tyvj.cn/Problem_Show.asp?id=1092题解: 不解释………………自己去看代码吧……………………View Code 1 #include<cstdio> 2 #include<cstdlib> 3 #include<cstring> 4 5 using namespace std; 6 7 int num[10][20],num2[10][20],t; 8 9 char s[40]; 10 11 bool dfs(int now) 12 { 13 if (now==5) 14 { 15 f... 阅读全文