随笔分类 -  数——学--数论

摘要:Alice and Bob Time Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Submit Status Alice and Bob Submit Status Description It is so bor 阅读全文
posted @ 2017-03-15 21:44 勿忘初心0924 阅读(603) 评论(0) 推荐(0)
摘要:String Problem Description Recently, lxhgww received a task : to generate strings contain '0's and '1's only, in which '0' appears exactly m times, '1 阅读全文
posted @ 2017-02-18 15:15 勿忘初心0924 阅读(181) 评论(0) 推荐(0)
摘要:Equations Problem Description Consider equations having the following form: a*x1^2+b*x2^2+c*x3^2+d*x4^2=0a, b, c, d are integers from the interval [-5 阅读全文
posted @ 2017-02-17 11:32 勿忘初心0924 阅读(425) 评论(0) 推荐(0)
摘要:引自:http://blog.csdn.net/acmmaxx/article/details/18409701 逆元: 若,b*b1 % c == 1 则,b1称为b模c的乘法逆元。 在ACM中,许多除法取模都要用到求逆元。 但是,逆元,为什么能给我们带来 ( a/b ) % c == ( a*b 阅读全文
posted @ 2017-02-14 05:30 勿忘初心0924 阅读(5445) 评论(0) 推荐(0)
摘要:Perfect Squares Problem Description A number x is called a perfect square if there exists an integer b satisfying x=b^2. There are many beautiful theo 阅读全文
posted @ 2017-02-14 05:22 勿忘初心0924 阅读(471) 评论(0) 推荐(0)
摘要:Fibonacci Numbers Problem Description The Fibonacci sequence is the sequence of numbers such that every element is equal to the sum of the two previou 阅读全文
posted @ 2017-02-10 02:30 勿忘初心0924 阅读(887) 评论(0) 推荐(0)
摘要: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))的值全部给背了下来。接下来,CodeSta 阅读全文
posted @ 2017-02-10 01:46 勿忘初心0924 阅读(176) 评论(0) 推荐(0)
摘要:母函数总结 观自 http://blog.csdn.net/metalseed/article/details/8046656# 所谓母函数就是:将任意一个数列,a0,a1,a2……an 通过一个函数进行联系起来。 G(n)=a0+a1*x+a2*x^2+……an*x^n; 称G(n)为数列的生成函 阅读全文
posted @ 2017-02-03 15:23 勿忘初心0924 阅读(349) 评论(0) 推荐(0)
摘要:Holding Bin-Laden Captive! Problem Description We all know that Bin-Laden is a notorious terrorist, and he has disappeared for a long time. But recent 阅读全文
posted @ 2017-02-01 22:11 勿忘初心0924 阅读(341) 评论(0) 推荐(0)
摘要:Jacobi symbol Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 625 Accepted Submission(s): 258 Pro 阅读全文
posted @ 2017-02-01 15:07 勿忘初心0924 阅读(2010) 评论(0) 推荐(0)
摘要:GCD Problem Description The greatest common divisor GCD(a,b) of two positive integers a and b,sometimes written (a,b),is the largest divisor common to 阅读全文
posted @ 2017-01-31 16:19 勿忘初心0924 阅读(777) 评论(0) 推荐(0)
摘要:Ipad,IPhone Problem Description In ACM_DIY, there is one master called “Lost”. As we know he is a “-2Dai”, which means he has a lot of money. Well, Lo 阅读全文
posted @ 2017-01-26 00:40 勿忘初心0924 阅读(379) 评论(0) 推荐(0)
摘要:Description has only two Sentences Problem Description an = X*an-1 + Y and Y mod (X-1) = 0.Your task is to calculate the smallest positive integer k t 阅读全文
posted @ 2017-01-22 00:57 勿忘初心0924 阅读(345) 评论(0) 推荐(0)
摘要:Hello Kiki Problem Description One day I was shopping in the supermarket. There was a cashier counting coins seriously when a little kid running and s 阅读全文
posted @ 2017-01-20 20:39 勿忘初心0924 阅读(724) 评论(0) 推荐(1)
摘要:The Euler function Problem Description The Euler function phi is an important kind of function in number theory, (n) represents the amount of the numb 阅读全文
posted @ 2016-12-29 18:02 勿忘初心0924 阅读(297) 评论(0) 推荐(0)
摘要:GCD Again Problem Description Do you have spent some time to think and try to solve those unsolved problem after one ACM contest? No? Oh, you must do 阅读全文
posted @ 2016-12-29 15:57 勿忘初心0924 阅读(282) 评论(0) 推荐(0)
摘要:欧拉函数证明 欧拉函数定义:定义一个数n,φ(n)为不大于n的,与n互质的数的个数。 证明方法用到容斥定理:容斥定理的原理如图: A∪B∪C=A+B+C - A∩B - B∩C - A∩C + A∩B∩C; 欧拉函数证明: 小于等于n的基数有n个,讨论所有n的素因子,只要是素因子的倍数的是都不是n的 阅读全文
posted @ 2016-12-29 15:25 勿忘初心0924 阅读(5123) 评论(0) 推荐(0)
摘要:Buy the Ticket Problem Description The \\\\\\\"Harry Potter and the Goblet of Fire\\\\\\\" will be on show in the next few days. As a crazy fan of Har 阅读全文
posted @ 2016-12-07 20:56 勿忘初心0924 阅读(810) 评论(0) 推荐(0)
摘要:Last non-zero Digit in N! Problem Description The expression N!, read as "N factorial," denotes the product of the first N positive integers, where N 阅读全文
posted @ 2016-12-06 19:31 勿忘初心0924 阅读(640) 评论(0) 推荐(0)
摘要:Game of Connections Problem Description This is a small but ancient game. You are supposed to write down the numbers 1, 2, 3, ... , 2n - 1, 2n consecu 阅读全文
posted @ 2016-11-27 12:44 勿忘初心0924 阅读(531) 评论(0) 推荐(0)