MZOJ # 82 presidential election

analysis

Part 1 template problems

Template title optimal ratio spanning tree, 01 planning

but!

He often card

So, the children obediently write it Dinkelbach 

Part 2 01 scores planning

Welcome to visit my Blog: 01 points plan

Part 3 minimum

Our request is

The minimum value of R, (x [i] [j] is selected if the representative of this edge)

Transposition transform a little bit, it becomes:

As can be seen, when R decreases, the value of the expression to the left increases.

If the R value for a certain determined value of the left side is smaller than 0;

It means that there is a smaller value of R is closer to the left to make expression 0

In this way, we can increase the value of R validate again until you find the minimum R-value up

 

Guess you like

Origin www.cnblogs.com/Mandy-H-Y/p/11482144.html