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

add crt and invgcd #23

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

add crt and invgcd #23

wants to merge 1 commit into from

Conversation

p1scescom
Copy link
Collaborator

math/crt を実装しました. #9
crt で使用される inv_gcd も作成しましたが, internal_math.hpp の関数群は別のファイルにまとめたほうがいいでしょうか?

@likein12
Copy link
Collaborator

likein12 commented Sep 10, 2020

ありがとうございます。

僕もinternalの扱いには迷いましたが、最終的には別ファイルに分けた方がいいと考えています。オリジナルのACLでinternalを用意しているのはよく行う操作を各ファイル内で同じように実装するのは非効率で保守性も悪いからということだと思います。

ただ、悩ましいのは、ACL.jlをAtCoderで使う際、ただ単に手動でコピペするのであれば逆に依存関係のないファイルを一つ作った方が便利というところですね。なので、ファイル間に依存関係を作る場合、一つの等価な提出コードファイルに自動整形してあげるプログラムが欲しくなります。このあたりのうまいやり方はよく知らないのですが、正規表現include\(\s*\".+\"\s*\)を探し出してきて該当ファイルに置き換えるというようなざっくりしたやり方であればすぐできると思います。

いずれにせよC++ほどのサポートが得られない以上、他言語で同じ土俵で戦うにはある程度便利ツールを自前で用意していく必要があると思っています。

@p1scescom p1scescom linked an issue Sep 11, 2020 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

math/crtの実装
2 participants