美素数 Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 4482 Accepted Submission(s): 1524 Problem Description 小明对数的研究比較热爱,一谈到数.脑子里就涌现出好多数的问题,今天.小明想考考你对素数的认识. 问题是这种:一个十进制数.假设是素数,并且它的各位数字和也是素数,则称之…
Billboard Time Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 14144 Accepted Submission(s): 6058 Problem Description At the entrance to the university, there is a huge rectangular billboard of…
Milk Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 15697 Accepted Submission(s): 3947 Problem Description Ignatius drinks milk everyday, now he is in the supermarket and he wants to choose…
欢迎"热爱编程"的高考少年--报考杭州电子科技大学计算机学院 Just a Hook Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 20889 Accepted Submission(s): 10445 Problem Description In the game of DotA, Pudge's meat hook…
美素数 Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 853 Accepted Submission(s): 329 Problem Description 小明对数的研究比较热爱,一谈到数,脑子里就涌现出好多数的问题,今天,小明想考考你对素数的认识. 问题是这样的:一个十进制数,如果是素数,而且它的各位数字和也是素数,则称之为…
美素数 Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 4291 Accepted Submission(s): 1476 Problem Description 小明对数的研究比较热爱,一谈到数,脑子里就涌现出好多数的问题,今天,小明想考考你对素数的认识. 问题是这样的:一个十进制数,如果是素数,而且它的各位数字和也是素数,则称之…
另类打表:将从1到n的满足美素数条件的数目赋值给prime[n],这样最后仅仅须要用prime[L]减去prime[R-1]就可以: 美素数 Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 2332 Accepted Submission(s): 811 Problem Description 小明对数的研究比較热爱,一谈到数,脑…
数塔 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 36261 Accepted Submission(s): 21659 Problem Description 在讲述DP算法的时候,一个经典的例子就是数塔问题,它是这样描述的: 有如下所示的数塔,要求从顶层走到底层,若每一步只能走到相邻的结点,则经过的结点的数字之和最大是多少?…
http://acm.hdu.edu.cn/showproblem.php?pid=1242 问题:牢房里有墙(#),警卫(x)和道路( . ),天使被关在牢房里位置为a,你的位置在r处,杀死一个警卫要一秒钟,每走一步要一秒钟,求最短时间救出天使,不能救出则输出:Poor ANGEL has to stay in the prison all his life. 求最短路径,果断广搜BFS 限制及剪枝: 1.墙不能走,不能离开牢房范围 2.杀死一个警卫要多花一秒钟 3.当前步骤大于等于最短时间…
Design T-Shirt Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6527 Accepted Submission(s): 3061 Problem Description Soon after he decided to design a T-shirt for our Algorithm Board on Free…
Catch That Cow Time Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 8999 Accepted Submission(s): 2837 Problem Description Farmer John has been informed of the location of a fugitive cow and wants…
验证角谷猜想 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6653 Accepted Submission(s): 3417 Problem Description 数论中有很多猜想尚未解决,当中有一个被称为"角谷猜想"的问题,该问题在五.六十年代的美国多个著名高校中曾风行一时,这个问题是这样描写叙述的:不论什么一个…