Haven't understand the code inside the main

please explain the code inside the main part

in main first we make
dynamic 2D array
and then take input from user

if you want to understand how we to make 2D array dynamically
please go through this link
i have recently reply to this


if find any doubt you can ask here as well

what is written in main(…)
please explain

if you are asking about sum-of-all-submatrices-of a given matrix implementation approach 2
in the main the code is
int n,m;
cin>>n>>m;
int *arr=new int[n];
for(int i=0;i<n;i++){
arr[i]=new int[m];
}
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
cin>>arr[i][j];
}
}

so

as i mention