Find index k in boolean matrix where kth row has all 0s and kth column has all 1s