CF459A.Pashmak and Garden

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

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 x1,y1,x2,y2x_{1},y_{1},x_{2},y_{2} (100<=x1,y1,x2,y2<=100)(-100<=x_{1},y_{1},x_{2},y_{2}<=100) integers, where x1x_{1} and y1y_{1} are coordinates of the first tree and x2x_{2} and y2y_{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 x3,y3,x4,y4x_{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 x3,y3,x4,y4x_{3},y_{3},x_{4},y_{4} must be in the range (1000<=x3,y3,x4,y4<=1000)(-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
    
首页