1. BOJ 1806 부분합 골드 4, 누적합, 투포인터 https://www.acmicpc.net/problem/1806 코드 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 import sys input = sys.stdin.readline N, S = map(int, input().split()) arr = list(map(int, input().split())) sum_value = 0 prefix_sum = [0] for i in arr: sum_value += i prefix_sum.append(sum_value) right, interval_sum, ans = 0, 0, 0 for left in range(N): while (prefix_..