A compound represented by the following general formula (1), wherein Ar1, Ar2, L1, and p are as defined in the description, and A is a group represented by formula (2), wherein HAr2, m, n, L2, and * are as defined in the description, and HAr1 is a group represented by formula (3), wherein Y1, X1 to X8, *a, and ** are as defined in the description, an organic electroluminescent device containing the compound, and an electronic device including the organic electroluminescent device.