← Back to List

25972번: 도미노 무너트리기 ↗

Solutions

PyPy3
215 B | 215 chars
n = int(input())

l = [[*map(int, input().split())] for i in range(n)]
chk = [False] * n
l.sort(key=lambda t : t[0])

crt = -100000
ans = 0

for x, l in l:
    if x > crt:
        ans += 1
    crt = x + l
print(ans)