-
tatyam_prime
- 2634
- 0
- 0
- 0
![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
20 時間のタイピング練習の末,ようやく US 配列でも実戦レベルの速度が出せるようになった. pic.twitter.com/09zUaFDVBw
2024-04-08 21:30:09![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
幾何問題で ccw を使うとき、実数なら「if (cross(a-z, b-z) > EPS) return COUNTER_CLOCKWISE; ...」みたいに書いてたんだけど、z, a, b の座標がどのくらいの規模か分からないから、「if (cross(a-z, b-z) > EPS * abs(a-z) * abs(b-z)) ...」みたいに書いた方がいいかもって思った
2024-04-09 21:08:37![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
int ccw(point z, point a, point b) { if (cross(a-z, b-z) > EPS*abs(a-z)*abs(b-z)) return 1; if (cross(a-z, b-z) < -EPS*abs(a-z)*abs(b-z)) return -1; if (dot(a-z, b-z) < -EPS*abs(a-z)*abs(b-z)) return 2; if (dot(z-a, b-a) < -EPS*abs(z-a)*abs(b-a)) return -2; return 0; }
2024-04-09 21:10:47![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
@tatyam_prime 全部整数でできれば理想なんだけど、そうにもいかない問題もある(なのでどっちのパターンも考えてます)
2024-04-09 22:06:35![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
ICPC のライブラリ (Team Reference Document) 完成しました! 私のチームは全体で 24 ページになりました #TimeManipulators
2024-04-10 00:37:54![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
ICPC用ライブラリを整理してて思ったが、kactl を僅かにカスタマイズする以上のことをやるのはしんどいというのと、これ出たら出題者が悪いだろみたいなアルゴリズムを切りたすぎる。ACL を超えるライブラリを要求するべきではない
2024-04-11 02:25:24![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
@noshi91 github.com/SnapDragon64/A… とか見ると意外と WF はライブラリ要求してないという話はある
2024-04-11 02:26:38![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
@tatyam_prime そうなんだよね。基本ライブラリみたいなのを詰めまくってクソデカく印刷するくらいの気持ちでやった方が良い可能性がある
2024-04-11 02:28:05![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
一軍と思われるライブラリ 遅延セグ木 CHT Garner modint FFT BCC eulerian walk SCC HLD Dinic MCF(primal-dual) rolling hash Manacher Z-Alg KMP suffix array 凸包
2024-04-11 02:36:59![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
これ ICPC 意識なので、AtCoder なら ACL + 検索 で済ませるか利便性がしっかりしたライブラリ (全方位やUF亜種など) 握った方が良いです
2024-04-11 07:21:34