시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB106555.556%

문제

Mines has recently received an influx of new students who are interested in studying Computer Science (the best major on campus, naturally). To accommodate this new influx, Mines has decided to build a new Computer Science building. The building architects designed the building to be a quadrilateral, but Blaster the Burro ate the blueprints! All they have left are coordinates of the four vertices of the building. Can you determine the shape of the building they designed?

입력

The input consists of four lines of space separated integers. The two integers on each line represent the $x$ and $y$ coordinates of a point in two-dimensional Cartesian space, respectively. The four points are guaranteed to form a convex quadrilateral (that is, all interior angles are strictly less than $180^\circ$), but the points may appear in any order. The $x$ and $y$ coordinates of each point are in the range $[-1\,000, 1\,000]$.

출력

The output should be a string describing the most specific classification of the shape that the four points form. You should classify the points as forming one of the following shapes, listed in increasing order of specificity:

  • Quadrilateral: a polygon with four edges and four vertices
  • Kite: a quadrilateral with two pairs of adjacent sides with equal length
  • Trapezoid: a quadrilateral with at least one pair of opposite sides that are parallel
  • Parallelogram: a trapezoid with two pairs of opposite sides that are parallel
  • Rhombus: a parallelogram with four sides of equal length
  • Rectangle: a parallelogram with four right angles
  • Square: a rectangle with four sides of equal length

예제 입력 1

1 1
1 -1
-1 -1
-1 1

예제 출력 1

Square

예제 입력 2

15 5
30 24
35 17
10 12

예제 출력 2

Parallelogram

출처

School > CS@Mines > CS@Mines HSPC 2022 > Beginner L번

School > CS@Mines > CS@Mines HSPC 2022 > Advanced C번

  • 문제를 만든 사람: Colin Siles