| ||||||||||
Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Announcement | Current Contest Past Contests Scheduled Contests Award Contest |
Median of Lines
Description In the Cartesian plane, there are n (odd) distinct lines fi(x) = ai + xbi (i = 1, 2, ¡, n). For each x, F(x) denotes the median of {f1(x), f2(x), ..., fn(x)}. You are required to find the solution space of the equation F(x) = 0. Input The input contains multiple test cases. Each test case have n + 1 lines the first one of which contains n (1 < n < 105 and odd). Then n lines follow, each of which contains two integers ai and bi (|ai| ¡Ü 108, 0 ¡Ü bi < 108). A zero follows the last test case. Output Sample Input Sample Output Hint Be cautious about outputting ¡° Illustration of the second test case in the sample input: Source |
[Submit] [Go Back] [Status] [Discuss]
All Rights Reserved 2003-2006 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator