class Matrix
{
private:
	std::vector<std::vector<T>> mat;

public:
	Matrix(){};
	~Matrix(){};

	Matrix(int rows, int collums){
		mat.resize(rows);
		for (auto &row : mat)
			row.resize(collums);
	}
	std::vector<T>& operator[] (unsigned int i) { return mat[i]; }
	const std::vector<T>& operator[] (unsigned int i) const { return mat[i]; }
	Matrix<T> operator*(const Matrix<T>& second) const {
		if (this->nCol() == second.nRows()){
			unsigned int nMax = this->nCol();
			Matrix<T> tmp(this->nRows(), second.nCol());

			for (unsigned int r = 0; r < tmp.nRows(); ++r){
				for (unsigned int c = 0; c < tmp.nCol(); ++c){
					for (unsigned int n = 0; n < nMax; ++n){
						tmp[r][c] += this->operator[](r).at(n) * second[n].at(c);//<- я у мамы кодер.
					}
				}

			}
			return tmp;
		}
		else
			return Matrix<T>(0, 0);

	}