n_class = int(input()) weight_obj = [int(i) for i in input().strip().split(' ')] num_obj = [int(i) for i in input().strip().split(' ')] weight_set = set() weight_set.add(0) obj_weight = [] for i, num in enumerate(num_obj, 0):# 将所有的砝码按个展开到列表 for j in range(num): obj_weight.append(weight...