Cargo Container Packing in a Globalized World#7947

Cargo Container Packing in a Globalized World

1 sekunt
128 megabaýt
Örän kyn

In the fast-paced world of global logistics, efficient space optimization is critical. You are tasked with filling a large cargo container using items from a warehouse. There is an unlimited supply of items of each type.

The new rules are:

It's not easy to satisfy these requirements! Fortunately, you can write a program to help determine whether or not you can completely fill the container given the available item sizes.

Giriş

The first line contains two integers n~(1 \le n \le 20) and k~(1 \le k \le 10^{18}), where is the number of different item types and is the capacity of your cargo container.

The second line contains integers g_1, ..., g_n~(1 \le g_i \le 10^3 for all 1 \le i \le n), where g_1, ..., g_n are the sizes of the item types.

Çykyş

Output "possible" if it is possible to fill your cargo container exactly using the available item sizes. Otherwise, output "impossible".

Mysallar

1-nji mysal

Loading
Loading

2-nji mysal

Loading
Loading