[SDOI 2019] noisy party with awkward explanations party

Vegetables ah, will not do, but speak very good wyz


Description meaning of the questions: Given an undirected no right chart, asked to find a sub-graph so that all points on the degree of sub-graph> = p, then find a sub-graph such that all points on this sub-graphs are not directly to each other even edges, points to q. Requirements: $ \ lfloor \ frac {n} {p + 1} \ rfloor \ leq q $ and $ \ lfloor \ frac {n} {q + 1} \ rfloor \ leq p $, any qualified output program number

Data range: $ n \ leq 10 ^ 4, m \ leq 10 ^ 5 $

This title is divided into two parts, the natural approach is also considered in two parts, the first part considering p


wyz: dichotomous questions to do more one can see half

We continue dichotomy p, then check it can construct a subgraph meet current conditions, so find a minimum of p

Because the first and second portions are independent of each other, there are $ \ lfloor \ frac {n} {p + 1} \ rfloor \ leq q $, is clearly smaller when p q larger space left, the more easy to solving the second portion of the rear

Guess you like

Origin www.cnblogs.com/Chiaro/p/problem-renaodejuhui.html