| IME++ Starters Try-Outs 2025 |
|---|
| Finished |
The military command structure at the Institute of Many Experts (also known as IME) is one of the most renowned in its neighborhood! As such, the people that compose it must also maintain quite a high level of intellectuality, but since it's been over twenty years since they've been in power, it's time for a change! Luckily, since you're really good at doing computer stuff, the old guard has chosen you to help them figure out how to do it.
They give you the following information: there are $$$n$$$ colonels to choose from, and the command is composed of $$$k$$$ highly specialized people. In addition to this, you receive the IQ values from each of these $$$n$$$ colonels, as there's a special restriction to maintain this high standard: the sum of the IQs of the $$$k$$$ chosen colonels must not exceed $$$100$$$. Because of this, there are many ways to choose these $$$n$$$ colonels, and the current commander becomes too numb from the options to figure out what to do. As such, you're now tasked to figure out how many ways you can choose the $$$k$$$ colonels that fit the criteria. Note that due to their mental prowess, some may have negative IQ values!
Such are the inner-workings of someone part of the command. The first line contains two integers, $$$n$$$, $$$k$$$, $$$(1 \leq n \leq 66)$$$, $$$(1 \leq k \leq n)$$$ — the amount of colonels to choose from and the size of the command structure.
The second line contains $$$n$$$ integers $$$(a_1, a_2, ..., a_n)$$$ $$$(-100 \leq a_i \leq 100)$$$ — the IQ of the $$$i^{th}$$$ colonel.
Output a single integer: the amount of ways to choose the $$$k$$$ colonels!
10 530 40 -10 23 58 29 44 -100 -70 10
200
7 3-100 -100 -100 -100 -100 -100 -100
35
| Name |
|---|


