Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

セグメント木や累積和に GCD や LCM を載せる #152

Closed
kmyk opened this issue Aug 5, 2021 · 3 comments · Fixed by #163
Closed

セグメント木や累積和に GCD や LCM を載せる #152

kmyk opened this issue Aug 5, 2021 · 3 comments · Fixed by #163
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@kmyk
Copy link
Collaborator

kmyk commented Aug 5, 2021

いまは半群として (ℤ, +), (ℤ, min), (ℤ, max) しか使ってないけれど、gcd, lcm もほしい
特に <O(N), O(1)> GCD を貼れるとなんだかうれしい

@kmyk kmyk added enhancement New feature or request good first issue Good for newcomers labels Aug 5, 2021
@hotman78
Copy link
Contributor

hotman78 commented Aug 5, 2021

segment tree についてgcdは償却計算量となるのでそこまでうれしくはなさそうです、別のデータ構造として追加するのはとても賛成です

@hotman78
Copy link
Contributor

hotman78 commented Aug 6, 2021

LCMに関してはオーバーフローが大きな問題になりそうですね...

@hotman78
Copy link
Contributor

hotman78 commented Aug 6, 2021

LCMに関してはオーバーフローが大きな問題になりそうですね...

とりあえずこの問題は無視して作ります

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants