zer0-star / Nim-ACL

ACL (AtCoder Library) implementation in Nim
Creative Commons Zero v1.0 Universal
22 stars 3 forks source link

Fix factorization #51

Closed haruyama480 closed 8 months ago

haruyama480 commented 8 months ago

close: https://github.com/zer0-star/Nim-ACL/issues/50

https://github.com/lpha-z/library-checker-problems/blob/0b56efba1b374df4455ccf91b063560ec76d3794/math/factorize/sol/correct.cpp をほぼそのまま実装しています

元のコード(+fの定数を1を3に変更)よりslowerstが2倍ほど遅くなってそうですが、まあverify通すの優先でマージしようと思います

[INFO] slowest: 1.246154 sec  (for 999381247093216751_00)
[SUCCESS] test success: 27 cases
INFO:onlinejudge_verify.verify:all tests succeeded
chaemon commented 8 months ago

ありがとうございます!速度よりverify通すの優先でいいと思います!

chaemon commented 8 months ago

ところで、Graph[int]と書くとエラーでGraphだと大丈夫なのってなんか変ですねー

Graphの実装がかなりマニアックで1.0.6だとそうしないといけない理由があったのかもです。。。

haruyama480 commented 8 months ago

Graphはよくわかってないので、旧バージョン固有の処理は削除してできるだけわかりやすくしたいですね!