I am unable to understand the problem statement. According to me for the given test case the area will be 6.
With reference to the above image please help me understand what are input coordinates and help me understand this problem.
I am unable to understand the problem statement. According to me for the given test case the area will be 6.
With reference to the above image please help me understand what are input coordinates and help me understand this problem.
this picture if for a different test case and the sample input is different. dont get confused
Here you can see that there are 3 towers at (8,6), (3,8) and (11,2) and for each of them 2 rivers (1 horizontal and the other vertical and flowing and intersecting at the respective (x,y)).
Given this arrangement the rest of the space left in the grid(the white portion in image) is land.
Now the king wants to build a temple and he wants to do that on the largest area available. Now you are required to find out and print the area of the largest land which is available and in which the king can build a temple.
now you are supposed to find the max area, and for having an area you must have a rectangle for that you will need 4 points and for given test case we found that 2,2), (2,4), (5,2), (5,4) these are the 4 points which will give us the maximum area. There is one thing you need to keep in mind while calculating the area i.e. the area will be calculated from the edge next to the left edge, the edge above the bottom edge, the topmost edge and the rightmost edge, therefore for the region (2,2) , (2,4) , (5,2) , (5,4) the actual area will be considered from (3,2), (3,4), (5,2), (5,4) respectively.