wat if you had to divide the array in 'n' groups ... and the difference in the number of members in any 2 groups should not be more than '1'. the difference between their cumulative strengths is to be minimized ...
On Sat, Jul 30, 2011 at 4:50 PM, Prashant Gupta <[email protected]>wrote: > Its NP problem. :-| > > > On Sat, Jul 30, 2011 at 4:14 PM, saurabh singh <[email protected]>wrote: > >> Its the same as we divide teams.Pick the Largest in one and second largest >> in other,then putting the remaining best player to the team which is weaker. >> the weakest get selected last.if the teams are not equal strength not >> possible else possible. >> >> PS:I dont know whethr this algorithm will work.This solution is based >> completely on my experiences of playing cricket,:) >> >> >> On Sat, Jul 30, 2011 at 3:15 PM, shady <[email protected]> wrote: >> >>> equivalent to 2 set partition... >>> >>> >>> On Sat, Jul 30, 2011 at 3:14 PM, sylvester <[email protected]> wrote: >>> >>>> input consists of N integers, separated by a space. The ith integer >>>> indicates the strength of the ith person. >>>> For each case, output "YES" if it is possible to pick some people from >>>> the group and separate into two teams of equal strengths else "NO" >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Algorithm Geeks" group. >>>> To post to this group, send email to [email protected]. >>>> To unsubscribe from this group, send email to >>>> [email protected]. >>>> 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 [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]. >>> For more options, visit this group at >>> http://groups.google.com/group/algogeeks?hl=en. >>> >> >> >> >> -- >> Saurabh Singh >> B.Tech (Computer Science) >> MNNIT ALLAHABAD >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> > > > > -- > Prashant Gupta > B.Tech Final Year > Computer Science and Engineering > NIT Trichy > Phone : +91 9894462744 > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
