Open tipstar0125 opened 1 year ago
AHCでやっておいた方がよいこと
延長戦やってみたいことリスト
上位勢で出てきたしらない単語
えおむ氏の解法ツイート
かなり考察が似ている。細かい工夫がスコアにかなりの影響を与えていそう。
https://twitter.com/e_o_m_2_3_5_7/status/1693203587638452403 https://twitter.com/e_o_m_2_3_5_7/status/1693521485904973835
とろちゃ氏の解法ブログ(にぶたん)
https://trooooche.hatenablog.com/draft/entry/i2YimjscF6mEx-jwcUvjKgnpYW4
ぽか氏の解法ツイート(最小費用流)
AHC解説放送 https://www.youtube.com/watch?v=lOPnnHCFc30
ベイズ推定
誤差関数erf
erf: toastUzさんのコード erf2: 以下のWilliams=山内の近似式 http://invar6.blog.fc2.com/blog-entry-16.html
cdf: 累積分布関数のこと
fn erf(x: f64) -> f64 {
const A1: f64 = 0.254829592;
const A2: f64 = -0.284496736;
const A3: f64 = 1.421413741;
const A4: f64 = -1.453152027;
const A5: f64 = 1.061405429;
const P: f64 = 0.3275911;
let t = 1.0 / (1.0 + P * x);
1.0 - (((((A5 * t + A4) * t) + A3) * t + A2) * t + A1) * t * (-x * x).exp()
}
fn erf2(x: f64) -> f64 {
let re = -1.2732395447351626861510701069801e+0;
let x = x.abs();
let sx = x * x;
(1.0 - (re * sx).exp()
* (1.0 + sx * sx * (0.1101999999998335 / (sx + 7.2085122317063002) + 0.0219999999999997)))
.sqrt()
}
fn cdf(x: f64, S: f64) -> f64 {
(1.0 + erf2(x / 2.0f64.sqrt() / S)) / 2.0
}
https://atcoder.jp/contests/ahc022/tasks/ahc022_a