def cutnorm_sets(uis, vjs):
    """
    Generates the cutnorm sets from the rounded SDP solutions

    Args:
        uis: ndarray, (n+1, ) shaped array of rounded +- 1 solution
        vis: ndarray, (n+1, ) shaped array of rounded +- 1 solution
    Returns:
        (S, T) Reconstructed S and T sets that are {1, 0}^n

        S: Cutnorm set axis = 0

        T: Cutnorm set axis = 1
    """
    S = -1 * uis[-1] * uis[:-1]
    T = -1 * vjs[-1] * vjs[:-1]
    S = (S + 1) / 2
    T = (T + 1) / 2
    return S, T
