-
Notifications
You must be signed in to change notification settings - Fork 0
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
実装について #22
Comments
|
|
2-SAT のインタフェース、 ts.add_clause(i, -j); じゃなくて ts.add_clause((i, true), (j, false)); の方がうれしい? |
セグ木とかでよく境界チェックしてるけど、毎回書くんじゃなくて https://doc.rust-lang.org/src/core/panicking.rs.html#67-77 みたいな感じで関数を作っておく方が楽そう fn panic_bounds_check(by: impl Debug, safe: impl Debug) -> ! {
panic!("index out of bounds: the safe range is {:?} but accessed by {:?}", safe, by)
} とかみたいな感じで |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
セグ木のアーチのところ、左側.chain(右側) みたいなイテレータを返す内部関数を作っておけば、見かけの実装がきれいになりそう
Vec
を使わないようにもできそうだし片側しか吐かなくていいなら他方はシフトだけしてればいい? だめか、だめだね
The text was updated successfully, but these errors were encountered: