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

4424번 - Polylops 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB28171460.870%

문제

Given the vertices of a non-degenerate polygon (no 180-degree angles, zero-length sides, or self-intersection - but not necessarily convex), you must determine how many distinct lines of symmetry exist for that polygon. A line of symmetry is one on which the polygon, when reflected on that line, maps to itself.

입력

Input consists of a description of several polygons.

Each polygon description consists of two lines. The first contains the integer "n" (3<=n<=1000), which gives the number of vertices on the polygon. The second contains "n" pairs of numbers (an x- and a y-value), describing the vertices of the polygon in order. All coordinates are integers from -1000 to 1000.

Input terminates on a polygon with 0 vertices.

출력

For every polygon described, print out a line saying "Polygon #x has y symmetry line(s).", where x is the number of the polygon (starting from 1), and y is the number of distinct symmetry lines on that polygon.

제한

예제 입력 1

4
-1 0 0 2 1 0 0 -1
3
-666 -42 57 -84 19 282
3
-241 -50 307 43 -334 498
0

예제 출력 1

Polygon #1 has 1 symmetry line(s).
Polygon #2 has 0 symmetry line(s).
Polygon #3 has 1 symmetry line(s).

힌트

출처

Contest > Waterloo's local Programming Contests > 4 October, 1998 E번

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

출처

대학교 대회

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

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