백준 22988. 재활용 캠페인
·
백준
https://www.acmicpc.net/problem/22988n, x = map(int,input().split())arr = sorted(list(map(int,input().split())))cnt = 0s = 0e = n-1rest = 0while s e 일 떄 멈춘다는 뜻 if arr[e] == x: cnt += 1 e -= 1 continue if s == e: rest += 1 break # 이제 탐색 끝났으니 빠져나오기 if arr[s] + arr[e] >= x/2: cnt += 1 s += 1 e -= 1 else: rest += 1 s ..