数论
文章平均质量分 71
geguojun
天道酬勤
展开
-
Wolf and Rabbit
Description There 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 rabbit in anticlockwise order. The first ho原创 2014-08-05 15:33:18 · 492 阅读 · 0 评论 -
The Balance(数论)
Description Ms. Iyo Kiffa-Australis has a balance and only two kinds of weights to measure a dose of medicine. For example, to measure 200mg of aspirin using 300mg weights and 700mg weights, she原创 2014-08-05 20:47:14 · 459 阅读 · 0 评论 -
A/B(数论)
Description 要求(A/B)%9973,但由于A很大,我们只给出n(n=A%9973)(我们给定的A必能被B整除,且gcd(B,9973) = 1)。 Input 数据的第一行是一个T,表示有T组数据。 每组数据有两个数n(0 Output 对应每组数据输出(A/B)%9973。 Sample原创 2014-08-06 10:42:58 · 623 阅读 · 0 评论 -
Goldbach's Conjecture(数论)
Description In 1742, Christian Goldbach, a German amateur mathematician, sent a letter to Leonhard Euler in which he made the following conjecture: Every even number greater than 4 can be wri原创 2014-08-05 21:45:26 · 387 阅读 · 0 评论 -
Biorhythms(数论)
Description Some 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 intellectual cycles, and t原创 2014-08-06 19:29:06 · 436 阅读 · 0 评论 -
Prime Distance(数论)
Description The branch of mathematics called number theory is about properties of numbers. One of the areas that has captured the interest of number theoreticians for thousands of years is the qu原创 2014-08-07 15:50:21 · 546 阅读 · 0 评论 -
Heavy Cargo(数论)
Description Big Johnsson Trucks Inc. is a company specialized in manufacturing big trucks. Their latest model, the Godzilla V12, is so big that the amount of cargo you can transport with it is ne原创 2014-08-06 14:39:50 · 597 阅读 · 0 评论 -
青蛙的约会(数论)
Description 两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见面的具体位置。不过青蛙们都是很乐观的,它们觉得只要一直朝着某个方向跳下去,总能碰到对方的。但是除非这两只青蛙在同一时间跳到同一点上,不然是永远都不可能原创 2014-08-05 11:24:31 · 532 阅读 · 0 评论 -
统计难题(字典树)
Description Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀). Input 输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表的是老师交给Ignatius统计的单词,一个空行代表单词表的结束.第二部分原创 2014-08-08 10:02:15 · 634 阅读 · 1 评论