![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数论
GoForer
这个作者很懒,什么都没留下…
展开
-
poj-1061青蛙的约会(扩展欧几里德算法)
欧几里德算法(辗转相除法,求两个数的最小公约数) 扩展欧几里德算法是用来在已知a, b求解一组x,y,使它们满足贝祖等式等式: ax+by = gcd(a, b) =d(解一定存在,根据数论中的相关定理)。扩展欧几里德常用在求解模线性方程及方程组中。 由欧几里德算法知 :gcd(a,b)= gcd(b,a%b);前提b不为0; 第一次看到这个题用暴力去解(x+mk)modL=(y+nk)mo...原创 2018-02-26 22:06:41 · 212 阅读 · 0 评论 -
数论之逆元
转自:http://www.cnblogs.com/linyujun/p/5194184.htm 数论倒数,又称逆元(因为我说习惯逆元了,下面我都说逆元)数论中的倒数是有特别的意义滴你以为a的倒数在数论中还是1/a吗(・∀・)哼哼~天真 先来引入求余概念 (a + b) % p = (a%p + b%p) %p ...转载 2018-05-01 14:50:33 · 285 阅读 · 0 评论 -
HDU 1576 A+B(逆元)
A/B Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 7660 Accepted Submission(s): 6097Problem Description 要求(A/B)%9973,但由于A很大,我们只给出n(n=A...原创 2018-05-01 15:23:15 · 221 阅读 · 0 评论 -
基础数论 Beijing 2008 HDU - 1852 (快速幂)
Beijing 2008 As we all know, the next Olympic Games will be held in Beijing in 2008. So the year 2008 seems a little special somehow. You are looking forward to it, too, aren’...原创 2018-08-01 15:01:09 · 264 阅读 · 0 评论 -
数论
1.1,整除、 1.2,同余 1.3,最大公约数 1.3.1 辗转相除法 1.3.2 二进制算法 1.3.3 最小公倍数 1.3.4扩展欧几里得算法 1.3.5求解线性同余方程 1.4,逆元 1.5,中国剩余定理 1.6,斐波那契数列 1.7,卡特兰数 1.8,素数 1.9,欧拉函数的线性筛法 补充素因子分解。。。。。1.1整...原创 2018-08-10 19:13:08 · 4732 阅读 · 0 评论 -
卡特兰数1~100(转)
1到100的卡特兰数,便于以后可能用到。 1251442132429143048621679658786208012742900267444096948453535767012964...转载 2018-08-15 10:06:27 · 207 阅读 · 0 评论 -
HDU 5685 Problem A(逆元)
Problem ATime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2241 Accepted Submission(s): 989Problem Desc...原创 2018-08-13 16:35:14 · 173 阅读 · 0 评论 -
Modular Inverse ZOJ - 3609 (扩展欧几里得算法)
The modular modular multiplicative inverse of an integer a modulo m is an integer x such that a-1≡x (mod m). This is equivalent to ax≡1 (mod m). InputThere are multiple test cases. The first lin...原创 2018-08-13 19:39:30 · 155 阅读 · 0 评论 -
HDU1239Calling Extraterrestrial Intelligence Again(打表)
Calling Extraterrestrial Intelligence AgainTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6162 Accep...原创 2018-08-16 20:34:15 · 306 阅读 · 0 评论