Code: Select all
Every answer will obey the formula
fabs(ans*1e3 - floor(ans*1e3) - 0.5) > 1e-2
Anyway, is there any tricky input except the some input value = 0?
I think I have handles these cases correctly, but still WA
Moderator: Board moderators
Code: Select all
Every answer will obey the formula
fabs(ans*1e3 - floor(ans*1e3) - 0.5) > 1e-2
Here ans means the exact answer. The formula says the following:.. wrote:What does this statement mean?If "ans" means the value rounded to 3 decimals, then the formula can't be obeyed as "ans" is already rounded, ans*1e3 is an integer......Code: Select all
Every answer will obey the formula fabs(ans*1e3 - floor(ans*1e3) - 0.5) > 1e-2
Care to explain your algorithm instead? I've got AC, but I'm unaware of any too special cases... wrote:Anyway, is there any tricky input except the some input value = 0?
I think I have handles these cases correctly, but still WA
Tha algorithm is the normal thing: Max. flow + bisection.misof wrote: Care to explain your algorithm instead? I've got AC, but I'm unaware of any too special cases.
Code: Select all
at last it finds minimum such distance where flow>=m-k or find that it is not possible...