首页 > TAG信息列表 > mathematician

【HDOJ 5895】Mathematician QSC 矩阵快速幂+欧拉定理

参考 https://blog.csdn.net/queuelovestack/article/details/52577212 题目链接 https://acm.hdu.edu.cn/showproblem.php?pid=5895 思路 用f(n-1)乘上f(n)=f(n-2)+2*f(n-1),再通过移项、累加后得 g[n]=f[n] * f[n+1]/2 那么就可以首先通过矩阵快速幂计算出g(n*y)的值 关于除以