Subset Product Matching
Given an array of integers and a target product value, count the number of non-empty subsets of the array whose product equals the target.
Input
The first line contains n (1 ≤ n ≤ 15).
The second line contains n integers a_1, a_2, ..., a_n (-10^6 ≤ a_i ≤ 10^6).
The third line contains the target product t (-10^18 ≤ t ≤ 10^18).
Output
Print the number of non-empty subsets whose product equals t.
Notes
A subset is any non-empty collection of distinct array indices. The product of an empty subset is conventionally 1 (not counted here). Two subsets with different index sets are different, even if they produce the same elements.