随笔分类 - 高维前缀和
摘要:洛谷传送门 AtCoder 传送门 考虑若我们对于每个 \(a_i\) 求出来了使得 \(g^{b_i} \equiv a_i \pmod P\) 的 \(b_i\)(其中 \(g\) 为 \(P\) 的原根),那么 \(a_i^k \equiv a_j \pmod P\) 等价于 \(kb_i \
阅读全文
摘要:LOJ 传送门 组合计数神题。下文的 \(m\) 指原题面中的 \(d\),\(k\) 指原题面中的 \(r\)。 考虑最后每个人得到的宝石数量的序列 \(s_1, s_2, \ldots, s_n\),考虑这种方案的出现次数。首先要在 \(m\) 次操作中分别选 \(s_i - 1\) 次给第 \
阅读全文
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc215_h "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc215/tasks/abc215_h "AtCoder 传送门") 考虑第一问。 发现
阅读全文
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_arc132_f "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/arc132/tasks/arc132_f "AtCoder 传送门") 没见过这种在新运算
阅读全文
摘要:### 公式 普通 min-max 容斥: $$\max\limits_{i \in S} a_i = \sum\limits_{T \subseteq S \and T \ne \varnothing} (-1)^{|T|-1} \min\limits_{j \in T} a_j$$ $$\min
阅读全文

浙公网安备 33010602011771号