Hi,
I am trying a problem on codechef and coded the solution to the problem.
Problem Link :- https://www.codechef.com/FEB20B/problems/SNUG_FIT
Solution Link:-https://ide.codingblocks.com/s/177507
My approach is that the max area of circle depends on the max radius and that in turn increases with increased diameter and the diameter is always be minimum of length and width of the rectangle. so to get max l,w i sorted both length and width array so that max lengths gets with max width to get max diameter.
but this approach is not even working for subtask#1 .please tell me whats wrong with my approach i am not able to find .