摘要: Solution 首先这个矩阵, 很明显的就是Vandermonde矩阵. 我们有公式: $$ |F_n| = \prod_{1 \le j include include include include using namespace std; namespace Zeonfai { inline 阅读全文
posted @ 2017-09-26 20:17 Zeonfai 阅读(197) 评论(0) 推荐(0)
摘要: Solution 注意到$\gcd$具有结合律: $$ \gcd(a, b, c) = \gcd(a, \gcd(b, c)) $$ 因此我们从后往前, 对于每个位置$L$, 找到每一段不同的$\gcd(a_x, a_{x + 1}, \cdots, a_R)$. 我们注意到这样的$R$最多只有$\ 阅读全文
posted @ 2017-09-26 19:46 Zeonfai 阅读(188) 评论(0) 推荐(0)