摘要: # 类欧几里得算法简单形式 类欧几里得算法,基础版,在 $O(\log n)$ 的时间复杂度下计算: $$ \begin{align*} f(a,b,c,n)&=\sum_{i=0}^n\lfloor\frac{ai+b}{c}\rfloor\\ \end{align*} $$ 我们考虑先化简: 1 阅读全文
posted @ 2023-08-07 16:10 spdarkle 阅读(4) 评论(0) 推荐(0) 编辑
摘要: [link](https://codeforces.com/contest/1856) 题号:1856A~E2 ## [A](https://codeforces.com/contest/1856/problem/A) 题面: >给定一个正整数 $n$ 和一个长度为 $n$ 的序列 $a$,重复执行 阅读全文
posted @ 2023-08-07 11:38 spdarkle 阅读(53) 评论(0) 推荐(0) 编辑
摘要: # Atcoder Beginner Contest 313 从C开始,由G结束(Ex的插头DP实在有点。 ## [C](https://atcoder.jp/contests/abc313/tasks/abc313_c) >给定数组 $a$,每一次操作形如选择 $1\le i,j\le n$,$a 阅读全文
posted @ 2023-08-07 11:38 spdarkle 阅读(20) 评论(0) 推荐(0) 编辑