yz
BAN USER1000x1001 can be cut to 16 pieces, not 20.
Cutting 1000x1001 horizontal. Two pieces are: 1000x625 and 1000x376
Cutting 1000x625 horizontal. Two pieces are: 625x625 and 625x375
1 pieces of 625x625 located on 625x625
Cutting 625x375 horizontal. Two pieces are: 375x375 and 375x250
1 pieces of 375x375 located on 375x375
Cutting 375x250 horizontal. Two pieces are: 250x250 and 250x125
1 pieces of 250x250 located on 250x250
2 pieces of 125x125 located on 250x125
Cutting 1000x376 horizontal. Two pieces are: 376x752 and 376x248
2 pieces of 376x376 located on 376x752
Cutting 376x248 horizontal. Two pieces are: 248x248 and 248x128
1 pieces of 248x248 located on 248x248
Cutting 248x128 horizontal. Two pieces are: 128x128 and 128x120
1 pieces of 128x128 located on 128x128
Cutting 128x120 horizontal. Two pieces are: 120x80 and 120x48
Cutting 120x80 horizontal. Two pieces are: 80x80 and 80x40
1 pieces of 80x80 located on 80x80
2 pieces of 40x40 located on 80x40
Cutting 120x48 horizontal. Two pieces are: 48x96 and 48x24
2 pieces of 48x48 located on 48x96
2 pieces of 24x24 located on 48x24
FINAL:
625x625: 1 pieces
375x375: 1 pieces
250x250: 1 pieces
125x125: 2 pieces
376x376: 2 pieces
248x248: 1 pieces
128x128: 1 pieces
80x80: 1 pieces
40x40: 2 pieces
48x48: 2 pieces
24x24: 2 pieces
Sanity check:
Projected area 1001000, all pieces added together: 1001000
RepElijahMiller, abc at A9
I am highly organized with exceptional commitment to task completion and quality assurance when working with computer software programs. I ...
RepPennyStringer, Music director at Poore Simon's
I am a Music director and writer and live in Newark USA . I spend most of my time writing essays ...
Reppedrospencerp, Blockchain Developer at 247quickbookshelp
My name is Pedro and I am a 28 years old Title abstractor . I research all documents and activities affecting ...
I did my implementation on the same approach.
- yz March 06, 2017I have not checked why exactly yours is missing some cases --- I think you need check all scenarios --- example: for 5x6, first check vertical cut (1x6 + 4x6) then check horizontal cut (5x1+5x5)...so on and so forth.
At each round, the result is the min of two scenarios, and each scenario contains 2 recursion calls.