Solution (source code)

= Solution

Outside a defect core write
$$
\mathbf p=p_0(\cos\theta,\sin\theta).
$$
Around any closed curve on which $\mathbf p\ne0$, its <topological charge> is the <winding number>
$$
\boxed{
q=\frac1{2\pi}\oint d\theta
}.
$$
Single-valued polar order requires $q\in\mathbb Z$. A nonzero value prevents the field inside the loop from being continuously deformed to a uniform nonvanishing field, so the core must contain a zero or singularity.