import sys n = input() m = list(map(int,input().split())) x = list(map(int,input().split())) ans = [0] #存储多少种重量的数组 for s,i in enumerate(m): # 拿出一种砝码 for _ in range(x[s]): # 这种砝码的数量 for j in range(len(ans)): #拿出这个砝码和之前的重量做加减,求出新的重量 if i + ans[j] not in ans: # 重量数不存在 放进集合 (砝...