When you do a dynamic memory allocation,
Code:
     map[1][0][0] = (int *)malloc(sizeof(int));
if you want to then use that memory location, you must dereference the pointer. What you're doing instead is just assigning a new pointer value (71, which is invalid) here:
Code:
     map[1][0][0] = 71;
If I change your code to use *map[1][0][0] every time you want to use the value of the memory location, it works.