09 2021 档案

摘要:P1006 传纸条 题目大意:找两条不重复的路径使得相加最大 做法:两条路不重复dp #include <cmath> #include <cstdio> #include <iostream> using namespace std; const int maxn = 51; int n,m,a[ 阅读全文
posted @ 2021-09-17 20:36 -凨- 阅读(108) 评论(0) 推荐(0)
摘要:miller_rabin log(n)级别复杂度的判断素数的方式 费马小定理 对于任意整数\(a,p\)互质,则有$$a^{p-1}≡1(mod~p)$$ 那么思考反过来可不可以?如果有\(a<p\)且满足这个式子,能不能说明\(p\)是质数呢?很遗憾,不可以,有些合数是可以满足这个式子的,它们被称 阅读全文
posted @ 2021-09-02 20:00 -凨- 阅读(250) 评论(0) 推荐(0)