Carry out LU-decomposition for A and put the decomposed matrix into M implementation of Crout's method with partial pivoting.
n*N matrix