摘要: H - Perfect Pth Powers Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64u Submit Status Practice POJ 1730DescriptionWe say that x is a perfect square if, for some integer b, x = b2. Similarly, x is a perfect cube if, for some integer b, x = b3. More generally, x is a perfect pt 阅读全文
posted @ 2012-08-16 14:33 3111006139 阅读(121) 评论(0) 推荐(0) 编辑
摘要: Pseudoprime numbers Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Practice POJ 3641DescriptionFermat's theorem states that for any prime number p and for any integer a > 1, ap = a (mod p). That is, if we raise a to the pth power and divide by p, the re 阅读全文
posted @ 2012-08-16 14:06 3111006139 阅读(179) 评论(0) 推荐(0) 编辑
摘要: Prime GapTime Limit: 5000MSMemory Limit: 65536KTotal Submissions: 6841Accepted: 3946DescriptionThe sequence of n − 1 consecutive composite numbers (positive integers that are not prime and not equal to 1) lying between two successive prime numbers p and p + n is called a prime gap of length n. For e 阅读全文
posted @ 2012-08-16 11:58 3111006139 阅读(114) 评论(0) 推荐(0) 编辑
摘要: Sum of Consecutive Prime NumbersTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 13861Accepted: 7748DescriptionSome positive integers can be represented by a sum of one or more consecutive prime numbers. How many such representations does a given positive integer have? For example, the integ 阅读全文
posted @ 2012-08-16 00:31 3111006139 阅读(137) 评论(0) 推荐(0) 编辑
摘要: Prime LandTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 2074Accepted: 957DescriptionEverybody in the Prime Land is using a prime base number system. In this system, each positive integer x is represented as follows: Let {pi}i=0,1,2,... denote the increasing sequence of all prime numbers. 阅读全文
posted @ 2012-08-16 00:11 3111006139 阅读(178) 评论(0) 推荐(0) 编辑
摘要: Horizontally Visible SegmentsTime Limit: 5000MSMemory Limit: 65536KTotal Submissions: 2318Accepted: 885DescriptionThere is a number of disjoint vertical line segments in the plane. We say that two segments are horizontally visible if they can be connected by a horizontal line segment that does not h 阅读全文
posted @ 2012-08-15 21:40 3111006139 阅读(236) 评论(0) 推荐(0) 编辑
摘要: Just a HookTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 9268Accepted Submission(s): 4515Problem DescriptionIn the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecut 阅读全文
posted @ 2012-08-15 19:44 3111006139 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 统计难题Time Limit: 4000/2000 MS (Java/Others)Memory Limit: 131070/65535 K (Java/Others)Total Submission(s): 10517Accepted Submission(s): 4330Problem DescriptionIgnatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀).Input输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表的是老师交给Ignatius统 阅读全文
posted @ 2012-08-15 08:57 3111006139 阅读(130) 评论(0) 推荐(0) 编辑
摘要: http://acm.hust.edu.cn:8080/judge/contest/view.action?cid=11420#problem/FBillboardTime Limit: 20000/8000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4522Accepted Submission(s): 2099Problem DescriptionAt the entrance to the university, there is a huge rectangular bil 阅读全文
posted @ 2012-08-14 21:12 3111006139 阅读(344) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1754I Hate ItTime Limit: 9000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 17873Accepted Submission(s): 6890Problem Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当 阅读全文
posted @ 2012-08-14 20:57 3111006139 阅读(162) 评论(0) 推荐(0) 编辑