http://www.spoj.com/problems/AMR10D/

A number is a multiple of 11, when its digits are given alternate signs 
(starting with positive from right) and added w.r.t the signs gives a 
number modulo 11.

The question is asking to partition the given numbers into two groups say 
S1 and S2 such that the difference between their cardinalities is minimum 
and
(sum of all elements in S1) - (sum of all elements in S2) is divisible by 
11.

The question looks like dp. 

d( i , c, s') = 1 if there exists a subset S of {a1,a2,...ai} such that 
elements of S sum to s' and S has cardinality c.

A state like this will increase the running time.

Please help.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to algogeeks+unsubscr...@googlegroups.com.

Reply via email to