Among all quadrilaterals , Chris likes rectangles the most. This file contains information of 10000 quadrilaterals. How many of them are, possibly tilted , rectangles?
Input Format
Each quadrilateral is described in four lines. Each line contains a pair of integers that describes a point . Note that the points are not necessarily in clockwise / anticlockwise order.
Details and Assumptions :
This is an extension of this problem.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
We sort the 4 points according to its x -axis. Then, we check the diagonals, width and height.