Is It Even?

아직 제출이 없습니다시간 제한1초메모리 제한1024 MB

문제

You are a leading programmer at CompanyTM, and have been given the following task. Given a list of NN integers x_1,,x_Nx\_1, \dots ,x\_N, is their product x_1x_2x_Nx\_1⋅x\_2⋅ \dots ⋅x\_N even? You plug away at the problem using every trick in the book, and come up with a very elegant solution. Lo and behold, your supervisor then informs you that the task has changed! It turns out the higher ups want you to find out if the product x_1x_2x_Nx\_1⋅x\_2⋅ \dots ⋅x\_N is divisible by 2K2^K for some integer K0K≥0.

You just can’t catch a break!

입력

The input consists of two integers N,KN,K (1N1000001≤N≤100000 and 0K10000≤K≤1000). These are followed by NN lines, each with a single value x_1,,x_Nx\_1, \dots ,x\_N respectively (1x_i1091≤x\_i≤10^9 for each 1iN1≤i≤N) which form the product.

출력

Display 1 if 2K2^K divides x_1x_2x_Nx\_1⋅x\_2⋅ \dots ⋅x\_N, otherwise display 0.