摘要: Problem Description 现有一笔经费可以报销一定额度的发票。允许报销的发票类型包括买图书(A类)、文具(B类)、差旅(C类),要求每张发票的总额不得超过1000元,每张发票上,单项物品的价值不得超过600元。现请你编写程序,在给出的一堆发票中找出可以报销的、不超过给定额度的最大报销额 阅读全文
posted @ 2019-05-12 20:35 彩虹色 阅读(205) 评论(0) 推荐(0) 编辑
摘要: Problem Description A histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles have equal widths but 阅读全文
posted @ 2019-05-12 19:21 彩虹色 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 题目描述 给定两个正整数n,m,计算组合数C(n,m)。组合数计算公式为:C(n,m)=n!/((n-m)!*m!) 已知n,m <= 50. 结果很大需要使用long long存储。 给定两个正整数n,m,计算组合数C(n,m)。组合数计算公式为:C(n,m)=n!/((n-m)!*m!) 已知n 阅读全文
posted @ 2019-05-09 15:22 彩虹色 阅读(495) 评论(0) 推荐(0) 编辑
摘要: Problem Description Many years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , s 阅读全文
posted @ 2019-05-06 16:37 彩虹色 阅读(102) 评论(0) 推荐(0) 编辑
摘要: Problem Description 不死族的巫妖王发工资拉,死亡骑士拿到一张N元的钞票(记住,只有一张钞票),为了防止自己在战斗中频繁的死掉,他决定给自己买一些道具,于是他来到了地精商店前.死亡骑士:"我要买道具!"地精商人:"我们这里有三种道具,血瓶150块一个,魔法药200块一个,无敌药水3 阅读全文
posted @ 2019-05-06 16:12 彩虹色 阅读(131) 评论(0) 推荐(0) 编辑
摘要: Problem Description 电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。某天,食堂中有n种菜出售,每种菜 阅读全文
posted @ 2019-05-06 15:31 彩虹色 阅读(146) 评论(0) 推荐(0) 编辑
摘要: Problem Description 呃......变形课上Harry碰到了一点小麻烦,因为他并不像Hermione那样能够记住所有的咒语而随意的将一个棒球变成刺猬什么的,但是他发现了变形咒语的一个统一规律:如果咒语是以a开头b结尾的一个单词,那么它的作用就恰好是使A物体变成B物体. Harry已 阅读全文
posted @ 2019-05-05 18:55 彩虹色 阅读(193) 评论(0) 推荐(0) 编辑
摘要: Problem Description The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large re 阅读全文
posted @ 2019-05-04 21:22 彩虹色 阅读(174) 评论(0) 推荐(0) 编辑
摘要: A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacen 阅读全文
posted @ 2019-05-04 20:45 彩虹色 阅读(89) 评论(0) 推荐(0) 编辑
摘要: Problem Description In a Lotto I have ever played, one has to select 6 numbers from the set {1,2,...,49}. A popular strategy to play Lotto - although 阅读全文
posted @ 2019-05-04 18:34 彩虹色 阅读(141) 评论(0) 推荐(0) 编辑