摘要:
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 阅读全文
摘要:
题目链接: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 阅读全文
摘要:
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3555题目大意:从0开始到给定的数字N所有的数字中遇到“49”的数字的个数。Sample Input3150500Sample Output0115HintFrom 1 to 500, the numbers that include the sub-sequence "49" are "49","149","249","349","449","490",&qu 阅读全文
摘要:
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3442题目大意:三国时期,刘备逃亡。给定一个最大为50*50的地图,刘备在地图中只能往4个方向走。 地图中,A代表瞭望塔,攻击范围是2,攻击伤害是1; B 代表堡垒,攻击范围是3,攻击伤害是2; C 代表火焰,对于走在该位置上的单位造成3点伤害; D 代表弓箭手,攻击范围是2,攻击伤害是4; E 代表士兵,攻击范围是1,攻击伤害是5; $ 代表刘备; !代表目的地; # 代表障碍物 . 代表地板刘备不能穿过A,B,D,E。但是可以走上C和地板。 有3条重要规则:1.刘备不能被相同的... 阅读全文