← Back to List

28417번: 스케이트보드 ↗

Solutions

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

ans = 0

for i in range(n):
    l = [*map(int, input().split())]
    ans = max(ans, max(l[0:2]) + sum(sorted(l[2:])[-2:]))
print(ans)