![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数学
DoIdo~
这个作者很懒,什么都没留下…
展开
-
模板——exLucas(大组合数取模)
```cpp #include<iostream> #include<algorithm> using namespace std; typedef long long ll; const int N = 20; ll B[N], u[N]; inline ll qmul(ll a, ll b, ll p) { ll res = 0; a %= p; b %= p; while (b) { if (b & 1LL) { res = (res + a) %原创 2020-09-11 16:24:17 · 126 阅读 · 0 评论 -
赛后题解——问题 C: A^X mod P
问题 C: A^X mod P 题目描述 It’s easy for ACMer to calculate A^X mod P. Now given seven integers n, A, K, a, b, m, P, and a function f(x) which defined as following. f(x) = K, x = 1 f(x) = (a*f(x-1) + b)%m , x > 1 Now, Your task is to calculate ( A^(f(1)) + A原创 2020-09-06 10:00:29 · 194 阅读 · 0 评论 -
模板——高斯消元
#include<cmath> #include<stdio.h> #include<iostream> #include<algorithm> using namespace std; const int N = 110; const double eps = 1e-6; int n; double u[N][N]; int gauss() { int x, y; for (y = 1, x = 1; y <= n; y++) { int原创 2020-07-21 12:58:36 · 114 阅读 · 0 评论