1940번: 주몽https://www.acmicpc.net/problem/1940import sysinput = sys.stdin.readlineN = int(input())M = int(input())arr = list(map(int,input().split()))arr.sort() #리스트만 가능. 원본 리스트 자체가 정렬.start_idx = 0end_idx = N - 1count = 0current_sum = 0while start_idx 배열이 오름차순으로 정렬되어 있다는 사실을 이용. 가장 작은 값(왼쪽 끝)과 가장 큰 값(오른쪽 끝)을 선택한 상태에서 시작. 두 수의 합이 타겟(M)보다 작다면?현재 선택할 수 있는 '가장 큰 값'을 더했는데도 목표치에 도달하지 못함. 합을 키우려면 작은 쪽의..