poj 2007(极角排序)
来源:互联网 发布:淘宝新款女装 编辑:程序博客网 时间:2024/05/18 00:14
#include<stdio.h>#include<algorithm>using namespace std;struct POINT{double x,y;}point[55];double cross(const POINT &p1,const POINT &p2,const POINT &q1,const POINT &q2) { return (q2.y - q1.y)*(p2.x - p1.x) - (q2.x - q1.x)*(p2.y - p1.y); }bool cmp(const POINT &a,const POINT &b){ POINT origin; origin.x=origin.y=0;return cross(origin,b,origin,a)<0;}int main(){int count=0;while(scanf("%lf %lf",&point[count].x,&point[count].y)!=EOF){count++;} sort(point+1,point+count,cmp); for(int i=0;i<count;i++)printf("(%.lf,%.lf)\n",point[i].x,point[i].y);return 0;}
- poj 2007(极角排序)
- POJ 2007 极角排序
- poj 2007 极角排序
- poj 2007 极角排序
- POJ 2007 极角排序
- POJ 2007 极角排序
- poj 2007 Scrambled Polygon 极角排序
- POJ 2007 Scrambled Polygon(极角排序)
- POJ 2007 Scrambled Polygon 极角排序
- POJ 2007 (极角排序)
- POJ 2007 (极角排序)
- poj 2007 Scrambled Polygon [极角排序]
- POJ 2007 Scrambled Polygon 极角排序
- poj 2007 Scrambled Polygon 【极角排序】
- POJ 2007 Scrambled Polygon(极角排序)
- poj 2007 凸包 极角排序
- POJ 2007 Scrambled Polygon (极角排序)
- poj 1696 极角排序
- php-cgi进程占用cpu资源过多负载高的原因分析及解决步骤
- 自定义UITabBarController的tabBar背景图片
- MVC 伪静态的实现方式
- PPTP、L2TP和IPsec的区别及优缺点
- python模块库路径设置
- poj 2007(极角排序)
- Hibernate 中的cascade和inverse
- java学习笔记之JavaIO(1):用java读取文本文件
- sql中 in 、not in 、exists、not exists 用法和差别
- linux pptp vpn服务器的架设
- IIS 服务器 支持.apk文件的下载
- 正确设置php-fpm和nginx防止网站被黑
- 求多边形的重心-hdu 1115
- /var/log目录下的20个Linux日志文件功能详解