
ACM
文章平均质量分 74
zbc6063054
这个作者很懒,什么都没留下…
展开
-
1028 按长度排序
Description:有一些整数,它的结构是:第一行为一个整数N,表示后面有N个整数需要排序输出,先按长度排,如长度一样则按大小排,若遇到N等于零,则运行结束。Sample Input:31231233332100000000000000010Sample Output:12123333311000000000000000sourc原创 2012-08-28 23:27:57 · 987 阅读 · 0 评论 -
1250 Tanning Salon
DescriptionTan Your Hide, Inc., owns several coin-operated tanning salons. Research has shown that if a customer arrives and there are no beds available, the customer will turn around and leave, t原创 2012-08-31 22:47:58 · 638 阅读 · 0 评论 -
1477 Box of Bricks
DescriptionLittle Bob likes playing with his box of bricks. He puts the bricks one upon another and builds stacks of different height. "Look, I've built a wall!", he tells his older sister Alice.原创 2012-09-01 23:43:58 · 1061 阅读 · 0 评论 -
1207 The 3n + 1 problem
DescriptionProblems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a property of an a原创 2012-08-31 18:21:45 · 834 阅读 · 0 评论 -
1248 Safecracker
Description"The item is locked in a Klein safe behind a painting in the second-floor library. Klein safes are extremely rare; most of them, along with Klein and his factory, were destroyed in Worl原创 2012-08-31 20:36:45 · 442 阅读 · 0 评论 -
1326 Mileage Bank
DescriptionMileage program of ACM (Airline of Charming Merlion) is really nice for the travelers flying frequently. Once you complete a flight with ACM, you can earn ACMPerk miles in your ACM Mile原创 2012-09-01 16:56:40 · 633 阅读 · 0 评论 -
1316 Self Numbers
DescriptionIn 1949 the Indian mathematician D.R. Kaprekar discovered a class of numbers called self-numbers. For any positive integer n, define d(n) to be n plus the sum of the digits of n. (The d原创 2012-09-01 16:23:56 · 516 阅读 · 0 评论 -
1338 Ugly Numbers
DescriptionUgly numbers are numbers whose only prime factors are 2, 3 or 5. The sequence 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, ... shows the first 10 ugly numbers. By convention, 1 is included. Gi原创 2012-09-01 20:17:48 · 334 阅读 · 0 评论 -
1493 Machined Surfaces
DescriptionAn imaging device furnishes digital images of two machined surfaces that eventually will be assembled in contact with each other. The roughness of this final contact is to be estimated.原创 2012-09-02 15:28:26 · 452 阅读 · 0 评论 -
2406 Power Strings
DescriptionGiven two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concatenation as multiplication, exponenti原创 2012-09-02 21:47:46 · 361 阅读 · 0 评论 -
1484 Blowing Fuses
DescriptionMaybe you are familiar with the following situation. You have plugged in a lot of electrical devices, such as toasters, refrigerators, microwave ovens, computers, stereos, etc, and have原创 2012-09-02 14:41:51 · 453 阅读 · 0 评论 -
1504 Adding Reversed Numbers
DescriptionThe Antique Comedians of Malidinesia prefer comedies to tragedies. Unfortunately, most of the ancient plays are tragedies. Therefore the dramatic advisor of ACM has decided to transfigu原创 2012-09-03 17:14:15 · 1965 阅读 · 0 评论 -
1027 大数的乘法
Description:给出一些整数对,一个是可能接近100位的大数,另一个只有1位数,求这些整数对的乘积。Sample Input:1 1123 012345678910 8123456789101234567891012345678910 7Sample Output:10987654312808641975237086419752370864197523原创 2012-08-28 16:11:11 · 1122 阅读 · 0 评论 -
1450 Gridland
DescriptionBackground For years, computer scientists have been trying to find efficient solutions to different computing problems. For some of them efficient algorithms are already available,原创 2012-09-01 23:29:00 · 343 阅读 · 0 评论 -
1350 Cabric Number Problem
DescriptionIf we input a number formed by 4 digits and these digits are not all of one same value, then it obeys the following law. Let us operate the number in the following way: (1) Arrange th原创 2012-09-01 20:59:21 · 460 阅读 · 0 评论 -
1298 The Hardest Problem Ever
DescriptionJulius Caesar lived in a time of danger and intrigue. The hardest situation Caesar ever faced was keeping himself alive. In order for him to survive, he decided to create one of the fir原创 2012-09-01 15:48:10 · 842 阅读 · 0 评论 -
1029 Fibonacci数
Description:有一些整数N(N≤46),输出以这些整数为序数的第n项fibonacci数。文件中的数据可能上万,但要求运行时间不超过1秒钟。Sample Input:5678940Sample Output:58132134102334155source:#include #include usi原创 2012-08-29 00:15:42 · 469 阅读 · 0 评论 -
1056 织花纹布
Description:输入中含有若干组数据,每组数据由四部分组成,第一个是花纹字符,后面三个是整数,分别表示宽度(<80的奇数),高度(≤40)和重复度(≤20)。请编程画出该花纹。Sample Input:W 9 17 1E 15 6 2Sample Output:WWWWWWWWW W W W W W WWWWWWWWW W W W W W W原创 2012-08-29 01:18:31 · 507 阅读 · 0 评论 -
1096 减肥
Description:SC的同学们参加ZJUT电台的节目,在拍摄前需要进行减肥试验,按照计划每天减一斤。现有N个同学在拍摄前Di天就进行减肥试验,求在拍摄时的体重,并按升序输出。Input:第一行为T,表明有T组测试数据。 每组测试数据第一行为N(1≤N≤50),表明有N个同学,接下来N行,每行有2个整数Di,Wi。Di表示第i个同学减肥的天数,Wi表示第i个同学原先的体重(Wi原创 2012-08-29 14:22:38 · 384 阅读 · 0 评论 -
1046 Color Me Less
DescriptionA color reduction is a mapping from a set of discrete colors to a smaller one. The solution to this problem requires that you perform just such a mapping in a standard twenty-four bit R原创 2012-08-30 11:04:43 · 1609 阅读 · 0 评论 -
1019 打怪的力量
Description:Tyr最喜欢吃罐装的菠菜,因为Tyr的力量来自于吃掉的菠菜。每次Tyr出去冒险的时候都会带上很多的菠菜罐头,当遇到危险的时候,他就会从背包里拿出菠菜罐头,以最快的速度吃掉它们,以最快的速度增加力量,从而克服困难。根据历史的统计数据,Tyr拿出一个菠菜罐头需要花费A s的时间,吃掉一个菠菜罐头的时间是B s。每当Tyr遇到一个怪物的时候,怪物会在C s之后的时间里吃掉Ty原创 2012-08-29 15:27:19 · 452 阅读 · 0 评论 -
1005 I Think I Need a Houseboat
DescriptionFred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investigating the land, he learned that the state of Louisiana is actually shrinkin原创 2012-08-29 22:05:41 · 243 阅读 · 0 评论 -
1003 Hangover
DescriptionHow far can you make a stack of cards overhang a table? If you have one card, you can create a maximum overhang of half a card length. (We're assuming that the cards must be perpendicul原创 2012-08-29 22:37:27 · 719 阅读 · 0 评论 -
1004 Financial Management
DescriptionLarry graduated this year and finally has a job. He's making a lot of money, but somehow never seems to have enough. Larry has decided that he needs to grab hold of his financial portfo原创 2012-08-29 22:55:54 · 294 阅读 · 0 评论 -
1007 DNA Sorting
DescriptionOne measure of ``unsortedness'' in a sequence is the number of pairs of entries that are out of order with respect to each other. For instance, in the letter sequence ``DAABEC'', this m原创 2012-08-30 00:32:15 · 303 阅读 · 0 评论 -
1040 凑表达式
Description:有一些整数组,每三个数成一组。如果三个数经过四则运算(+、-、×、÷)得出结果0,则输出“yes”,否则输出“no”。当三个数为全0时,表示输入结束。Sample Input:1 2 33 8 10100 210 7900 1 00 0 0Sample Output:yesnonoyessource:#include原创 2012-08-29 16:15:26 · 532 阅读 · 0 评论 -
1247 Magnificent Meatballs
DescriptionSam and Ella run a catering service. They like to put on a show when serving meatballs to guests seated at round tables. They march out of the kitchen with pots of meatballs and start s原创 2012-08-31 18:48:46 · 512 阅读 · 0 评论 -
1318 Word Amalgamation
DescriptionIn millions of newspapers across the United States there is a word game called Jumble. The object of this game is to solve a riddle, but in order to find the letters that appear in the原创 2012-09-01 15:25:18 · 1594 阅读 · 0 评论 -
1088 滑雪
DescriptionMichael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3 4 516 17 18 19 615 24 25 20 714 2原创 2012-11-10 15:12:54 · 472 阅读 · 0 评论