A sharp bound on the Hausdorff dimension of the singular set of an n-uniform measure