ACM summary fifteen

In doing problems found, the most critical part of the two types of binary search problem is to find a function continuous function and validation criteria. Solutions function is to verify condition with the current state of the target solution is compared (or solution is determined using the current state of eligibility). Continuous re-lookup function to determine movement of the boundary conditions in accordance with the return value of the function authentication. Like the subject was given two parameters determine the maximum or minimum requirements, such as n k network cable section was cut into required lengths may be cut up. Where n and k are parameters determined maximum length is the amount of intercession. Using a continuous function lookup function to apply verification highest efficiency. Also with a little skill but also down for some number of decimal maintain accuracy in the calculation process can first take the n-th power times ten, in addition to the power of n times in the last ten, so calculation accuracy greatly improved.

Guess you like

Origin blog.csdn.net/qq_43515378/article/details/89741606