Seems like a complicated crazy thing to do, but I'm sure it's well within your capabilities especially if I give you these useful hints:
a33 = (A==33) % Map of where 33's occur.
% Get a vector of which rows have 33.
rowsWith33 = any(a33, 2)
I think you should be able to handle it from there. You might also want to learn about ind2subs(), subs2ind(), find(), and linear indexing for alternative ways to approach it. Write back if you can't figure it out from here.