Ochiai

object Ochiai(source)

Functions

Link copied to clipboard
fun rank(runs: List<Run>): List<Scored>

Every element seen in any run, highest score first, ties by path then value.

Link copied to clipboard
fun score(ef: Int, nf: Int, ep: Int): Long

ef / sqrt((ef + nf) * (ef + ep)) in micro-units, floored; 0 when the denominator is 0. Computed as isqrt(ef^2 * 10^12 / d), which equals floor(ef * 10^6 / sqrt(d)) because the floor of a square root of a floored quotient is the floor of the exact root.