![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
待分类
待分类
sijuemz
这个作者很懒,什么都没留下…
展开
-
2020-08-09
当 p 为质数,1≤m≤n1≤m≤n 时,求组合数CmnmodpCnmmodp 。Lucas定理对于质数 p, 有:Cmn≡Cm/pn/p⋅Cmmodpnmodp(modp)Cnm≡Cn/pm/p⋅Cnmodpmmodp(modp) 其中n/pn/p 和 m/pm/p 为整除。证明:引理1:Cip≡pi⋅Ci−1p−1≡0(modp)Cpi≡pi⋅Cp−1i−1≡0(modp) 引理1证明:Cip=p!i!⋅(p−i)!=pi⋅(p−1)(i−1)!⋅(p−i)!Cpi=p!i!⋅(p−i)!=pi⋅(p−原创 2021-01-22 12:38:20 · 94 阅读 · 0 评论 -
ZOJ 4103
(本文章仅做笔记留存,看官请走) 对于这个例题,对欧拉路径不解,暂且先看程序流程和大致思想。 #include<bits/stdc++.h> using namespace std; const int amn=1e5+5; int n; int ans[amn],tp; int vis[amn]; void sovle(int u){ int f=0,flag=0; while(tp<n){ vis[u]=1; ans[++tp]=u;//原创 2021-01-22 12:38:30 · 92 阅读 · 0 评论 -
小知识笔记积累
知识点1 C++中仅允许1~31位的位移,那么对C估计也一定,对其他语言不知道是否同效,或者说是源于编译器——暂不清楚原因和影响范围。 知识点2 对于跨类型编译必须小心, 比如:long long int = int *int——long long int = (int)1<<31 * (int)1<<31;就会出错。 ...原创 2021-01-22 12:37:20 · 89 阅读 · 0 评论 -
ZOJ Fibonacci in the Pocket
题目 思想 求斐波那契数列的[a,b]范围数列数值之和的奇偶性。 首先,我们可以先求出[1,a-1]范围数列和和[1, b]范围数列和的奇偶性。对于两个数列和的奇偶性分别赋值af和bf(偶为0,奇为1)。af和bf有四种情况。其中af和bf一奇一偶的情况下,表明[a,b]范围数列和为奇;另一种af和bf同奇同偶的情况下,表明[a,b]数列和为偶。 然后,我们需要了解求得[1, i]范围数列和的奇偶性的方法。如何求呢?斐波那契数列是一个三数奇偶循环的数列——奇奇偶。同时也表述循环数列和的为偶数,那么我们可原创 2020-08-07 15:06:38 · 104 阅读 · 1 评论 -
解决CSDN使用Markdown编译器时无法在</>代码块中粘贴代码的问题
问题: 在使用Markdown编译器中的代码块中粘贴复制的代码后会发生异常情况。 解决: 用富文本编译器作为中介,将复制的代码先送入该编译器的代码块中,在复制代码块中的代码,然后在Markdown编译器的代码块中粘贴代码。 ...原创 2020-08-07 14:16:18 · 767 阅读 · 1 评论 -
ZOJ Sequence in the Pocket
文章目录题目:思路:代码 题目: Time Limit: 2000 msMemory Limit: 65536 KB DreamGrid has just found an integer sequence in his right pocket. As DreamGrid is bored, he decides to play with the sequence. He can perform the following operation any number of times (including原创 2020-08-05 20:38:06 · 116 阅读 · 0 评论 -
sijue博客练习
是否撒旦法发生的发发原创 2020-08-02 17:13:23 · 163 阅读 · 0 评论