PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#QHD0000056. Liên minh cổ đông (Best Coalitions)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Liên minh cổ đông (Best Coalitions)

Best Coalitions

Source: UVa

Version: Phuoc Hung OJ Extended

Problem Statement

A company has nn shareholders. Shareholder ii owns exactly aia_i percent of the voting shares, represented using two digits after the decimal point. The percentages sum to exactly 100.00%100.00\%.

Under the company profit-sharing rule, a shareholder or a coalition receives the entire previous year's profit if it owns strictly more than 50%50\% of the shares. Shareholder xx (numbered from 11) must belong to the coalition. Each of the other shareholders may independently join or stay out.

Each winning coalition member receives profit in proportion to their share ownership within that coalition. The percentage of the company profit received by shareholder xx is 100ax100a_x divided by the sum of the coalition members' ownership percentages. Find the maximum percentage of profit for shareholder xx. A coalition owning exactly 50%50\% does not win; selecting all shareholders is always allowed.

Input

The first line contains integers n,xn,x. The next nn lines each contain aia_i, formatted with exactly two digits after the decimal point (for example 12.34). Shareholder indices start at 11.

Output

Print the maximum percentage of profit received by shareholder xx in a winning coalition, as a percentage with exactly two digits after the decimal point.

Subtasks

  • Subtask 1 (20 points): 1≤n≤101\le n\le10, 1≤x≤n1\le x\le n, every 0≤ai≤1000\le a_i\le100 has exactly two fractional digits, and ∑iai=100.00%\sum_i a_i=100.00\%.

  • Subtask 2 (30 points): 1≤n≤351\le n\le35, 1≤x≤n1\le x\le n, every 0≤ai≤1000\le a_i\le100 has exactly two fractional digits, and ∑iai=100.00%\sum_i a_i=100.00\%.

  • Subtask 3 (50 points): 1≤n≤1001\le n\le100, 1≤x≤n1\le x\le n, every 0≤ai≤1000\le a_i\le100 has exactly two fractional digits, and ∑iai=100.00%\sum_i a_i=100.00\%.

Examples

Input


3 1
40.00
20.00
40.00

Output


66.67

Explanation

Shareholder 11 owns 40%40\% and cannot win alone. Joining shareholder 22 (who owns 20%20\%) yields 60%60\% in total, so the profit share is 40/60⋅100=66.666…%40/60\cdot100=66.666\ldots\%, printed as 66.67. Joining shareholder 33 gives only 50.00%50.00\% relative power, while joining both gives 40.00%40.00\%. The first coalition is optimal.