luzhiled1333 / comp-library

Creative Commons Zero v1.0 Universal
4 stars 2 forks source link

[math] 素因数分解 #155

Open ei1333 opened 1 year ago

ei1333 commented 1 year ago

高速素因数分解

Description

ポラード・ロー素因数分解法(Pollard’s rho algorithm)

$O(N^{\frac 1 4})$ expected

File Name

src/math/primes/fast-prime-factorization.hpp

TODO

note

いつもの $O(\sqrt{N})$

Description

おれたちの $O(\sqrt{N})$

File Name

src/math/primes/prime-factorization.hpp

TODO

note

いる?これ

エラトステネスの篩を利用した素因数分解クエリ

Description

前計算 $O(N \log \log N)$

クエリあたり $O(\log N)$

File Name

src/math/primes/sieve-of-eratosthenes.hpp

TODO

note

ei1333 commented 1 year ago

$O(\sqrt N)$ のやつも欲しいかも

Luzhiled commented 1 year ago

これは math/primes/~ ですかね