Counting More Rectangles

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 \((x,y)\). Note that the points are not necessarily in clockwise / anticlockwise order.

Details and Assumptions:

  • It is guaranteed that for a quadrilateral no points will be in the same spot.
  • \(1\leq (x_i,y_i) \leq 4\)

This is an extension of this problem.


Problem Loading...

Note Loading...

Set Loading...