function C = conflictsM(X)

%%returns the number of conflicts for the n-queen problem where X
%%is a matrix and each row represents an initial state. For each initial 
%%state each element represents the positions of the queens on the 
%%checkboard. C is a column vector where every row is the number of
%%conflicts for the corresponding row of X 

k = size(X,1);
C = zeros(k,1)
for r=1:k
    C(r) = conflicts(X(r,:));
end
