GenmCai
GenmCai
全部文章
分类
ACM(1)
C++(2)
C\C++(1)
Git(1)
Linux(1)
Python(2)
shell(3)
算法和数据结构(6)
题解(23)
归档
标签
去牛客网
登录
/
注册
GenmCai的博客
Be a salted fish with a dream
全部文章
(共2篇)
题解 | 《算法竞赛进阶指南》快速幂基础
【题目】 People are different. Some secretly read magazines full of interesting girls' pictures, others create an A-bomb in their cellar, others like usin...
快速幂
2019-08-30
1
696
题解 | 《算法竞赛进阶指南》a^b
【题目】 求 a 的 b 次方对 p 取模的值,其中 【题解】 因为数字过大,不管是精度还是时间都不够,所以得用快速幂。即利用,例:,。来简化的过程,要注意的是p=0的情况。 时间复杂度: #include<iostream> #include<cstring> #inc...
快速幂
2019-08-26
0
731