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: Median
Description Given X-_{i} X∣ (1 ≤_{j} i ＜ j ≤ N). We can get C(N,2) differences through this work, and now your task is to find the median of the differences as quickly as you can!Note in this problem, the median is defined as the Input The input consists of several test cases. X≤ 1,000,000,000 3 ≤ N ≤ 1,00,000 )_{i }Output For each test case, output the median in a separate line. Sample Input 4 1 3 2 4 3 1 10 2 Sample Output 1 8 Source |

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

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

Any problem, Please Contact Administrator