Submit solution

Points:
3 (partial)

Time limit:
1.0s

Memory limit:
16M

Author:

Problem type

Allowed languages

Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, ~~CommonLisp~~, D, Dart, F#, Forth, Fortran, Go, ~~Groovy~~, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, ~~Nim~~, ~~ObjC~~, OCaml, ~~Octave~~, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

The World Trade Foundation has denominations of coins, where is a multiple of for . The WTF wishes to perform a transaction that costs exactly Quunar (the local currency). Because they value efficiency over all else, determine the minimum number of coins they need to get exactly Quunar, or print `-1`

if this is not possible.

#### Constraints

It is guaranteed that is a multiple of .

#### Input Specification

On the first line, there are two space-separated integers, .

The next line contains space-separated integers, , the values of the coins (in Quunar).

#### Output Specification

On one line, output the minimum number of coins needed to make a sum of exactly Quunar or print `-1`

if this is not possible.

#### Sample Input

```
3 10
1 2 4
```

#### Sample Output

`3`

#### Sample Input 2

```
5 263
1 5 10 50 100
```

#### Sample Output 2

`7`

#### Sample Input 3

```
3 7
2 6 12
```

#### Sample Output 3

`-1`

## Comments

World Trade Foundation = WTF ?????