A=(a1, a2,.. aN}- set of n numbers elements- (positive integers) must be divided into K subsets in order to sums of all elements in each subset were equal to m=(a1+a2+..+an)/K.
Algorithm must count ALL such cases for A. If it’s impossible to divided set A program generates „IMPOSSIBLE”
for example:
A={a1,a2,a3,a4}={5,4,6,5}
K=2
m=(5+4+6+5)/2=10
Divided set: {(5,5),(4,6)}, 5+5=4+6
Input:
5 4 6 5
2
Output:
1
Thanks for HELP
Bkac