if it is spoj -tug  , then the problem gets reduced to knapsack dp
which is used for subset sum calculation :) since u just have to print
"yes" or "no" break once the sum count becomes '2' for some sum.

On 7/30/11, Amol Sharma <amolsharm...@gmail.com> wrote:
> @saurabh- your algo has very high probability of failure
>
> take the case  9,7,8,4,3,1
>
> acc to ur algo
> group 1 is  9,8,3  strength =20
> group 2 is  7,4,2  strength =13
>
> but it is possible to divide them into 2 equal grp's
> take
> G1 - 9,4,3  total =16
> G2 - 7,8,1  total =16
>
> so we have to think of some better algo
> --
>
>
> Amol Sharma
> Third Year Student
> Computer Science and Engineering
> MNNIT Allahabad
>
>
>
>
> On Sat, Jul 30, 2011 at 5:51 PM, shubham <shubh2...@gmail.com> wrote:
>
>> hey sylvester,
>> just clarify the problem ..
>>
>> Is it such that in forming the group some people can be left out
>> or
>> the sum of the number of people in both partitions is equal to the total
>> number of people
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/algogeeks/-/gVAGoc_nYhAJ.
>>
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to