UVA 10250-The Other Two Trees
来源:互联网 发布:今日头条 源码 编辑:程序博客网 时间:2024/06/06 13:24
UVA 10250-The Other Two Trees
题目大意:其实就是告诉正方形对点的坐标,求出另外俩个点
解题思路:向量垂直且相等即可推出
#include <stdio.h>#include <iostream>using namespace std;int main() { double x1, x2, y1, y2, x3, x4, y3, y4, x0, y0; while( scanf("%lf%lf%lf%lf", &x1, &y1, &x2, &y2) != EOF) { if(x1 == x2 && y1 == y2) { printf("Impossible.\n"); break; } x0 = (x1 + x2) / 2.0; y0 = (y1 + y2) / 2.0; x3 = x0 + y2 - y0; y3 = y0 - x2 + x0; x4 = x0 - y2 + y0; y4 = y0 + x2 - x0; printf("%.10lf %.10lf %.10lf %.10lf\n", x3, y3, x4, y4); } return 0;}
0 0
- uva 10250 - The Other Two Trees
- uva-10250-The Other Two Trees
- Uva 10250 - The Other Two Trees
- uva 10250 - The Other Two Trees
- uva 10250 - The Other Two Trees
- UVA 10250 The Other Two Trees
- uva 10250 - The Other Two Trees
- UVa 10250 - The Other Two Trees
- UVa 10250 - The Other Two Trees
- UVa 10250 The Other Two Trees
- UVa 10250 - The Other Two Trees
- UVA 10250 The Other Two Trees
- UVA - 10250 The Other Two Trees
- UVA 10250 The Other Two Trees
- UVA - 10250 The Other Two Trees
- UVA - 10250 The Other Two Trees
- UVA 10250-The Other Two Trees
- UVA-10250 The Other Two Trees
- 逻辑地址 虚拟地址 基地址 物理地址
- 浅谈MVC、MVP和MVVM,以及iOS中的MVC
- uc/os-iii学习笔记-时间管理
- Android SearchView 自定义SearchIcon和字体颜色大小
- HDOJ 1222 Wolf and Rabbit
- UVA 10250-The Other Two Trees
- Hdfs将服务器的整个文件夹拷贝到Linux本地
- LeetCode Binary Tree Level Order Traversal I.II
- 神器推荐:应用之星,零代码就能制作炫酷的H5页面
- 关于ARM9协处理器CP15及MCR和MRC指令
- 全栈工程师眼中的HTTP
- Java List排序
- Android SQLite操作之“SQLiteOpenHelper”
- 导mysql数据,遇到 longtext 类型,navicat导出会出现乱码