快速幂
smiling~
努力会被看得到的
展开
-
2019沈阳网络赛 问题K Guanguan's Happy water (高斯消元+矩阵快速幂 / 瞎搞)
原题链接 题意:第一行给出k,n,第二行2*k个数字,分别是a1,a2…ak 以及 f1,f2…fk 已知满足 f1 = a1 * p1 + a2 * p2 + a3 * p3…+ ak * pk f2 = a2 * p1 + a3 * p2 + a4 * p3…+ f1 * pk … fk = ak * p1 + f1 * p2 + f2 * p3…+ fk-1 * pk 以此类推的k个式子,求...原创 2019-09-18 19:43:55 · 217 阅读 · 0 评论 -
Best Solver(矩阵快速幂+循环结)
The so-called best problem solver can easily solve this problem, with his/her childhood sweetheart. It is known that y=(5+26–√)1+2xy=(5+26)1+2x. For a given integer x (0≤x<232)x (0≤x<232) and a ...原创 2019-07-26 12:24:55 · 226 阅读 · 0 评论 -
Leading and Trailing(基础数论+快速幂)
You are given two integers: n and k, your task is to find the most significant three digits, and least significant three digits of nk. Input Input starts with an integer T (≤ 1000), denoting the numbe...原创 2019-07-27 15:49:52 · 146 阅读 · 0 评论