[SDOI2019] lively and embarrassing party

Lively degree \ (P \) subgraph smallest degree, degree of embarrassment \ (Q \) constraints between independent set size, the
\ [\ begin {aligned} \ lfloor n / (p + 1) \ rfloor \ le q & \ rightarrow \ lceil (np- 1 + 1) / (p + 1) \ rceil \ le q \\ & \ rightarrow \ lceil (np) / (p + 1) \ rceil \ le q \\ & \ rightarrow ( np) / (p + 1) \ le q \\ & \ rightarrow np \ le pq + q \\ & \ rightarrow n <(p + 1) (q + 1) \ end {aligned} \]

Obviously \ (\ lfloor n / (q + 1) \ rfloor \ le p \) can be introduced in the same inequality.

Every time we choose the smallest degree from the point on the map, recording its degree \ (d_i \) and delete the neighboring \ (d_i \) points, and so forth to the point of no alternative, carries on the \ (q \ ) times, apparently

\[ \sum_{i=1}^q (d_i+1)=n \]

There is clearly a busy degree \ (P \) is $ \ max d_i $ scheme 1 , then
\ [(\ max d_i + 1 ) q \ ge \ sum_ {i = 1} ^ q (d_i + 1) = n \ rightarrow (\ max d_i + 1) (q + 1)> n \]

It is to meet the constraints.

God that ah God question, the code leaving the pit


  1. Provided at the point \ (X \) accessible to \ (\ max D_i \) , will be considered for deletion (X \) \ those points adjacent to their apparent degree \ (\ GE \ max D_i \) , so the program is the point \ (X \) and a \ (X \) adjacent to these points, the degree of excitement \ (P = \ max D_i \) .

Guess you like

Origin www.cnblogs.com/nosta/p/10990952.html