Answered step by step
Verified Expert Solution
Question
1 Approved Answer
input: standard input output: standard output A square of positive ( strictly greater than 0 ) area is located on the coordinate plane, with sides
input: standard input
output: standard output
A square of positive strictly greater than area is located on the coordinate plane, with sides parallel to the coordinate axes. You are given the coordinates of its corners, in random order. Your task is to find the area of the square.
Input
Each test consists of several testcases. The first line contains one integer the number of testcases. The following is a description of the testcases.
Each testcase contains four lines, each line contains two integers coordinates of the corners of the square.
It is guaranteed that there is a square with sides parallel to the coordinate axes, with positive strictly greater than area, with corners in given points.
Output
For each test case, print a single integer, the area of the square.
Example
tableinputoutput
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started