HOJ 2089 4th point
来源:互联网 发布:windows to go win8.1 编辑:程序博客网 时间:2024/05/18 01:32
http://acm.hit.edu.cn/hoj/problem/view?id=2089
给出平行四边形的三个点 寻找第四个
给出的三个点有一个重复
找出重复点 利用对角线交点坐标求第四个
#include <stdio.h>int main(){ int i, j; double x[5], y[5], x4, y4; while (scanf("%lf %lf %lf %lf %lf %lf %lf %lf", &x[0], &y[0], &x[1], &y[1], &x[2], &y[2], &x[3], &y[3]) != EOF) { for (i = 0; i < 2; i++) { for (j = 2; j < 4; j++) { if ( (x[i] == x[j]) && (y[i] == y[j]) ) { x[4] = x[i],y[4] = y[i]; break; } } } x4 = x[0] + x[1] + x[2] + x[3] - 3 * x[4]; y4 = y[0] + y[1] + y[2] + y[3] - 3 * y[4]; printf("%.3lf %.3lf\n", x4, y4); } return 0;}
- HOJ 2089 4th point
- 4th Point
- POJ2624--4th Point
- POJ2424 4th Point
- poj 2624 4th Point
- POJ 2624 4th Point
- poj 2624 4th Point
- POJ 2624 4th Point(水~)
- 百练 2624 4th Point .
- POJ 2624 4th Point 笔记
- Hoj 2991 Find the Point
- POJ-2624 4th Point(计算几何)
- POJ 2624 4th Point 计算几何(向量)
- POJ 2624 4th Point (计算几何)
- ZOJ-3955-Saddle Point【17th浙大校赛】
- hoj 2089不要62
- HOJ
- Lecture5-4Breaking Point
- mongDB 分页优化
- Java中的回调
- SYSLOG&滚动日志
- 二叉树的建立与遍历
- Android CMWAP和CMNET 切换APN
- HOJ 2089 4th point
- url编码
- BinaryFormatter 的简单使用
- linux-C实现查看目录中所有文件
- C标准函数库
- PKU_1002 浮点数N次方的精确计算
- Redis安装和使用示例
- 微软公司等数据结构+算法面试100题-第1题
- linux 编译指定库、头文件的路径问题