随笔分类 - 数学,二分,素数
摘要:献给杭电五十周年校庆的礼物Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 479 Accepted Submission(s): 301Problem Description或许你曾经牢骚满腹 或许你依然心怀忧伤 或许你近在咫尺 或许你我天各一方对于每一个学子 母校 永远航行在 生命的海洋今年是我们杭电建校五十周年,这是一个值得祝福的日子。我们该送给母校一个怎样的礼物呢?对于目前的大家来说,最好的礼物当然是省赛中的好成绩,我不能参赛,就送给学
阅读全文
摘要:Wolf and RabbitTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1289 Accepted Submission(s): 750Problem DescriptionThere is a hill with n holes around. The holes are signed from 0 to n-1.A rabbit must hide in one of the holes. A wolf searches the r
阅读全文
摘要:[1271] Nth Day is Which Dayhttp://ac.nbutoj.com/Problem/view.xhtml?id=1271时间限制: 1000 ms 内存限制: 65535 K问题描述The first day is 1 year 1 month 1 day, so the Nth day is which day?输入Input until EOF. Input a positive integer N means the Nth day(0#include#includeusing namespace std;int m1[12]={31,28,31,30,31,
阅读全文
摘要:Number SequenceTime Limit:1000MSMemory Limit:10000KTotal Submissions:29413Accepted:8198DescriptionA single positive integer i is given. Write a program to find the digit located in the position i in the sequence of number groups S1S2...Sk. Each group Sk consists of a sequence of positive integer num
阅读全文
摘要:前m大的数http://acm.hdu.edu.cn/showproblem.php?pid=1280Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6323Accepted Submission(s): 2235Problem Description还记得Gardon给小希布置的那个作业么?(上次比赛的1005)其实小希已经找回了原来的那张数表,现在她想确认一下她的答案是否正确,但是整个的答案是很庞大的表,小希只想让你把答案中最大的M个数告诉
阅读全文
摘要:find a way to escapehttp://acm.hdu.edu.cn/showproblem.php?pid=1593Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 899 Accepted Submission(s): 322 Problem Description一日,话说0068与***泛舟湖上。忽见岸边出现他的一大敌人elnil。0068当然不想落入elnil的魔爪,于是他就得想办法逃脱。这个湖是一个很规则的圆形,半径
阅读全文
摘要:The number of divisors(约数) about Humble Numbershttp://acm.hdu.edu.cn/showproblem.php?pid=1492Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1780 Accepted Submission(s): 871 Problem DescriptionA number whose only prime factors are 2,3,5 or 7 is c
阅读全文
摘要:Fibonaccihttp://acm.hdu.edu.cn/showproblem.php?pid=1568Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2292Accepted Submission(s): 1075Problem Description2007年到来了。经过2006年一年的修炼,数学神童zouyu终于把0到100000000的Fibonacci数列(f[0]=0,f[1]=1;f[i] = f[i-1]+f[i-2](i
阅读全文
摘要:抱歉http://acm.hdu.edu.cn/showproblem.php?pid=1418Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 2335 Accepted Submission(s): 967 Problem Description非常抱歉,本来兴冲冲地搞一场练习赛,由于我准备不足,出现很多数据的错误,现在这里换一个简单的题目:前几天在网上查找ACM资料的时候,看到一个中学的奥数题目,就是不相交的曲线段分割平面的问题,我已经
阅读全文
摘要:Leftmost Digithttp://acm.hdu.edu.cn/game/entry/problem/show.php?chapterid=2§ionid=1&problemid=11Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1524 Accepted Submission(s): 689Problem DescriptionGiven a positive integer N, you should o
阅读全文
摘要:找新朋友http://acm.hdu.edu.cn/game/entry/problem/show.php?chapterid=2§ionid=1&problemid=8Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1560 Accepted Submission(s): 781Problem Description新年快到了,“猪头帮协会”准备搞一个聚会,已经知道现有会员N人,把会员从1到N编号,其中会长的号码是N
阅读全文
摘要:Largest prime factorhttp://acm.hdu.edu.cn/game/entry/problem/show.php?chapterid=2§ionid=1&problemid=5Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2728 Accepted Submission(s): 860Problem DescriptionEverybody knows any number can be c
阅读全文
摘要:小数化分数2http://acm.hdu.edu.cn/game/entry/problem/show.php?chapterid=2§ionid=1&problemid=12Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1646 Accepted Submission(s): 613Problem DescriptionRay 在数学课上听老师说,任何小数都能表示成分数的形式,他开始了化了起来,很快他就完成了,但他
阅读全文
摘要:相遇周期http://acm.hdu.edu.cn/game/entry/problem/show.php?chapterid=2§ionid=1&problemid=3Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1501 Accepted Submission(s): 710Problem Description 2007年3月26日,在中俄两国元首的见证下,中国国家航天局局长孙来燕与俄罗斯联邦航天局局长别尔米诺
阅读全文
摘要:Ball bearingshttp://acm.hdu.edu.cn/showproblem.php?pid=1943Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 43 Accepted Submission(s): 22 Problem DescriptionThe Swedish company SKF makes ball bearings. As explained by Britannica Online, a ball bea
阅读全文
摘要:Max Factorhttp://acm.hdu.edu.cn/showproblem.php?pid=2710Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2412 Accepted Submission(s): 734 Problem DescriptionTo improve the organization of his farm, Farmer John labels each of his N (1 <= N <=
阅读全文
摘要:Biorhythmshttp://poj.org/problem?id=1006Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 97029Accepted: 29832DescriptionSome people believe that there are three cycles in a person's life that start the day he or she is born. These three cycles are the physical, emotional, and intellectua
阅读全文
摘要:SquaresTime Limit : 7000/3500ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 12 Accepted Submission(s) : 11Problem DescriptionA square is a 4-sided polygon whose sides have equal length and adjacent sides form 90-degree angles. It is also a polygon such that rotating a
阅读全文
摘要:The Euler functionTime Limit : 2000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 26 Accepted Submission(s) : 16Problem DescriptionThe Euler function phi is an important kind of function in number theory, (n) represents the amount of the numbers which are smaller
阅读全文