Given there is a H by W, 2d array x and a 1d array y of length H which specifies each row of x
H
W
x
y