数论基础
xuehuhu1
这个作者很懒,什么都没留下…
展开
-
Crazy tea party
n participants of �crazy tea party� sit around the table. Each minute one pair of neighbors can change their places. Find the minimum time (in minutes) required for all participants to sit in reverse原创 2014-08-19 13:48:15 · 415 阅读 · 0 评论 -
Critical Mass
During the early stages of the Manhattan Project, the dangers of the new radioctive materials were not widely known. Vast new factory cities were built to manufacture uranium and plu- tonium in bulk原创 2015-03-13 20:09:44 · 412 阅读 · 0 评论 -
Brick Wall Patterns
这题考察斐波那契数列,但是推理的过程却是值得探讨的。观察墙的结尾有两种形状,一种是一块砖竖着放,另一种是两块砖横着放,对于f(n),可以再f(n-1)的后面加一个竖着放的砖,也可以在f(n-2)的后面加两块横着放的砖,因此可得f(n)=f(n-1)+f(n-2)对于此类问题可以用数学归纳法,从前往后推,也可以用递推公式,从后往前推。注意数据的范围会暴int。 #include #define m原创 2015-03-13 19:40:01 · 469 阅读 · 0 评论 -
Bee
b The Problem In Africa there is a very special species of bee. Every year, the female bees of such species give birth to one male bee, while the male bees give birth to one male bee and one f原创 2015-03-13 19:00:18 · 675 阅读 · 0 评论 -
Send a Table
When participating in programming contests, you sometimes face the following problem: You know how to calcutale the output for the given input values, but your algorithm is way too slow to ever pass原创 2015-03-13 23:26:34 · 375 阅读 · 0 评论 -
The Super Powers
A The Super Powers We all know the Super Powers of this world and how they manage to get advantages in political warfare or even in other sectors. But this is not a political原创 2014-08-11 15:50:16 · 374 阅读 · 0 评论 -
hud Fibonacci
Problem Description 2007年到来了。经过2006年一年的修炼,数学神童zouyu终于把0到100000000的Fibonacci数列 (f[0]=0,f[1]=1;f[i] = f[i-1]+f[i-2](i>=2))的值全部给背了下来。 接下来,CodeStar决定要考考他,于是每问他一个数字,他就要把答案说出来,不过有的数字太长了。所以规定超过4位的只要说出前4原创 2014-09-06 16:52:14 · 448 阅读 · 0 评论 -
小数化分数2
小数化分数2 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2610 Accepted Submission(s): 932 Problem Description Ray原创 2014-09-06 13:17:13 · 374 阅读 · 0 评论 -
Leftmost Digit
Given a positive integer N, you should output the leftmost digit of N^N. Input The input contains several test cases. The first line of the input is a single integer T which is the原创 2014-08-23 06:43:00 · 427 阅读 · 0 评论 -
Connect the Cable Wires
Asif is a student of East West University and he is currently working for the EWUISP to meet his relatively high tuition fees. One day, as a part of his job, he was instructed to connect cable wires原创 2015-03-13 23:44:14 · 429 阅读 · 0 评论