|
||||||||||
Regular Convex PolygonTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1417 Accepted Submission(s): 455 Problem Description A regular convex polygon is a polygon where each side has the same length, and all interior angles are equal and less than 180 degrees. A square, for example, is a regular convex polygon. You are given three points which are vertices of a regular convex polygon R; can you determine the minimum number of vertices that R must have? Input Each test case consists of three lines. Line i consists of two floating point values xi and yi (-104 <=xi,yi<=104) where (xi,yi) are the coordinates of a vertex of R. The coordinates are given with a precision of 10-6, i.e., they differ from the exact coordinates by at most 10-6. You may assume that for each test case the Euclidean distance between any two given points is at least 1, and R has at most 1000 vertices. The input will finish with a line containing the word END. Output For each test case, print one line with the minimum number of vertices that R must have. Sample Input
Sample Output
Source | ||||||||||
|