摘要: 题目链接:http://poj.org/problem?id=1026 简单的置换题目,求出置换群后直接取余即可。 1 //STATUS:C++_AC_32MS_308KB 2 #include<stdio.h> 3 #include<stdlib.h> 4 #include<string.h> 5 #include<math.h> 6 #include<iostream> 7 #include<string> 8 #include<algorithm> 9 #include<vector>10 # 阅读全文
posted @ 2013-04-07 21:55 zhsl 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1964 空白区域之间有权值,求经过所有空白区域的哈密顿回路的最小权值。简单的插头DP,空白区域特殊处理即可。 1 //STATUS:C++_AC_203MS_664KB 2 #include<stdio.h> 3 #include<stdlib.h> 4 #include<string.h> 5 #include<math.h> 6 #include<iostream> 7 #include<string> 8 #include 阅读全文
posted @ 2013-04-07 13:02 zhsl 阅读(295) 评论(0) 推荐(0) 编辑