in the sorted array, if suppose fr[i].start==fr[i+1].start then u only
consider a cut at f[i+1] (that means ith fruit is also cut with the (i+1)th
fruit.
Thus u keep on incrementing the sorted array until u find sm j s.t.
f[j].start!=f[j+1].start

Then u check for the condition :

dp[i]=max(dp[i],dp[j-1]+match);


On Thu, Feb 28, 2013 at 8:20 PM, marti <[email protected]> wrote:

> Please reply ...what changes?
>
>
> On Thursday, January 24, 2013 1:35:38 PM UTC+5:30, emmy wrote:
>
>> please help me with the following problem:
>> http://www.spoj.com/problems/**JUICE/<http://www.spoj.com/problems/JUICE/>
>>
>> bit mask will require very large memory.
>> If I sort the intervals in decreasing order of their start time.. I still
>> cant make it to a dp
>> If I sort the intervals in decreasing order of their finish times I am
>> still not getting a recurrence for dp that is valid
>> If I convert this to an interval graph, I have to find the maximum number
>> of vertices that can be included in some clique of size >=3. But this also
>> seems like a brute force approach.
>>
>> Which approach to try?? 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 [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to