![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
练习存档
文章平均质量分 56
A_Hawthorn
这个作者很懒,什么都没留下…
展开
-
0x01 基本算法-位运算 B-Raising Modulo Numbers
题目链接Raising Modulo Numbers题目描述People are different. Some secretly read magazines full of interesting girls' pictures, others create an A-bomb in their cellar, others like using Windows, and some like difficult mathematical games. Latest marketing rese原创 2021-10-08 10:57:46 · 120 阅读 · 0 评论 -
0x01 基本算法-位运算 A-a^b
#include <iostream>using namespace std;typedef long long ll;// 快速幂取模/* b是偶数时: a^b mod p = ((a^2)^(b/2)) mod p; b是奇数时: a^b mod p = ((a^2)^(b/2)*a) mod p; 当b为奇数时相较于b为偶数时多乘了一个a*/ll qmi(ll a, ll b, ll p) { ll res = 1...原创 2021-10-08 10:38:07 · 172 阅读 · 0 评论