read topcoder tutorial binary search...u will get an idea On Mon, Apr 4, 2011 at 4:38 PM, rajat ahuja <catch.rajatah...@gmail.com> wrote: > then please share wid me yaar > thanks in advance > > On Mon, Apr 4, 2011 at 4:30 PM, Manmeet Singh <mans.aus...@gmail.com> wrote: >> >> Simple Dp >> >> On Mon, Apr 4, 2011 at 3:33 PM, Munish Goyal <munish.go...@gmail.com> >> wrote: >>> >>> I think we can do it this way. >>> Sum(all boards length) / K = A ( tentative avg. lenght to be painted by >>> each painter) >>> Now start from B1, and keep going further till Bi, till Sum(B1-Bi) is >>> less than A. So this goes to painter P1. >>> Same way for P2, start from i+1 till j. >>> Condition: If i+1 itself is > A. Then new A = length(B i+1). >>> Keep going like this till Bn >>> >>> On Mon, Apr 4, 2011 at 3:20 PM, rajat ahuja <catch.rajatah...@gmail.com> >>> wrote: >>>> >>>> like u hav boards of length of length >>>> 7 2 6 9 4 and u hav 3 painters who can work ||ly >>>> so now >>>> one way to distribute is >>>> (7 )(2 6 9) (4) so time in ths case is 17 >>>> suppose we do (7 2)(6)(9 4) time in ths case is 13 >>>> or i can do (7 2)(6 9 )(4) time in ths case is 15 >>>> i m takin 1 unit time to paint one meter so it is directly equal to >>>> length >>>> >>>> >>>> so we hav to make time and ans is 13 >>>> >>>> On Mon, Apr 4, 2011 at 3:11 PM, Rakib Ansary Saikot >>>> <ansaryfantas...@gmail.com> wrote: >>>>> >>>>> I didnt quite get this problem. Sample case? >>>>> >>>>> On 4/4/11, rajat ahuja <catch.rajatah...@gmail.com> wrote: >>>>> > You have to paint N boards of length {B1, B2, B3… BN}. There are K >>>>> > painters >>>>> > available and you are also given how much time a painter takes to >>>>> > paint 1 >>>>> > unit of board. You have to get this job done as soon as possible >>>>> > under the >>>>> > constraints that any painter will only paint continuous sections of >>>>> > board, >>>>> > say board {2, 3, 4} or only board {1} or nothing but not board {2, 4, >>>>> > 5}. >>>>> > >>>>> > -- >>>>> > 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. >>>>> > >>>>> > >>>>> >>>>> -- >>>>> Sent from my mobile device >>>>> >>>>> -- >>>>> 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. >>> >>> >>> >>> -- >>> Munish >>> >>> -- >>> 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. > > -- > 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.