Note that there are some explanatory texts on larger screens.

plurals
  1. POJob Scheduling Problem in Java
    primarykey
    data
    text
    <p>I am writing a problem to solve Job schedules but I am having a hard time understanding how.</p> <p>The Wood Shop has a backlog of orders for its world famous rocking chair (1 chair per order). There are several steps involved in making a handmade Baber Rocking chair (eg. cutting wood pieces, assembly, sanding, applying a stain, and applying varnish). </p> <p>The total time required to make a chair is 1 week. However, since the chairs are sold in different regions and various markets, the amount of profit for each order may differ. In addition, there is a deadline associated with each order. The company will only earn a profit if they meet the deadline; otherwise, the profit is 0.</p> <p>Write a program that will determine an optimal schedule for the orders that will maximize profit. The input file will contain one or more test cases. The first line in a test case will contain an integer, n (0 n 1000), that represents the number of orders that are pending. </p> <p>A value of 0 for n indicates the end of the input file. The next n lines contain 3 positive integers each. The first integer, i, is an order number. </p> <p>All order numbers for a given test case are unique. The second integer represents the number of weeks from now until the deadline for i th order. The third integer represents the amount of profit that the company will earn if the deadline is met for the i th order.</p> <p><strong>What I am asking for is an algorithm of how I should go about solving this problem.</strong></p> <p>For each test case in the input file, the output file should output a line that reports the amount of profit that results from completing the orders in an optimal order.</p> <pre><code>Example Input File (sched.in) 7 1 3 40 2 1 35 3 1 30 4 3 25 5 1 20 6 3 15 7 2 10 4 3054 2 30 4099 1 35 3059 2 25 2098 1 40 0 Example Output File (sched.out) 100 70 </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload