Hardness is the ability of a substance to withstand the pressure applied on it to deform it.
In the given situation, to pierce a nail into the board made of material C, the nail must be made of a material harder than material C.
From the given data, materials D and E are harder than C. So, the nails made from material D and E can be used.