pub fn bin_position1_5<S: Ord, T: Ord, U: Ord, V: Ord, W: Ord>(
    x: &[(S, T, U, V, W)],
    d: &S
) -> i32