302383: CF459A. Pashmak and Garden
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Pashmak and Garden
题意翻译
## 题目描述 Pashmak在一年前和一个叫Parmida的妹子相爱... 今天,Pashmak准备在一个浪漫的花园约会,但他忘记了花园的位置。他记得花园看起来像一个平行于坐标轴的正方形,正方形的每一个顶点上都有一棵树。现在,他只知道其中两棵树的位置。帮助他找到剩下两个的位置。 ## 输入输出格式 ### 输入格式: 第一行有四个整数x1,y1,x2,y2 (−100<=x1,y1,x2,y2<=100),x1,y1为第一个树的坐标,x2,y2 为第二个树的坐标。保证给定的点是不同的。 ### 输出格式: 输出另外两个树的坐标x3,y3,x4,y4.如果有多种方案,输出任意一种即可;如果无解,输出-1. 注意:x3,y3,x4,y4必须满足(−1000<=x3,y3,x4,y4<=1000)题目描述
Pashmak has fallen in love with an attractive girl called Parmida since one year ago... Today, Pashmak set up a meeting with his partner in a romantic garden. Unfortunately, Pashmak has forgotten where the garden is. But he remembers that the garden looks like a square with sides parallel to the coordinate axes. He also remembers that there is exactly one tree on each vertex of the square. Now, Pashmak knows the position of only two of the trees. Help him to find the position of two remaining ones.输入输出格式
输入格式
The first line contains four space-separated $ x_{1},y_{1},x_{2},y_{2} $ $ (-100<=x_{1},y_{1},x_{2},y_{2}<=100) $ integers, where $ x_{1} $ and $ y_{1} $ are coordinates of the first tree and $ x_{2} $ and $ y_{2} $ are coordinates of the second tree. It's guaranteed that the given points are distinct.
输出格式
If there is no solution to the problem, print -1. Otherwise print four space-separated integers $ x_{3},y_{3},x_{4},y_{4} $ that correspond to the coordinates of the two other trees. If there are several solutions you can output any of them. Note that $ x_{3},y_{3},x_{4},y_{4} $ must be in the range $ (-1000<=x_{3},y_{3},x_{4},y_{4}<=1000) $ .
输入输出样例
输入样例 #1
0 0 0 1
输出样例 #1
1 0 1 1
输入样例 #2
0 0 1 1
输出样例 #2
0 1 1 0
输入样例 #3
0 0 1 2
输出样例 #3
-1