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

30495번 - Geometry Game 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 1024 MB109373737.374%

문제

For the longest time you could keep your toddlers happy by letting them play with triangular, square, and circular wooden blocks that fit exactly through perfectly sized holes. After letting them play a bit too long, they completely mastered this game and are now bored, preventing you from fixing the bugs in your code.

Just now, they decided to reverse roles and started screaming planar coordinates at you, insisting that you determine which shape each four points make: kite, trapezium, parallelogram, rhombus, rectangle, square, or none of those. You do not have time for this, since your bugs still need fixing. Instead, you write a new program to answer your toddlers' questions, ideally without bugs.

The definitions for the quadrilateral shapes are as follows:

  • A square has four right angles and four sides with equal lengths.
  • A rectangle has four right angles.
  • A rhombus has four sides with equal lengths.
  • A parallelogram has two pairs of parallel sides.
  • A trapezium has one pair of parallel sides.
  • A kite has reflection symmetry across a diagonal.

입력

The input consists of:

  • Four lines, each containing two integers $x$ and $y$ (0ドル\leq x,y\leq 10^9$), the coordinates of a point.

The positive x-axis is oriented to the right and the positive y-axis is oriented upwards.

The four points are distinct, form a convex quadrilateral shape (i.e. all interior angles are strictly less than 180ドル^\circ$), and are given in clockwise order.

출력

Output the most restrictive type of quadrilateral that the points form, which is the first one of "square", "rectangle", "rhombus", "parallelogram", "trapezium", or "kite" that applies, or "none" otherwise.

제한

예제 입력 1

0 0
0 1
1 1
1 0

예제 출력 1

square

예제 입력 2

1 1
2 3
4 5
3 3

예제 출력 2

parallelogram

힌트

출처

ICPC > Regionals > Europe > Northwestern European Regional Contest > Benelux Algorithm Programming Contest > BAPC 2023 G번

  • 문제를 만든 사람: Jorke de Vlas
(追記) (追記ここまで)

출처

대학교 대회

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

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