摘要:
A Different TaskThe (Three peg) Tower of Hanoi problem is a popular one in computer science. Briefly the problem is to transfer all the disks from peg-Ato peg-Cusing peg-Bas intermediate one in such a way that at no stage a larger disk is above a smaller disk. Normally, we want the minimum number of 阅读全文
摘要:
斯特林数S(p,k)的一个组合学解释是:将p个物体划分成k个非空的不可辨别的(可以理解为盒子没有编号)集合的方法数。S(p,k)的递推公式是: S(p,k) = k*S(p-1,k) + S(p-1,k-1) ,1<= k <=p-1边界条件:S(p,p) = 1 ,p>=0S(p,0) = 0 ,p>=1一卡通大冒险Time Limit : 2000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 5Accepted Submission(s) : 3Pr 阅读全文
摘要:
最大报销额Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 12524Accepted Submission(s): 3452Problem Description现有一笔经费可以报销一定额度的发票。允许报销的发票类型包括买图书(A类)、文具(B类)、差旅(C类),要求每张发票的总额不得超过1000元,每张发票上,单项物品的价值不得超过600元。现请你编写程序,在给出的一堆发票中找出可以报销的、不超过给定额度的最大报销额。Input测试输入包含若 阅读全文
摘要:
类似01背包的DPRobberiesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7013 Accepted Submission(s): 2630Problem DescriptionThe aspiring Roy the Ro... 阅读全文