That is exactly what my solution is doing. On Thu, Feb 24, 2011 at 5:09 PM, ashish agarwal < [email protected]> wrote:
> There must be another good solution..please let me know . > Thanks > > On Thu, Feb 24, 2011 at 5:09 PM, ashish agarwal < > [email protected]> wrote: > >> I think.. >> As like no are a,b,c,d,e >> so sum will be >> a+b,a+c,a+d,a+e,b+c,b+d,b+e,c+d,c+e,d+e; >> so maximuum value will be d+e which is last element of array given >> >> take last three value >> 1.c+d >> 2.c+e >> 3.d+e >> eq(1)-eq(2)=d-e; >> solving it with 3rd eq will give d and e >> and with these value we can get other values >> >> >> >> >> >> On Thu, Feb 24, 2011 at 2:52 AM, radha krishnan < >> [email protected]> wrote: >> >>> This s a topcoder problem :) >>> >>> On Wed, Feb 23, 2011 at 7:16 PM, bittu <[email protected]> >>> wrote: >>> > If pairwise sums of 'n' numbers are given in non-decreasing order >>> > identify the individual numbers. If the sum is corrupted print -1 >>> > Example: >>> > i/p: >>> > 4 5 7 10 12 13 >>> > >>> > o/p: >>> > 1 3 4 9 >>> > >>> > >>> > Thanks & Regards >>> > Shashank >>> > >>> > -- >>> > 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. >>> >>> >> > -- > 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.
