百练 2624 4th Point .
来源:互联网 发布:c语言智能五子棋游戏 编辑:程序博客网 时间:2024/05/25 21:36
水题一道.. 题目地址:http://www.bailian.openjudge.cn/practice/2624
#include<iostream>#include<cstdio>using namespace std;struct Point{ //点 double x,y;Point(double x,double y):x(x),y(y) {}Point operator + (const Point& p){return Point(x+p.x,y+p.y);}Point operator - (const Point& p){return Point(x-p.x,y-p.y);}bool operator == (const Point& p){return x==p.x&&y==p.y;}};ostream& operator << (ostream &out,const Point& v){printf("%.3lf %.3lf",v.x,v.y);}int main(){double x1,y1,x2,y2,x3,y3,x4,y4;while(scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4)!=EOF){Point a(x1,y1),b(x2,y2),c(x3,y3),d(x4,y4);if(a==b) cout<<(c+d-a);else if(a==c) cout<<(b+d-a);else if(a==d) cout<<(c+b-a);else if(b==c) cout<<(a+d-b);else if(b==d) cout<<(a+c-b);else if(c==d) cout<<(a+b-c);cout<<endl;}return 0;}
0 0
- 百练 2624 4th Point .
- poj 2624 4th Point
- POJ 2624 4th Point
- poj 2624 4th Point
- POJ 2624 4th Point(水~)
- POJ 2624 4th Point 笔记
- 4th Point
- POJ2624--4th Point
- POJ2424 4th Point
- HOJ 2089 4th point
- POJ-2624 4th Point(计算几何)
- POJ 2624 4th Point 计算几何(向量)
- POJ 2624 4th Point (计算几何)
- ZOJ-3955-Saddle Point【17th浙大校赛】
- Lecture5-4Breaking Point
- Point
- Point
- point
- iOS线程和进程的区别和联系
- 多线程的作用和实现方法
- codeforces-Powers of Two(map的应用)
- LightOJ1129->动态Trie树
- 在Windows下为PHP5.5安装redis扩展
- 百练 2624 4th Point .
- 三字棋小游戏
- svo简单探讨1
- HDU 4417-树状数组求区间rank查询/主席树区间rank查询
- Android Stdio安装与使用
- Linux 学习【2】
- Beego源码解析(一)——配置项初始化流程
- Hive:环境搭建及例子
- 51Nod-1459-迷宫游戏