This is more like a record than an explanation#
P8817#
-
For a graph with edge weights of 1, BFS can achieve O(n)
-
a and d can be easily determined, so determine them first
P8818#
- Classification discussion
P8819#
-
The conditions for counterattacks can be transformed into all points having an out-degree of 1
-
Out-degree is difficult to maintain, transform it into in-degree
-
In-degree can only satisfy necessity, but cannot satisfy sufficiency—randomness (understand through the solution)