博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
HDU 6055 Regular polygon
阅读量:7013 次
发布时间:2019-06-28

本文共 1904 字,大约阅读时间需要 6 分钟。

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
#include
#include
#include
#include
#define MAXN 5005#define MAXM 2005#define EXP 1e-6using namespace std;struct Point{ int x,y; Point(){} Point(int _x,int _y){ x=_x; y=_y; } bool operator < (const Point & other) const{ if(x==other.x) return y
EXP||bx-(int)bx>EXP||ay-(int)ay>EXP||by-(int)by>EXP) return false; if(ax<0||ay<0||bx<0||by<0) return false; if(vis[(int)ax][(int)ay]==true&&vis[(int)bx][(int)by]==true) return true; return false;}inline void init(){ memset(vis,false,sizeof vis);}int main(){ // freopen("in.txt", "r", stdin); // freopen("out.txt", "w", stdout); while(scanf("%d",&n)!=EOF){ init(); for(int i=0;i

 

转载于:https://www.cnblogs.com/wuwangchuxin0924/p/7250636.html

你可能感兴趣的文章
android模仿铃声选择功能
查看>>
我的友情链接
查看>>
配置DHCP服务器
查看>>
trim triml trimr
查看>>
我的友情链接
查看>>
温故知新——JS中创建对象或类的方法
查看>>
centos 正确安装vitualbox
查看>>
www.exoweb.net
查看>>
清华大学MBA在职班第一学年第二学期课表
查看>>
PHP缓存技术
查看>>
php设计模式之委托模式
查看>>
JVM内存管理
查看>>
Webix合集
查看>>
利用ScopeGuard编写异常安全的代码
查看>>
代理设置
查看>>
PHP 浮点型运算相关问题
查看>>
开源 serverless 产品原理剖析 - Kubeless
查看>>
嵌入式编程时注意的事项
查看>>
Django学习之用户登录
查看>>
LINUX 调优(1)
查看>>