Help me in solving MATMULTIPLIC problem

My issue

code is correct according to me still cant run.

My code

#include <iostream>
using namespace std;

int main() {
	// your code goes here
	
	int m,n;
	cin>>m>>n;
	
	int arr1[m][n];
	for(int i =0 ;i<m;i++){
	    for (int j =0 ;j<n;j++){
	        cin>>arr1[i][j];
	    }
	}
	int p;
	cin>>p;
	int arr2[n][p];
	
	for(int i =0 ;i<n;i++){
	    for(int j =0 ;j<p;j++){
	        cin>>arr2[i][j];
	    }
	}
	
	int result[m][p] = {0};
	for(int i =0 ;i<m;i++){
	    for(int j =0;j<p;j++){
	        for(int k =0 ;k<n;k++){
	            result[i][j] += arr1[i][k]*arr2[k][j];
	        }
	    }
	}
	
	for (int i =0 ;i<m;i++){
	    for(int j =0;j<p;j++){
	        cout<<result[i][j]<<" ";
	    }
	    cout<<endl;
	}

}

Learning course: Data structures & Algorithms lab
Problem Link: https://www.codechef.com/learn/course/muj-aiml-dsa-c/MUJADSAC09/problems/MATMULTIPLIC