![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
快速幂
Focus5679
学生一枚
展开
-
牛客练习赛43 B Tachibana Kanade Loves Probability 模拟 快速幂优化
链接:https://ac.nowcoder.com/acm/contest/548/B来源:牛客网题目描述立华奏在学习初中数学的时候遇到了这样一道大水题:“设箱子内有 n 个球,其中给 m 个球打上标记,设一次摸球摸到每一个球的概率均等,求一次摸球摸到打标记的球的概率”“emmm...语言入门题”但是她改了一下询问方式:设最终的答案为 p ,请输出 p 小数点后 K1K1 到...原创 2019-04-07 13:51:10 · 242 阅读 · 0 评论 -
2019 Multi-University Training Contest 3 Fansblog HDU6608 (数学,快速幂/乘,Miller_Rabin)
FansblogTime Limit: 2000/2000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 72Accepted Submission(s): 18Problem DescriptionFarmer John keeps a website ...原创 2019-07-29 17:45:01 · 131 阅读 · 0 评论 -
2019牛客暑期多校训练营(第五场)B generator 1 (矩阵的快速幂)
题目描述You are given four positive integersx_0, x_1, a, bx0,x1,a,b. And you knowx_i = a \cdot x_{i-1} + b \cdot x_{i-2}xi=a⋅xi−1+b⋅xi−2for alli \ge 2i≥2.Given two positive integers n, and MO...原创 2019-08-02 09:51:52 · 158 阅读 · 0 评论