Regular polygon
Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1529 Accepted Submission(s): 597
Problem Description
On a two-dimensional plane, give you n integer points. Your task is to figure out how many different regular polygon these points can make.
Input
The input file consists of several test cases. Each case the first line is a numbers N (N <= 500). The next N lines ,each line contain two number Xi and Yi(-100 <= xi,yi <= 100), means the points’ position.(the data assures no two points share the same position.)
Output
For each case, output a number means how many different regular polygon these points can make.
Sample Input
4 0 0 0 1 1 0 1 1 6 0 0 0 1 1 0 1 1 2 0 2 1
Sample Output
1 2
Source
Recommend
liuyiding | We have carefully selected several similar problems for you:
/** @Author: Lyucheng* @Date: 2017-07-27 14:26:58* @Last Modified by: Lyucheng* @Last Modified time: 2017-07-28 15:43:15*//* 题意:给你一个点阵,让你找多边形的个数,因为点都是整数所以只可能是正方形*/#include#include #include #include #include #include #include #include