数论
caorui_blog
这个作者很懒,什么都没留下…
展开
-
数论的基本内容
数论是研究整数的运算的数论的内容包括:1、快速幂2、素数判定3、筛选法4、模除5、中国剩余定理(孙子定理)6、同余方程7、最大公约数8、最小公倍数9、欧几里得算法10、扩展...原创 2018-03-01 09:56:37 · 6366 阅读 · 0 评论 -
数论--快速幂
UVALive5346 UVA374 Big Mod【快速幂】Calculate R := B ^ P mod M for large values of B, P, and M using an efficient algorithm. (That’s right, this problem has a time dependency !!!.) Input The input wil...原创 2018-03-01 11:41:47 · 210 阅读 · 0 评论 -
数论--HDU1262 寻找素数对【素数】
寻找素数对Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 14663 Accepted Submission(s): 7357Problem Description哥德巴赫猜想大家都知道一点吧.我们现在不是想证明这个结论,而是想在程序...原创 2018-03-01 11:52:24 · 236 阅读 · 0 评论 -
数论--模除
HDU6025 Coprime Sequence【前缀GCD+后缀GCD】Coprime SequenceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1415 Accepted Submission(s): 690Proble...原创 2018-03-01 15:56:03 · 1277 阅读 · 0 评论 -
数论--模除
HDU1021 ZOJ2060 Fibonacci Again【斐波拉契数列+模除+水题】Fibonacci AgainTime Limit: 2 Seconds Memory Limit: 65536 KBThere are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n...原创 2018-03-01 16:13:25 · 501 阅读 · 0 评论 -
数论--素数
#include <stdio.h>#include <math.h>// Eratosthenes筛选法void sieveofe(int p[], int n){ int i, j; p[0] = 0; p[1] = 0; p[2] = 1; // 初始化 for(i=3; i<=n; i++) { ...原创 2018-03-01 22:31:15 · 145 阅读 · 0 评论 -
数论--数列
POJ3438 ZOJ2886 UVALive3822 Look and Say【数列+水题】DescriptionThe look and say sequence is defined as follows. Start with any string of digits as the first element in the sequence. Each subsequent element...原创 2018-03-03 10:08:28 · 288 阅读 · 0 评论