[백준] 7453번 - 합이 0인 네 정수 (파이썬)
# 합이 0인 네 정수 import sys input = sys.stdin.readline N = int(input()) A, B, C, D = [], [], [], [] for _ in range(N): a, b, c, d = map(int, input().split()) A.append(a) B.append(b) C.append(c) D.append(d) AandB = [] for a in A: for b in B: AandB.append(a+b) AandB.sort() CandD = [] for c in C: for d in D: CandD.append(c+d) CandD.sort() result = 0 left, right = 0, len(CandD)-1 sum = 0 while 0 0: righ..
2022. 2. 5.