import sys input = sys.stdin.readline N, K = map(int, input().split()) A = list(map(int, input().split())) A.sort(reverse=True) dp = [0 for _ in range(1<