Logo
(追記) (追記ここまで)

34391번 - CS Building Blueprint 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
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
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /