Subset AND

You are given an array A of n integers and an integer k. You need to find if there is any non-empty subset in the array such that the bitwise AND of all integers in the subset is less than k or not.

This is a companion discussion topic for the original entry at