Count of subsequences with sum two less than the array sum
Given an array vec[] of size N of non-negative integers. The task is to count the number of subsequences with the sum equal to S - 2 where S is the sum of all the elements of the array. Examples: Input: vec[] = {2, 0, 1, 2, 1}, N=5Output: 6Explanation: {2, 0, 1, 1}, {2, 1, 1}, {2, 0, 2}, {2, 2}, {0,