Solution (source code)

= Solution

Let $D$ be an <effective divisor> <linearly equivalent> to $C$. If $C$ were not a component of $D$, all <intersection multiplicities> between its components and $C$ would be nonnegative, contradicting $D\cdot C=C^2<0$. Hence $D=C+D'$ with $D'$ effective and <linearly equivalent> to zero. For an <ample divisor> $H$, this gives $H\cdot D'=0$. Positivity of $H$ on every irreducible component of a nonzero effective divisor forces $D'=0$. Therefore $\boxed{D=C}$, illustrating the <rigidity of a negative curve>.