#include
vector<vector> matrixMultiply(vector<vector>& array1, vector<vector>& array2) {
int row1 = array1.size(), col1 = array1[0].size();
int row2 = array2.size(), col2 = array2[0].size();
vector<vector> res(row1, vector(col2, 0));
if(col1 != row2)
return res;
else{
for(int i = 0; i < row1; i++){
for(int j = 0; j < col2; j++){
int temp = 0;
for(int k = 0; k<col1; k++){
temp += array1[i][k] * array2[k][j];
}
res[i][j] = temp;
}
}
return res;
}