A cow is tied to an outside corner of a rectangular barn of size (a,b) with a rope of length l. What is the maximum area the cow can graze outside the barn?
n.b. the test suites will be expanded later
Asif -- I am getting a different result for test problem 6.
I got the same answer as you. I think it is correct.
in test 6,there will be an overlap. if u consider that, i think it should be ok.
i'll add some more test cases like that.
Ooops! I didn't consider that.
If the rope is so longer than the rectangle barn and the cow can turn round and round, 3 of "4 quadrants" does not increase the grazing area, it is just 3/4 sector of a circle. The problem is 1 of 4 quadrants.
Sums with Excluded Digits
Back to basics 8 - Matrix Diagonals
Find best placement for ordered dominoes (harder)
Find the largest value in the 3D matrix
Min of a Matrix
Spiral Out - 02
remove numbers from a string
The length of the equal sides of an isoceles triangle is 'a'.For all the possible (integer) values of the remaining side,find the associated angles between the two equal sides.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office