UVA 10250 The Other Two Trees
来源:互联网 发布:制作地图软件 编辑:程序博客网 时间:2024/05/22 17:31
题目
另两棵树
分析
给正方形对角两点坐标,求另两点坐标。应该是对0前面的正负号要求不高。
代码
#include <stdio.h>int main(void){ double x1, x2, ax1, ax2; double y1, y2, ay1, ay2; double a, b; while (scanf("%lf%lf%lf%lf", &x1, &y1, &x2, &y2) != EOF) { if (x1 == x2 && y1 == y2) { printf("Impossible.\n"); continue; } /* a + b = y1 - y2; a - b = x2 - x1; */ a = ((y1-y2)+(x2-x1))/2; b = ((y1-y2)-(x2-x1))/2; ax1 = x2 - a; ay1 = y2 + b; ax2 = x2 + b; ay2 = y2 + a; printf("%.10lf %.10lf %.10lf %.10lf\n", ax1, ay1, ax2, ay2); } 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
- Eclipse常见问题解决 - java.lang.ClassNotFoundException: org.springframework.web.util.Log4jConfigListener
- java ---输入输出流操作(代码整理)
- C编程注意细微设计
- 软件测试判断题总结
- Struts2从一个action转到另一个action的两种方法
- UVA 10250 The Other Two Trees
- 如何更改linux文件的拥有者及用户组(chown和chgrp)
- MyEclipse项目出现红色叹号的问题
- Apache Shiro示例
- HDU1828 Picture 周长并 线扫描
- Excel柱形图填充
- Intel® MKL with Numpy, Scipy, Matlab, C#, Python, NAG and more
- H264 Intro - B_Skip B_Direct_16x16 P_Skip
- 欧盟部分国家税收情况