![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
矩阵
文章平均质量分 86
liluoyu_1016
这个作者很懒,什么都没留下…
展开
-
Jzzhu and Sequences CodeForces - 450B 矩阵快速幂
Jzzhu has invented a kind of sequences, they meet the following property:You are given x and y, please calculate fn modulo1000000007 (109 + 7).Input The first line contains two int原创 2017-10-29 09:00:22 · 232 阅读 · 0 评论 -
矩阵 快速幂
1. 快速幂 O(logn)#include#includeusing namespace std;typedef long long ll;ll mod_pow(ll x,ll n){ ll ret=1; while(n>0) { if(n&1) ret=ret*x; x=x*x; n>原创 2017-08-09 11:24:52 · 154 阅读 · 0 评论