MATLAB: Changing Matrix value at odd position of row with reference to a certain column

MATLABmatrix arraymatrix manipulation

I was just wondering is there any elegant solution to make those '1 0 0 0 0' become ' 0 0 0 0 0' and '1 1 1 0 0' become '1 0 0 0 0'?
I might need to consider N number of matrices so a general solution instead of fixed solution will be helpful. Thanks.
Input Matrix
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
1 1 1 0 0
1 1 1 0 0
1 0 0 0 0
1 0 0 0 0
1 0 0 0 0
1 0 0 0 0
1 0 0 0 0
1 0 0 0 0
1 0 0 0 0
1 0 0 0 0
1 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
Desired Output Matrix
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
1 0 0 0 0
1 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0

Best Answer

A=[0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
1 1 1 0 0
1 1 1 0 0
1 0 0 0 0
1 0 0 0 0
1 0 0 0 0
1 0 0 0 0
1 0 0 0 0
1 0 0 0 0
1 0 0 0 0
1 0 0 0 0
1 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0];
B = zeros(size(A));
B(:,1) = ismember(A,[1,1,1,0,0],'rows');
or
B = zeros(size(A));
B(:,1) = sum(A,2) > 1;