A general gap theorem for submanifolds with parallel mean curvature in Rn+p