![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数论
文章平均质量分 53
桂十三
这个作者很懒,什么都没留下…
展开
-
几种数学公式(环排列 母函数 唯一分解定理 卡特兰数 默慈金数 贝尔数 那罗延数)
转自 https://blog.csdn.net/ZCY19990813/article/details/81181505一:环排列把一个m个元素的环在m个不同的位置拆开记得到m个不同的线排列。由于n个不同元素中任取m个元素的排列方法为P(n,m)种,所以n个不同元素中任取m个元素的环排列方法有P(n,m)/m种。(p是排列组合中的A)特别的,n个不同元素的环排列方法有P(n,n)/...转载 2018-07-24 14:41:55 · 741 阅读 · 0 评论 -
欧拉函数(模板)
#include <iostream>#include <cmath>using namespace std;int oula(int n){ int ans=n; int i; for(i=2;i<=sqrt(n);i++) { if(n%i==0) { ans=ans...原创 2018-09-11 19:12:11 · 139 阅读 · 0 评论 -
数论
https://www.cnblogs.com/linyujun/category/784324.html转载 2018-08-08 10:38:27 · 110 阅读 · 0 评论 -
高斯消元详解+模板
大佬讲解: https://blog.csdn.net/pengwill97/article/details/77200372 大佬模板: https://blog.csdn.net/pengwill97/article/details/77282328 https://blog.csdn.net/Akatsuki__Itachi/arti...原创 2018-07-26 15:29:24 · 1099 阅读 · 0 评论 -
Biorhythms(中国剩余定理)
中国剩余定理详解见博客:https://www.cnblogs.com/linyujun/p/5199415.html BiorhythmsSome people believe that there are three cycles in a person's life that start the...原创 2018-07-20 16:06:52 · 436 阅读 · 0 评论 -
基础数论(逆元,费马小定理,扩展欧几里得,中国剩余定理)(模板)
整理自:https://www.cnblogs.com/linyujun/category/784324.html首先,引入同余定理:(a + b) % p = (a%p + b%p) %p (对)(a - b) % p = (a%p - b%p) %p (对)(a * b) % p = (a%p * b%p) %p (对)(a / b) % ...原创 2018-07-20 11:45:32 · 465 阅读 · 0 评论 -
卡特兰数(Train Problem II )
Train Problem IIAs we all know the Train Problem I, the boss of the Ignatius Train Station want to know if all the trains come in strict-increasing order...转载 2018-07-25 20:00:30 · 222 阅读 · 0 评论 -
N的阶乘的长度 V2(斯特林近似)
输入N求N的阶乘的10进制表示的长度。例如6! = 720,长度为3。Input第1行:一个数T,表示后面用作输入测试的数的数量。(1 <= T <= 1000)第2 - T + 1行:每行1个数N。(1 <= N <= 10^9)Output共T行,输出对应的阶乘的长度。Sample Input3456Sample Output...原创 2018-07-25 16:54:09 · 215 阅读 · 0 评论 -
关于莫比乌斯和莫比乌斯反演
容斥原理 :点击打开链接莫比乌斯反演: https://blog.csdn.net/litble/article/details/72804050转载 2018-07-24 16:45:57 · 172 阅读 · 0 评论 -
Fence Building(欧拉定理、卢卡斯定理)
平面内的区域个数=平面内的点数+平面内的边数+2,因为这个是在圆上,所以圆外的那1个要减去,所以最后+1而不是+2。点数=C(n,4),即每4个点连线就有一个平面内的点产生,边数=C(n,2),即每两个点连线就产生一条边。组合数的几种求法#include <algorithm>#include <iostream>#include <cstring>...原创 2019-08-09 08:55:26 · 254 阅读 · 0 评论