上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 22 下一页
摘要: 1025 PAT Ranking (25分) Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test 阅读全文
posted @ 2020-03-27 00:22 Cruel_King 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 1020 Tree Traversals (25分) Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequen 阅读全文
posted @ 2020-03-23 22:20 Cruel_King 阅读(431) 评论(0) 推荐(0) 编辑
摘要: 原题链接 很久没做dp了,连一道裸地区间dp都没能第一时间想到,我可真是个臭弟弟...... 一开始是用的贪心吧,wa了一发。 本题思路:区间dp的一般思路,先枚举区间长度,然后枚举区间头,然后枚举区间断点,很容易就能想到状态转移方程。 自己关掉博客好好想想吧,区间dp应该是最简单的dp类型了。 # 阅读全文
posted @ 2020-03-23 17:56 Cruel_King 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 1018 Public Bike Management (30分) There is a public bike service in Hangzhou City which provides great convenience to the tourists from all over the w 阅读全文
posted @ 2020-03-22 15:22 Cruel_King 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 1016 Phone Bills (25分) A long-distance telephone company charges its customers by the following rules: Making a long-distance call costs a certain amo 阅读全文
posted @ 2020-03-20 20:51 Cruel_King 阅读(261) 评论(0) 推荐(0) 编辑
摘要: 1010 Radix (25分) Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is yes, if 6 is a decimal nu 阅读全文
posted @ 2020-03-16 11:04 Cruel_King 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 1009 Product of Polynomials (25分) This time, you are supposed to find A×B where A and B are two polynomials. Input Specification: Each input file cont 阅读全文
posted @ 2020-03-14 15:56 Cruel_King 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 1003 Emergency (25分) As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities 阅读全文
posted @ 2020-03-14 12:03 Cruel_King 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 题目描述 某城镇进行人口普查,得到了全体居民的生日。现请你写个程序,找出镇上最年长和最年轻的人。这里确保每个输入的日期都是合法的,但不一定是合理的——假设已知镇上没有超过200岁的老人,而今天是2014年9月6日,所以超过200岁的生日和未出生的生日都是不合理的,应该被过滤掉。 输入描述: 输入在第 阅读全文
posted @ 2020-03-08 16:58 Cruel_King 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 题目描述 给定一个正整数数列,和正整数p,设这个数列中的最大值是M,最小值是m,如果M <= m * p,则称这个数列是完美数列。现在给定参数p和一些正整数,请你从中选择尽可能多的数构成一个完美数列。 输入描述: 输入第一行给出两个正整数N和p,其中N(<= 105)是输入的正整数的个数,p(<= 阅读全文
posted @ 2020-03-08 16:22 Cruel_King 阅读(216) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 22 下一页