Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|

Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |

Language: Approximations
Description For any decimal fraction, we can obtain a set of approximations of different accuracy by mean of rounding. Take 0.2503 for example, we have the following approximations: - 0.2503
- 0.250
- 0.25
- 0.3
- 0.
If two fractions Given i ≤ N) in the range [0, 0.5), find a fraction x that maximizes the sum of −log_{10} (the accuracy of the MACA of A and _{i}x). Report that maximized sum.Input The first line contains one integer N decimal fractions doesn't exceed 400000. There is always a radix point, so zero is "0." instead of "0".Output One integer, the maximized sum. Sample Input 4 0.250 0.2506 0.25115 0.2597 Sample Output 11 Hint x = 0.25115.Source POJ Monthly--2007.11.25, Yang Yi |

[Submit] [Go Back] [Status] [Discuss]

All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di

Any problem, Please Contact Administrator