Multi-level marketing "legs" investment rule Multi-level marketing related challenge.
A peer wants to get rewarded. So it attracted N investors (N&gt;=1), each i-th investor invested x[i]. When a total sum exceeds threshold x[0]+x[1]+...+x[N-1] &gt;= T a peer could be rewarded. But only if a following conditions are satisfied:

Minimum amount of investors should be greater than M, (M&lt;=N)
For at least one integer k, where k&gt;=M and k&lt;=N, any k investors have to invest at least T/k each;

Given N, x[], T, M you should determine whether the peer's reward is generated or not (boolean result, &quot;yes&quot; or &quot;no&quot;). Shortest code wins.
Examples:

N=5; M=3; T=10000, in order to generate the peer's reward one of the following must be satisfied:

any 3 invested at least 3334 each
any 4 invested at least 2500 each
all 5 invested at least 2000 each


N=6; M=2; T=5000:

any 2 invested at least 2500 each
any 3 invested at least 1667 each
any 4 invested at least 1250 each
any 5 invested at least 1000 each
all 6 invested at least 834 each


generalized: for any k, where k&gt;=M and k&lt;=N:

any k of N investors invested at least T/k each


Test cases:
format:
N, x[], T, M -&gt; correct answer
6, [999, 999, 59, 0, 0, 0], 180, 3 -&gt; 0
6, [0, 60, 0, 60, 60, 0], 180, 3 -&gt; 1
6, [179, 89, 59, 44, 35, 29], 180, 3 -&gt; 0
6, [179, 89, 59, 44, 35, 30], 180, 3 -&gt; 1
6, [179, 89, 59, 44, 36, 29], 180, 3 -&gt; 1
6, [179, 90, 59, 44, 35, 29], 180, 3 -&gt; 0
6, [30, 30, 30, 30, 29, 30], 180, 3 -&gt; 0
6, [30, 30, 30, 30, 30, 30], 180, 3 -&gt; 1
Jelly, &nbsp;12&nbsp; 9 bytes

ṢṚ×J$ṫ⁵&lt;Ṃ


A full program which accepts x T M and prints 0 if the peer is rewarded and 1 if not.

Try it online!

How?

ṢṚ×J$ṫ⁵&lt;Ṃ - Main Link: list of numbers, x; number, T   e.g. [100, 50, 77, 22, 14, 45], 180
Ṣ         - sort x                                          [ 14, 22, 45, 50, 77,100]
 Ṛ        - reverse                                         [100, 77, 50, 45, 22, 14]
    $     - last two links as a monad:
   J      -   range of length                               [  1,  2,  3,  4,  5,  6]
  ×       -   multiply                                      [100,154,150,180,110, 84]
     ṫ    - tail from index:
      ⁵   -   5th argument (3rd input), M   (e.g. M=3)      [        150,180,110, 84]
       &lt;  - less than T?                                    [          1,  0,  1,  1]
        Ṃ - minimum                                         0