Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Help with assignment

  1. #1
    Junior Member
    Join Date
    Mar 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help with assignment

    The ex given n ( number of problems), L (time of one day) , C ( a cont to calculate thi DIs).
    The input given us n, L, C, and an timeArr[] included the time need to solve the problem i.
    For example.
    The input
    10
    120 10
    80 80 10 50 30 20 40 30 120 100
    That mean we have n=10 prolble have to solve, L=120, C=10, and an array mean , we need 80 time to solve problem 1, 80 to solve probem 2, 10 to solve problem 3....
    All the problem need to solve step by step
    We need to find out the shortest day to solve all the problem and the DI must be minumun.
    The DI is the rest time of one day...
    lớp bằng giá trị DI như sau:
    DI=0 when t=0
    DI=-C when 1<=t<=10
    DI=(t-10)^2 when t>10
    t = the rest time of one day.

    In that example, we must calculate that need minimux 6 day to solve all the problem, and group that (80) (80) (10,50,30) (20,40,30) (120) (100)
    t1=120-80=40
    t2=120-80=40
    t3=120-10-50-30=30
    .....

    So the result of this example is 6 day and minDI is 2700.

    ================================================== ====================================
    I could not have any algorthym for this ...
    Can you help me!!!!
    Thanks alot


  2. #2
    Member Zyrion's Avatar
    Join Date
    Feb 2013
    Location
    Iowa
    Posts
    106
    My Mood
    Angelic
    Thanks
    2
    Thanked 8 Times in 8 Posts

    Default Re: Help with assignment

    Show what code you have done so for. Make sure to put it in code tags as well.

    [C0DE=java]
    <code here>
    [/CODE]

  3. #3
    Member Chris.Brown.SPE's Avatar
    Join Date
    May 2008
    Location
    Fort Wayne, Indiana
    Posts
    190
    Thanks
    1
    Thanked 31 Times in 31 Posts

    Default Re: Help with assignment

    This is a repost!!!

    REPOST
    Writing code is your job, helping you fix and understand it is mine.

    <-- Be sure to thank and REP (Star icon) those who have helped you. They appreciate it!

Similar Threads

  1. Looking for help with assignment
    By n00bprogrammer in forum What's Wrong With My Code?
    Replies: 1
    Last Post: October 18th, 2011, 05:38 PM
  2. assignment troubles polymorphism (guide for assignment included)
    By tdawg422 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: October 8th, 2011, 10:01 AM
  3. Help with assignment
    By NPVinny in forum What's Wrong With My Code?
    Replies: 12
    Last Post: July 3rd, 2010, 05:31 PM
  4. please help me in my assignment :(
    By asdfg in forum What's Wrong With My Code?
    Replies: 5
    Last Post: May 18th, 2010, 07:59 AM
  5. Replies: 1
    Last Post: February 22nd, 2010, 08:20 AM