배열이 두개면 matching으로 풀면된다. A+B = T -> T - A = B import sys input = sys.stdin.readline from collections import defaultdict T = int(input()) n = int(input()) arr_a = list(map(int, input().split())) check = defaultdict(int) for k in range(1, n+1): left = 0 s = 0 for right in range(n): s += arr_a[right] if right - left == k-1: check[T - s] += 1 s -= arr_a[left] left += 1 ans = 0 m = int(input()) arr_b..