Language: C++

#include <iostream>
#include<cstdlib>
#include<queue>
#include<set>
#include<vector>
#include<stack>
#include<map>
#include<string>
#include<algorithm>
#include<cmath>
#include<cstdio>
using namespace std;
#define rep(i,a) for(int i=0;i<a;i++)
#define mp make_pair
#define pb push_back
#define P pair<int,int>
#define ll __int64
//#define __int64 long long

struct Mat{
	public:
	vector<vector<ll> >t;
	int g;//行
	int r;//列
	Mat(int a,int b){
		t.resize(a);
		for(int i=0;i<a;i++)t[i].resize(b);
		g=a;
		r=b;
	}

	Mat kakeru(Mat a,Mat b){
		if(a.r!=b.g)return Mat(0,0);//異常終了
		
		Mat ret(a.g,b.r);

		for(int i=0;i<a.g;i++){
			for(int j=0;j<b.r;j++){
				int tmp=0;
				for(int k=0;k<a.r;k++){
					tmp=tmp+a.t[i][k]*b.t[k][j];

				}
					cout<<i<<" "<<j<<endl;
				ret.t[i][j]=tmp;
			}
		}
		return ret;
	}

};



int n,m,l;

int main(){
	cin>>n>>m>>l;
	Mat a(n,m),b(m,l);	
	rep(i,n){
		rep(j,m)cin>>a.t[i][j];
	}
	
	rep(i,m){
		rep(j,l)cin>>b.t[i][j];
	}
	Mat c(n,l);

	c=c.kakeru(a,b);
	
	rep(i,n){
		rep(j,l){
			cout<<c.t[i][j];
			if(j<l-1)cout<<" ";
		}	
		cout<<endl;
	}
	
	return 0;
}



Compiler output:
a.cc:17:12: error: '__int64' was not declared in this scope; did you mean '__ynf64'?
   17 | #define ll __int64
      |            ^~~~~~~
a.cc:22:23: note: in expansion of macro 'll'
   22 |         vector<vector<ll> >t;
      |                       ^~
a.cc:22:25: error: template argument 1 is invalid
   22 |         vector<vector<ll> >t;
      |                         ^
a.cc:22:25: error: template argument 2 is invalid
a.cc:22:27: error: template argument 1 is invalid
   22 |         vector<vector<ll> >t;
      |                           ^
a.cc:22:27: error: template argument 2 is invalid
a.cc: In constructor 'Mat::Mat(int, int)':
a.cc:26:19: error: request for member 'resize' in '((Mat*)this)->Mat::t', which is of non-class type 'int'
   26 |                 t.resize(a);
      |                   ^~~~~~
a.cc:27:38: error: invalid types 'int[int]' for array subscript
   27 |                 for(int i=0;i<a;i++)t[i].resize(b);
      |                                      ^
a.cc: In member function 'Mat Mat::kakeru(Mat, Mat)':
a.cc:41:52: error: invalid types 'int[int]' for array subscript
   41 |                                         tmp=tmp+a.t[i][k]*b.t[k][j];
      |                                                    ^
a.cc:41:62: error: invalid types 'int[int]' for array subscript
   41 |                                         tmp=tmp+a.t[i][k]*b.t[k][j];
      |                                                              ^
a.cc:45:38: error: invalid types 'int[int]' for array subscript
   45 |                                 ret.t[i][j]=tmp;
      |                                      ^
a.cc: In function 'int main()':
a.cc:61:33: error: invalid types 'int[int]' for array subscript
   61 |                 rep(j,m)cin>>a.t[i][j];
      |                                 ^
a.cc:65:33: error: invalid types 'int[int]' for array subscript
   65 |                 rep(j,l)cin>>b.t[i][j];
      |                                 ^
a.cc:73:34: error: invalid types 'int[int]' for array subscript
   73 |                         cout<<c.t[i][j];
      |                                  ^