Comments

.

In the editorial for C:

If after this process there are at least k connected components, then the condition is satisfied for this x , otherwise it is not.

Shouldn't it be k+1 connected components since we are removing k edges.