int main(){
int ***p;
int i,j,k;
p = new int **[2];
for (int i = 0; i <2 ; i++) {
p[i]=new int *[3];
for (int j = 0; j <3 ; j++) {
p[i][j]=new int [4];
}
}
for (int i = 0; i <2 ; i++) {
for (int j = 0; j <3 ; j++) {
for (int k = 0; k <4 ; k++) {
p[i][j][k]=i+j+k;
cout<<p[i][j][k]<<" ";
}
cout<<endl;
}
cout<<endl;
}
for (int i = 0; i <2 ; i++) {
for (int j = 0; j <3 ; j++) {
delete [] p[i][j];
}
}
for (int i = 0; i < 2; i++) {
delete [] p[i];
}
delete [] p;
return 0;
}