Hi! I've made a progress. I was able to solve this problem, with the help of Demiurge, using a priority queue that stores the pieces available at a particular time of the simulation ordered by "m" (if "n" > "m" for a particular piece, I exchange "m" and "n"). Using a greedy strategy, of always getting the x first pieces from the queue ("x" = min("k", #of pieces available in the queue)) and cutting them vertically in the middle seems ok. But I've seen that the test cases used in order to verify the correcteness of this problem are too weak. So, please, I would like to get a formal proof of the correcteness of this algorithm. Or, perhaps, a stronger test case.
Thanks in advance,
Daniel Sadoc
On 2001-11-05 01:59, sadoc wrote:
Please, if someone may give me a tip to solve the problem 366, "Cutting up", it would be very welcome. I don't have any idea in order to solve it.
Thanks in advance,
Daniel
<font size=-1>[ This Message was edited by: sadoc on 2001-11-18 03:17 ]</font>
<font size=-1>[ This Message was edited by: sadoc on 2001-11-21 01:55 ]</font>