side of the largest square = H.C.F of length and breadth
total no. of squares = (length*breadth) / side^2
On Tue, Aug 2, 2011 at 7:27 PM, wrote:
> A and B are length and breath of current rectangle to fill..
> in above example in the ques if i fill 1x1 squares along length of 3x5
> rectangle..i
A and B are length and breath of current rectangle to fill..
in above example in the ques if i fill 1x1 squares along length of 3x5
rectangle..im left with a rectangle of 3x4(A x B) which i have to fill
again..
Regards
VM
NSIT, COE, 3rd yr
On , Tushar Bindal wrote:
i could not get what A
i could not get what A and B stand for.
pls elaborate a bit more on that
On Tue, Aug 2, 2011 at 7:03 PM, wrote:
> I guess in the above solution greedy wont wrk..i just assumed it wud..dint
> prove it..
> nevertheless..we can replace dis with..
> F(A,B,a,b,x,N) = % fill + max( F(A,B-x,a,b,x,N-(sq
I guess in the above solution greedy wont wrk..i just assumed it wud..dint
prove it..
nevertheless..we can replace dis with..
F(A,B,a,b,x,N) = % fill + max( F(A,Bx,a,b,x,N-(squares filled across
length)), F(Ax,B,a,b,x,N-(squares filled across breadth)) )
Regards
VM
NSIT, COE, 3rd yr
On , vai
With the binary search we can decide for a value of size of square with
reasonable error..
nw to check hw much % fill does that value of size gives..we can implement
a dp..or a recursive substitute..
say size of rectangle is 'a' x 'b' and size of square chosen is 'x'..
we hv to fill a grid wit