Given $N$ real numbers $a_1,a_2,\ldots,a_N$. Consider a subsequence of $a$: $1 \leq s_1 < s_2 < \ldots < s_M \leq N$. Define $f(s) = \prod_{i=1}^{M} a_{s_i}$. Your task is to figure out the $K$-th largest value of $f(s)$ among all the $\binom{N}{M}$ subsequences of length $M$ (same values count multiple times).
It is known to all that multiplication of big numbers is troublesome. Therefore, we represent numbers in this format: first, a character '+', '-' or '0', indicating positive, negative, or zero respectively. If it's nonzero, then there follows a space and an integer in $[-10^9,+10^9]$, indicating the logarithm of the absolute value of this number to some fixed base which $\geq 1$.