iDealller @ 2019-12-14 21:20:48
list1 = input().split(' ') list2 = input().split(' ') n, s, a, b = int(list1[0]), int(list1[1]), int(list2[0]), int(list2[1]) listEnd, sum0 = [], 0
for i in range(n): list0 = input().split(' ') if a + b >= int(list0[0]): listEnd.append(list0) listEnd = sorted(listEnd, key=lambda x: x[1])
for j in listEnd: s -= int(j[1]) if s >= 0: sum0 += 1 else: break print(sum0)
by zzx0826 @ 2019-12-14 21:27:06
希望更丰富的展现?请使用
by USSENTERPRISE @ 2019-12-14 21:42:32
@iDealller
您可以用如下格式排版,这样可让其他人更愿意调试您的代码
```cpp
(这里放您的代码)