def main(): N, V = map(int, input().split()) A = list(map(int, input().split())) Win = [False] * (1<>idx_A&1: v += a if v > V: Win[s] = win = True else: win = Win[s] if not win: for idx_A in range(N): if s>>idx_A&1: Win[s^1<