from typing import Sequence


def get_hiou(A: Sequence, B: Sequence) -> float:
    """ Horizontal intersection over union
    Expect A and B to be xyxy bboxes
    """
    h_inter = max(0, min(A[2], B[2]) - max(A[0], B[0]))
    viou = h_inter / float(A[2] - A[0] + B[2] - B[0] - h_inter)
    return viou