File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 11---
22title : 【精進2】ABC349-F
33date : 2025-1-07 15:16:00 0900
4+ last_modified_at : 2025-01-08 13:44:00 +0800
45categories : [競技プログラミング]
56tags : [AtCoder,ABC,包除原理,精進]
67math : true
@@ -86,7 +87,8 @@ int main() {
8687
8788## 別解
8889[ ユーザー解説] ( https://atcoder.jp/contests/abc349/editorial/9794 ) 通りにやってみる。
89- $ Z^{-1}(Z(X)\cdot Z(Y))_ n= \sum _ {\mathrm{lcm}(i,j)=n}X_i Y_j $ が重要。$(Z(X_1)\cdot Z(X_2)\cdot\dots \cdot Z(X_N))_ n = 2^{c_n} $となる$c$をゼータ変換で求めて左辺の列をメビウス変換する。
90+ $ Z^{-1}(Z(X)\cdot Z(Y))_ n= \sum _ {\mathrm{lcm}(i,j)=n}X_i Y_j $ が重要。$(Z(X_1)\cdot Z(X_2)\cdot\dots \cdot Z(X_N))_ n = 2^{c_n} $となる$c$をゼータ変換で求めて左辺の列をメビウス変換する。
91+ (追記)ついでにlibrary checkerのgcd convolution,lcm convolutionを解いてライブラリに追加しておいた。
9092``` cpp
9193#include " /home/y_midori/cp/library/template.hpp"
9294#include " data_structure/hash-map-variable-length.hpp"
You can’t perform that action at this time.
0 commit comments