ABC131 D - Megalomania
https://atcoder.jp/contests/abc131/tasks/abc131_d
提出
code: python
n = int(input())
ab = list(map(int, input().split())) for _ in range(n)
time = 0
ab.sort(key=lambda x:x1)
for i in ab:
time += i0
if (time > i1):
print("No")
exit()
print("Yes")