@ All,
The multiplication of the polynomial need to be done using FFT  becoz
it will take O(nlog n) where n is the number of elements in the set.

For  finding the triplet we need to have a equation of the form :
f(x) ^3  + af(x)^2 + b f(x) . U need to to find the cofficient of a
and b  where f(x)  is the polynomial formed from the elements in he
given . This method will suffice the time limit with n<= 40000 .

On 12/17/11, Karthikeyan V.B <kartmu...@gmail.com> wrote:
> Hi,
>
> Actually i m sorry since i didn explain the algo fully
>
> i checked with the code  the o/p is:
>
> run:
> 6:1
> 7:0
> 8:1
> 9:2
> 10:2
> 11:1
> 12:1
> 13:1
> 14:1
>
>
> where sum 9 has two triplets
>
> so,totally (1+0+1+2+2+1+1+1+1=10)
>
>
> Regards,
> KARTHIKEYAN.V.B
> PSG TECH
> CBE
>
> --
> 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.
>
>


-- 
Somnath Singh

-- 
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