Editorial for Mock CCC '18 Contest 1 J3/S1 - A Math Problem
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
Author:
If we start by evaluating , then , and so on, we note that might be decreasing but eventually starts increasing. We note that increases by every time increases by , but eventually will not decrease quickly enough to offset.
The intended solution is therefore to increase until and report .
The most common pitfall observed in solutions was contestants not following instructions and printing out the value to an incorrect number of decimal places.
It is possible to use calculus or other techniques to directly evaluate the minimum, but those were not necessary to solve this problem.
Comments
take derivative
Use Am-Gm!
MX + KP/M >= 2 math.sqrt(XPM)
I hope I'm allowed to say this... After-all, this page is for people who are stuck.
Couldn't we use a little calculus to find the minimum, and then simply check the integers above and below?
That's what I did, try it for yourself and see what happens!