欢迎访问我的个人网站==》 jiashubing.cn
摘要: Unidirectional TSPProblem DescriptionProblems that require minimum paths through some domain appear in many different areas of computer science. For example, one of the constraints in VLSI routing problems is minimizing wire length. The Traveling Salesperson Problem (TSP) -- finding whether all the 阅读全文
posted @ 2013-09-06 23:46 贾树丙 阅读(472) 评论(0) 推荐(0) 编辑
摘要: 有向无环图上的动态规划是学习动态规划的基础,很多问题都可以转化为DAG上的最长路、最短路或路径计数问题。 嵌套矩阵 有n个矩阵,每个矩阵可以用两个整数a,b描述,表示它的长和宽。矩阵X(a,b)可以嵌套在矩阵Y(c,d)中当且仅当a<c,b<d,或者b<c,a<d(相当于把矩阵X旋转90。)例如(1 阅读全文
posted @ 2013-09-06 19:14 贾树丙 阅读(1479) 评论(1) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4249题目大意:给一个a+b=c的表达式,但是a、b、c中部分位的数字丢失,并用?代替,问有多少种方案使得这个表达式成立。Sample Input7+1?=1??1+?1=22Sample OutputCase 1: 3Case 2: 1Hint There are three solutions for the first case: 7+10=17, 7+11=18, 7+12=19 There is only one solution for the second case: 11+11=22 阅读全文
posted @ 2013-09-06 18:07 贾树丙 阅读(338) 评论(0) 推荐(0) 编辑