Python代码: mylist=[] try: while True: i=[int(x) for x in raw_input().split()] mylist.append(i) if i == "": break except: pass num=mylist[1] m=mylist[0][0] def func(m,num): if sum(num)<2*m: return -1 else: M=[] ...