let answer = 0;
const dfs = (numbers, target, sum, cnt) => {
if (cnt === numbers.length) {
if (sum === target) answer++;
return;
}
dfs(numbers, target, sum + numbers[cnt], cnt + 1);
dfs(numbers, target, sum - numbers[cnt], cnt + 1);
};
function solution(numbers, target) {
dfs(numbers, target, numbers[0], 1);
dfs(numbers, target, -numbers[0], 1);
return answer;
}