our requirement is - is to minimize the maximum number of pages
assigned to a single scriber
Right?
see the example input and output
100 200 300 400 500 600 700 800 900
if is divided as 100 200 300 400 500 / 600 700 / 800 900
which has 1500 / 1300 / 1700 each scriber gets, so maximum is -
Given a value M we can say whether it can be split between K people. Do binary Search on 1 to Sum of pages in books.
regards
Arunachalam.
On 10/14/06, Rave Hanker [EMAIL PROTECTED]
wrote:
Pardon the newbie who was so into implementing it as DP, But could someone tell me the Binary Search method
Please read the question carefully again.
Your task is to divide these books among k scribes, k = m. Each book can be assigned to a single scriber only, and every scriber must get a continuous sequence of books
. That means, there exists an increasing succession of numbers 0 = b0 b1 b2, ...
Pardon the newbie who was so into implementing it as DP, But could someone tell me the Binary Search method for this problem?On 10/12/06, Prunthaban Kanthakumar
[EMAIL PROTECTED] wrote:
Yep.
It is Binary Search.
Greedy will not work :-(
My quick thuoght had dome flaws... :(
On 10/11/06,
Yep.
It is Binary Search.
Greedy will not work :-(
My quick thuoght had dome flaws... :(
On 10/11/06, Arunachalam [EMAIL PROTECTED] wrote:
Can you please state your greedy solution?
I have solved these kind of problems on the online judges using binary search. This problem is no exception to the