Problem:


Score : 200 points

Problem Statement

There is a square in the xy-plane. The coordinates of its four vertices are (x_1,y_1),(x_2,y_2),(x_3,y_3) and (x_4,y_4) in counter-clockwise order.
(Assume that the positive x-axis points right, and the positive y-axis points up.)

Takahashi remembers (x_1,y_1) and (x_2,y_2), but he has forgot (x_3,y_3) and (x_4,y_4).

Given x_1,x_2,y_1,y_2, restore x_3,y_3,x_4,y_4. It can be shown that x_3,y_3,x_4 and y_4 uniquely exist and have integer values.

Constraints

|x_1|,|y_1|,|x_2|,|y_2| \leq 100

(x_1,y_1) ≠ (x_2,y_2)

All values in input are integers.

Input

Input is given from Standard Input in the following format:

x_1 y_1 x_2 y_2

Output

Print x_3,y_3,x_4 and y_4 as integers, in this order.

Sample Input 1

0 0 0 1

Sample Output 1

-1 1 -1 0

(0,0),(0,1),(-1,1),(-1,0) is the four vertices of a square in counter-clockwise order.
Note that (x_3,y_3)=(1,1),(x_4,y_4)=(1,0) is not accepted, as the vertices are in clockwise order.

Sample Input 2

2 3 6 6

Sample Output 2

3 10 -1 7

Sample Input 3

31 -41 -59 26

Sample Output 3

-126 -64 -36 -131



Sample input:
0 0 0 1


Sample output:
-1 1 -1 0

Submission status: Wrong Answer

Solution code:
import math
def li():
    return list(map(int, input().split()))
def mi():
    return map(int, input().split())
def ii():
    return int(input())

x1, y1, x2, y2 = mi()

l = 0
# x = Cの場合
if (x2 - x1) == 0:
    l = abs(y2 - y1)
    if y2 > y1:
        x3 = x1 - l
    else:
        x3 = x1 + l
    y3 = y2
    x4 = x3
    y4 = y1
# y = Cの場合
elif (y2 - y1) == 0:
    l = abs(x2 - x1)
    x3 = x2
    if x2 > x1:
        y3 = y2 - l
    else:
        y3 = y2 + l
    x4 = x1
    y4 = y3
# y = ax + bの場合
else:
    x3 = x2 - (y2 - y1)
    y3 = y2 + (x2 - x1)
    x4 = x1 - (y2 - y1)
    y4 = y1 + (x2 - x1)

print(x3, y3, x4, y4)

Submission status: Wrong Answer

Solution code:
import math
def li():
    return list(map(int, input().split()))
def mi():
    return map(int, input().split())
def ii():
    return int(input())

x1, y1, x2, y2 = mi()

l = 0
# x = Cの場合
if (x2 - x1) == 0:
    l = y2 - y1
    if y2 > y1:
        x3 = x1 - l
    else:
        x3 = x1 + l
    y3 = y2
    x4 = x3
    y4 = y1
# y = Cの場合
elif (y2 - y1) == 0:
    l = x2 - x1
    x3 = x2
    if x2 > x1:
        y3 = y2 - l
    else:
        y3 = y2 + l
    x4 = x1
    y4 = y3
# y = ax + bの場合
else:
    x3 = x2 - (y2 - y1)
    y3 = y2 + (x2 - x1)
    x4 = x1 - (y2 - y1)
    y4 = y1 + (x2 - x1)

print(x3, y3, x4, y4)

Submission status: Wrong Answer

Solution code:
import math
def li():
    return list(map(int, input().split()))
def mi():
    return map(int, input().split())
def ii():
    return int(input())

x1, y1, x2, y2 = mi()

l = 0
# x = Cの場合
if (x2 - x1) == 0:
    l = y2 - y1
    x3 = x1 - l
    y3 = y2
    x4 = x3
    y4 = y1
# y = Cの場合
elif (y2 - y1) == 0:
    l = x2 - x1
    x3 = x2
    y3 = y2 - l
    x4 = x1
    y4 = y3
# y = ax + bの場合
else:
    x3 = x2 - (y2 - y1)
    y3 = y2 + (x2 - x1)
    x4 = x1 - (y2 - y1)
    y4 = y1 + (x2 - x1)

print(x3, y3, x4, y4)

Submission status: Wrong Answer

Solution code:
x1, y1, x2, y2 = map(int, input().split())
x3 = x2-y2-y1
y3 = y2+x2-x1
x4 = x1-y2-y1
y4 = y1+x2-x1

print(x3, y3, x4, y4)

Submission status: Wrong Answer

Solution code:
import math
x1, y1, x2, y2 = map(int, input().split())
x2 -= x1
y2 -= y1
print(x2, y2)
if x2 != 0:
    theta = math.atan2(y2,x2)
else:
    if y2 > 0:
        theta = math.pi / 2
    else:
        theta = 3 * math.pi / 2
if y2 == 0:
    if x2 < 0:
        theta = math.pi
    else:
        theta = 0

if theta < 0:
    theta += 2 * math.pi

l = math.sqrt(x2**2 + y2**2)

x3 = math.cos(theta+math.radians(45))*l*math.sqrt(2)+x1
y3 = math.sin(theta+math.radians(45))*l*math.sqrt(2)+y1

x4 = math.cos(theta+math.radians(90))*l+x1
y4 = math.sin(theta+math.radians(90))*l+y1
print(round(x3), round(y3), round(x4), round(y4))

Submission status: Wrong Answer

Solution code:
import math
x1, y1, x2, y2 = map(int, input().split())
x2 -= x1
y2 -= y1
if x2 != 0:
    theta = math.atan(y2/x2)
else:
    if y2 > 0:
        theta = math.pi / 2
    else:
        theta = 3 * math.pi / 2
theta = theta % math.pi
l = math.sqrt(x2**2 + y2**2)

x3 = math.cos(theta+math.radians(45))*l*math.sqrt(2)+x1
y3 = math.sin(theta+math.radians(45))*l*math.sqrt(2)+y1

x4 = math.cos(theta+math.radians(90))*l+x1
y4 = math.sin(theta+math.radians(90))*l+y1
print(round(x3), round(y3), round(x4), round(y4))

Submission status: Wrong Answer

Solution code:
x1,y1,x2,y2=map(int,input().split())
x3=x2+y2-y1
y3=y2-x2+x1
x4=x1+y2-y1
y4=y1-x2+x1
print(x3,y3,x4,y4)

Submission status: Wrong Answer

Solution code:
x1,y1,x2,y2 = map(int,input().split())

a1 = x2 - x1
a2 = y2 - y1

x3 = x2 + (-a2)
y3 = x2 + (a1)

x4 = x3 + (-a1)
y4 = y3 + (-a2)

print(x3,y3,x4,y4)

Submission status: Wrong Answer

Solution code:
x1,y1,x2,y2 = map(int, input().split())
print(x2-y2+y1, y2+x2-x1, x1-y2+y1, y1-x2-x1)

Submission status: Wrong Answer

Solution code:
# input
x1, y1, x2, y2 = map(int, input().split())

# check
x_mov = abs(x1 - x2)
y_mov = abs(y1 - y2)

print(x2 - y_mov, y2 + x_mov, x1 - y_mov, y1 + x_mov)

Submission status: Wrong Answer

Solution code:
x1,y1,x2,y2 = map(int,input().split())
x_dis = abs(x2-x1)
y_dis = abs(y2-y1)
if y2>=y1:
    x4 = x1-y_dis
    y4 = y1+x2-x1
    center_x = (x2+x4)/2
    center_y = (y2+y4)/2
    x3 = 2*center_x-x1
    y3 = 2*center_y-y1
else:
    x3 = x2+y2-y1
    y3 = y2-x_dis
    center_x = (x1+x3)/2
    center_y = (y1+y3)/2
    x4 = 2*center_x-x2
    y4 = 2*center_y-y2
print(int(x3),int(y3),int(x4),int(y4))

Submission status: Wrong Answer

Solution code:
x1,y1,x2,y2 = map(int,input().split())
x_dis = abs(x2-x1)
y_dis = abs(y2-y1)
if x2<=x1:
    x4 = x1-y_dis
    y4 = y1-x_dis
    center_x = (x2+x4)/2
    center_y = (y2+y4)/2
    x3 = 2*center_x-x1
    y3 = 2*center_y-y1
else:
    x4 = x1-y_dis
    y4 = y1+x_dis
    center_x = (x2+x4)/2
    center_y = (y2+y4)/2
    x3 = 2*center_x-x1
    y3 = 2*center_y-y1
print(int(x3),int(y3),x4,y4)

Submission status: Wrong Answer

Solution code:
x1, y1, x2, y2 = map(int, input().split())
dx = x2 - x1
dy = y2 - y1
if dx >= 0 and dy < 0:
  x3, y3 = x1 - dy, y1 + dx
  x4, y4 = x2 - dy, y2 + dx
elif dx < 0 and dy >= 0:
  x3, y3 = x2 - dy, y2 + dx
  x4, y4 = x1 - dy, y1 + dx
else:
  x3, y3 = x2 - dy, y2 + dx
  x4, y4 = x1 - dy, y1 + dx
  
print(x3, y3, x4, y4)

Submission status: Wrong Answer

Solution code:
x1, y1, x2, y2 = map(int, input().split())
dx = x2 - x1
dy = y2 - y1
if dx >= 0 and dy < 0:
  x3, y3 = x1 + dy, y1 + dx
  x4, y4 = x2 + dy, y2 + dx
elif dx < 0 and dy >= 0:
  x3, y3 = x2 - dy, y2 + dx
  x4, y4 = x1 - dy, y1 + dx
else:
  x3, y3 = x2 - dy, y2 + dx
  x4, y4 = x1 - dy, y1 + dx
  
print(x3, y3, x4, y4)

Submission status: Wrong Answer

Solution code:
#import numpy as np
import math
#T= str(input())
#K = int(input())
x1,y1,x2,y2= map(int,input().split())
#A = list(map(int,input().split()))
#B = list(map(int,input().split()))
#S= str(input())

L=math.sqrt((x1-x2)**2 + (y1-y2)**2)

a=abs(x2-x1)
b=abs(y2-y1)



if x1 <= x2 and y1 <= y2:
    x3 = x2 - b
    y3 = y2 + a
    x4 = x1 - b
    y4 = y1 + a
elif x1 <= x2 and y1 >= y2:
    x3 = x2 + b
    y3 = y2 + a
    x4 = x1 + b
    y4 = x1 + a
elif x1 >= x2 and y1 <= y2:
    x3 = x2 - b
    y3 = y2 - a
    x4 = x1 - b
    y4 = y1 - a
elif x1 >= x2 and y1 >= y2:
    x3 = x2 + b
    y3 = y2 - a
    x4 = x1 + b
    y4 = x1 - a

print(x3,y3,x4,y4)

Submission status: Wrong Answer

Solution code:
#import numpy as np
import math
#T= str(input())
#K = int(input())
x1,y1,x2,y2= map(int,input().split())
#A = list(map(int,input().split()))
#B = list(map(int,input().split()))
#S= str(input())

L=math.sqrt((x1-x2)**2 + (y1-y2)**2)

a=abs(x2-x1)
b=abs(y2-y1)


if x1 ==x2:
    if y1 > y2:
        x3 = x2 + b
        y3 = y2
        x4 = x1 +b
        y4 = y1
    else:
        x3 = x2 - b
        y3 = y2
        x4 = x1 - b
        y4 = y1
    print(x3,y3,x4,y4)
    exit()
if y1==y2:
    if x1 > x2:
        x3 = x2
        y3 = y2 - a
        x4 = x1
        y4 = y1 -  a
    else:
        x3 = x2
        y3 = y2 + a
        x4 = x1
        y4 = y1 + a
    print(x3,y3,x4,y4)
    exit()


if x1 < x2 and y1 < y2:
    x3 = x2 - b
    y3 = y2 + a
    x4 = x1 - b
    y4 = y1 + a
elif x1 < x2 and y1 > y2:
    x3 = x2 + b
    y3 = y2 + a
    x4 = x1 + b
    y4 = x1 + a
elif x1 > x2 and y1 < y2:
    x3 = x2 - b
    y3 = y2 - a
    x4 = x1 - b
    y4 = y1 - a
elif x1 > x2 and y1 > y2:
    x3 = x2 + b
    y3 = y2 - a
    x4 = x1 + b
    y4 = x1 - a

print(x3,y3,x4,y4)

Submission status: Wrong Answer

Solution code:
#import numpy as np
import math
#T= str(input())
#K = int(input())
x1,y1,x2,y2= map(int,input().split())
#A = list(map(int,input().split()))
#B = list(map(int,input().split()))
#S= str(input())

L=math.sqrt((x1-x2)**2 + (y1-y2)**2)

a=abs(x2-x1)
b=abs(y2-y1)


if x1 ==x2:
    if y1 > y2:
        x3 = x2 + b
        y3 = y2
        x4 = x1 +b
        y4 = y1
    else:
        x3 = x2 - b
        y3 = y2
        x4 = x1 - b
        y4 = y1
    print(x3,y3,x4,y4)
    exit()
if y1==y2:
    if x1 > x2:
        x3 = x2
        y3 = y2 - a
        x4 = x1
        y4 = y1 -  a
    else:
        x3 = x2
        y3 = y2 + a
        x4 = x1
        y4 = y1 + a
    print(x3,y3,x4,y4)
    exit()


if x1 < x2 and y1 < y2:
    x3 = x2 - b
    y3 = y2 + a
    x4 = x1 - b
    y4 = y1 + a
elif x1 < x2 and y1 > y2:
    x3 = x2 + b
    y3 = y2 + a
    x4 = x1 + b
    y4 = x1 + b
elif x1 > x2 and y1 < y2:
    x3 = x2 - b
    y3 = y2 - a
    x4 = x1 - b
    y4 = y1 - a
elif x1 > x2 and y1 > y2:
    x3 = x2 + b
    y3 = y2 - a
    x4 = x1 + b
    y4 = x1 - b

print(x3,y3,x4,y4)

Submission status: Wrong Answer

Solution code:
x1, y1, x2, y2 = map(int, input().split())
print(x2 - (y2 - y1), y2 - (x2 - x1), x1 - (y2 - y1), y1 - (x2 - x1))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
#from math import gcd
import bisect
from collections import defaultdict
from collections import deque
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]

######OUTPUT######
def Yes(): print("Yes"); return
def No(): print("No"); return

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr

#####MakeDivisors######
def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#####BitCount#####
def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count

#####ChangeBase#####
def Base_10_to_n(X, n):
  if (int(X/n)):
    return Base_10_to_n(int(X/n), n)+[X%n]
  return [X%n]


#############
# Main Code #
#############

x1,y1,x2,y2 = inputIL()

if x1==x2:
  if y1>y2:
    a = y1-y2
    print(x1+a,y2,x1+a,y1)
  else:
    a = y2-y1
    print(x1-a,y2,x1-a,y1)
    
else:
  if x1>x2:
    a = x1-x2
    print(x1,y1-a,x2,y1-a)
  else:
    a = x2-x1
    print(x2,y1+a,x1,y1+a)

Submission status: Wrong Answer

Solution code:
a, b, c, d = map(int, input().split())
if a == c:
    e = a+(b-d)
    f = d
    g = a+(b-d)
    h = b
else:
    e = c
    f = d+(a-c)
    g = a
    h = d+(a-c)
A = [e, f, g, h]
print(*A)

Submission status: Wrong Answer

Solution code:
a, b, c, d = map(int, input().split())
if a == c:
    e = a+(b-d)
    f = d
    g = a+(b-d)
    h = b
else:
    e = a
    f = d+(a-c)
    g = c
    h = d+(a-c)
A = [e, f, g, h]
print(*A)

Submission status: Wrong Answer

Solution code:
x1, y1, x2, y2 = list(map(int, input().split()))
l = max(abs(x1 - x2), abs(y1 - y2))
x3, y3, x4, y4 = 0, 0, 0, 0
if y1 == y2:
    if x1 < x2:
        x3, y3 = x2, y2 + l
        x4, y4 = x1, y1 + l
    else:
        x3, y3 = x2, y2 - l
        x4, y4 = x1, y1 - l
else:
    if y1 < y2:
        x3, y3 = x2 - l, y2
        x4, y4 = x1 - l, y1
    else:
        x3, y3 = x2 + l, y2
        x4, y4 = x1 + l, y1
print('{} {} {} {}'.format(x3, y3, x4, y4))

Submission status: Wrong Answer

Solution code:
x1, y1, x2, y2 = map(int, input().split())

x = x2 - x1
y = y2 - y1
print(y2 - y, y2 + x, x1 - y, y1 + x)

Submission status: Wrong Answer

Solution code:
x1, y1, x2, y2 = map(int, input().split())

x3 = x2 - (y2 - y1)
y3 = y2 - (x2 - x1)
x4 = x3 - (x2 - x1)
y4 = y3 - (y2 - y1)

print(x3, y3, x4, y4)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
x1, y1, x2, y2 = map(int, input().split())
if y1 == y2:
    print(x2 - (y2 - y1), y2, x2 - (y2 - y1), y1)
else:
    print(x2 - (y2 - y1), y2 + (x2 - x1), x2 - (y2 - y1) - (x2 - x1), y2 + (x2 - x1) - (y2 - y1))

Submission status: Wrong Answer

Solution code:
x1, y1, x2, y2 = map(int, input().split())

#x_diff = 2 3 6 6
#diff = abs(x1-x2) if x1!=x2 else abs(y1-y2)

def up(x_pre, y_pre, x_diff, y_diff):
  return x_pre-x_diff, y_pre+y_diff
def left(x_pre, y_pre, x_diff, y_diff):
  return x_pre-x_diff, y_pre-y_diff
def down(x_pre, y_pre, x_diff, y_diff):
  return x_pre+x_diff, y_pre-y_diff
def right(x_pre, y_pre, x_diff, y_diff):
  return x_pre+x_diff, y_pre+y_diff

x_diff_ = x2 - x1
y_diff_ = y2 - y1
print(x_diff_, y_diff_)
rotate = []
if y_diff_ >= 0:
  if x_diff_ >= 0:
    print(1)
    rotate = [up, left]
  else:
    print(2)
    rotate = [left, down]
else:
  if x_diff_ >= 0:
    print(3)
    rotate = [right, up]
  else:
    print(4)
    rotate = [down, right]
  
x3, y3 = rotate[0](x2, y2, abs(y2-y1), abs(x2-x1))
print(abs(y2-y1), abs(x2-x1))
x4, y4 = rotate[1](x3, y3, abs(y3-y2), abs(x3-x2))
print(abs(y3-y2), abs(x3-x2))
print(x3, y3, x4, y4)

Submission status: Wrong Answer

Solution code:
x1, y1, x2, y2 = map(int, input().split())

#x_diff = 2 3 6 6
#diff = abs(x1-x2) if x1!=x2 else abs(y1-y2)

def up(x_pre, y_pre, x_diff, y_diff):
  return x_pre-x_diff, y_pre+y_diff
def left(x_pre, y_pre, x_diff, y_diff):
  return x_pre-x_diff, y_pre-y_diff
def down(x_pre, y_pre, x_diff, y_diff):
  return x_pre+x_diff, y_pre-y_diff
def right(x_pre, y_pre, x_diff, y_diff):
  return x_pre+x_diff, y_pre+y_diff

x_diff_ = x2 - x1
y_diff_ = y2 - y1
rotate = []
if abs(y_diff_) >= 0:
  if x_diff_ >= 0:
    rotate = [up, left]
  else:
    rotate = [left, down]
else:
  if x_diff_ >= 0:
    rotate = [right, up]
  else:
    rotate = [down, right]
  
x3, y3 = rotate[0](x2, y2, abs(y2-y1), abs(x2-x1))
x4, y4 = rotate[1](x3, y3, abs(y3-y2), abs(x3-x2))
print(x3, y3, x4, y4)

Submission status: Wrong Answer

Solution code:
x1, y1, x2, y2 = map(int, input().split())

if y1 > y2:
    length = abs(x1-x2)
    x3 = x2 + length
    y3 = y2
    x4 = x1 + length
    y4 = y1
elif x2 > x1:
    length = abs(y1-y2)
    x3 = x2
    y3 = y2 + length
    x4 = x1
    y4 = y1 + length
elif y2 > y1:
    length = abs(y1-y2)
    x3 = x2 - length
    y3 = y2
    x4 = x1 - length
    y4 = y1
else:
    length = abs(x1-x2)
    x3 = x2
    y3 = y2 - length
    x4 = x1
    y4 = y1 - length
print(x3, y3, x4, y4)

Submission status: Wrong Answer

Solution code:
x1, x2, y1, y2 = map(int, input().split())

if y1 > y2:
    length = abs(x1-x2)
    x3 = x2 + length
    y3 = y2
    x4 = x1 + length
    y4 = y1
elif x2 > x1:
    length = abs(y1-y2)
    x3 = x2
    y3 = y2 + length
    x4 = x1
    y4 = y1 + length
elif y2 > y1:
    length = abs(y1-y2)
    x3 = x2 - length
    y3 = y2
    x4 = x1 - length
    y4 = y1
else:
    length = abs(x1-x2)
    x3 = x2
    y3 = y2 - length
    x4 = x1
    y4 = y1 - length
print(x3, x4, y3, y4)

Submission status: Wrong Answer

Solution code:
x1, x2, y1, y2 = map(int, input().split())

if y1 > y2:
    length = abs(x1-x2)
    x3 = x2 + length
    y3 = y2
    x4 = x2 + length
    y4 = y1
elif x2 > x1:
    length = abs(y1-y2)
    x3 = x2
    y3 = y2 + length
    x4 = x2
    y4 = y1 + length
elif y2 > y1:
    length = abs(y1-y2)
    x3 = x2 - length
    y3 = y2
    x4 = x2 - length
    y4 = y1
else:
    length = abs(x1-x2)
    x3 = x2
    y3 = y2 - length
    x4 = x2
    y4 = y1 - length
print(x3, x4, y3, y4)

Submission status: Wrong Answer

Solution code:
x1,y1,x2,y2 = map(int, input().split())
d = y2-y1
print(x2-d,y2,x2-d,y1)

Submission status: Wrong Answer

Solution code:
x1,y1,x2,y2 = map(int, input().split())
d = y1-y2
print(x2+d,y2,x2+d,y1)

Submission status: Wrong Answer

Solution code:
import sys
import math
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":
    x1,y1,x2,y2 = I2()
    v = x2 - x1#x
    w = y2 - y1#y
    print(x2-w,y2+v,x1-w,y2+v)

Submission status: Wrong Answer

Solution code:

X1,Y1,X2,Y2 = map(int, input().split())

length=abs(Y1-Y2)
width=abs(X1-X2)
X3,Y3= X2-length if Y1<Y2 else Y2+length, Y2+width if X1<X2 else Y2-width
X4,Y4= X1-length if Y1<Y2 else Y1+length, Y1+width if X1<X2 else Y1-width
print("{} {} {} {}".format(X3,Y3,X4,Y4))

Submission status: Wrong Answer

Solution code:
X1,Y1,X2,Y2 = map(int, input().split())

length=abs(Y1-Y2)
width=abs(X1-X2)
X3,Y3= X2-length, Y2+width if X1<X2 else Y2-width
X4,Y4= X1-length, Y1+width if X1<X2 else Y1-width
print("{} {} {} {}".format(X3,Y3,X4,Y4))

Submission status: Wrong Answer

Solution code:
x1, y1, x2, y2 = list(map(int, input().split()))
d = abs(x2-x1) + abs(y2-y1)
print(x2-d,y2,x1-d,y1)

Submission status: Wrong Answer

Solution code:
x1, y1, x2, y2 = map(int, input().split())

if x1 == x2:
    if y1 > y2:
        x3 = x1 + (y1 - y2)
        x4 = x3
        y3 = y2
        y4 = y1
    else:
        x3 = x1 - (y2 - y1)
        x4 = x3
        y3 = y2
        y4 = y1

elif y1 == y2:
    if x1 > x2:
        x3 = x2
        x4 = x1
        y3 = x2 - (x1 - x2)
        y4 = y3
    else:
        x3 = x2
        x4 = x1
        y3 = x2 + (x2 - x1)
        y4 = y3

else:
    xd = x2 - x1
    yd = y2 -y1
    x3 = x2 - yd
    y3 = y2 + xd
    x4 = x3 - xd
    y4 = y3 -yd

print(x3, y3, x4, y4)

Submission status: Wrong Answer

Solution code:
x1, y1, x2, y2 = map(int, input().split())

if x1 == x2:
    if y1 > y2:
        x3 = x1 + (y1 - y2)
        x4 = x3
        y3 = y2
        y4 = y1
    else:
        x3 = x1 - (y2 - y1)
        x4 = x3
        y3 = y2
        y4 = y1

else:
    if x1 > x2:
        x3 = x2
        x4 = x1
        y3 = x2 - (x1 - x2)
        y4 = y3
    else:
        x3 = x2
        x4 = x1
        y3 = x2 + (x2 - x1)
        y4 = y3

print(x3, y3, x4, y4)

Submission status: Wrong Answer

Solution code:
x1,y1,x2,y2 = map(int,input().split())

dx = x2-x1
dy = y2-y1

print(x2-dy,y2-x1,x1-dy,y1-dx)

Submission status: Wrong Answer

Solution code:
import sys
readline = sys.stdin.buffer.readline
def main():
    x1, y1, x2, y2 = map(int, readline().split())
    A = complex(x1, y1)
    B = complex(x2, y2)
    routate = 1j
    C = (B-A) * routate + B
    D = (B-A) * routate + A
    print(C.real, C.imag, D.real, D.imag)
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
x1,y1,x2,y2 = map(int,input().split())

if x1<=x2 and y1<=y2:
    x3 = x2 - (abs(y2 - y1))
    y3 = y2 + (abs(x2 - x1))
    x4 = x3 - (abs(x2 - x1))
    y4 = y3 - (abs(y2 - y1))
elif x1>x2 and y1<=y2:
    x3 = x2 - (abs(y2 - y1))
    y3 = y2 - (abs(x2 - x1))
    x4 = x3 + (abs(x2 - x1))
    y4 = y3 - (abs(y2 - y1))
elif x1>x2 and y1>y2:
    x3 = x2 + (abs(y2 - y1))
    y3 = y2 - (abs(x2 - x1))
    x4 = x3 + (abs(x2 - x1))
    y4 = y3 + (abs(y2 - y1))
else:
    x3 = x2 - (abs(y2 - y1))
    y3 = y2 + (abs(x2 - x1))
    x4 = x3 - (abs(x2 - x1))
    y4 = y3 - (abs(y2 - y1))
print(x3,y3,x4,y4)

Submission status: Wrong Answer

Solution code:
x_1,y_1,x_2,y_2=map(int,input().split())
a=x_2-x_1
b=y_2-y_1
if b>0:
    if a>0:
        print(x_2-b,y_2+a,x_1-b,y_1+a)
    else:
        print(x_2-b,y_2-a,x_1-b,y_1-a)
else:
    if a>0:
        print(x_2+b,y_2+a,x_1+b,y_1+a)
    else:
        print(x_2+b,y_2-a,x_1+b,y_1-a)

Submission status: Wrong Answer

Solution code:
x1,y1,x2,y2 = map(int,input().split())
l = abs(y2 - y1)
x3 = x1 - l
y3 = y2
x4 = x3
y4 = y1
print(x3,y3,x4,y4)

Submission status: Wrong Answer

Solution code:
x1, y1, x2, y2 = list(map(int, input().split()))

dx, dy = abs(x1 - x2), abs(y1 - y2)

x3, y3 = x2 - dy, y2 + dx
x4, y4 = x1 - dy, y1 + dx
print(x3, y3, x4, y4)

Submission status: Wrong Answer

Solution code:
b = list(map(int, input().split()))
x1=b[0]
y1=b[1]
x2=b[2]
y2=b[3]
kyori=x1-x2
x3=x2
y3=y2-kyori
x4=x1
y4=y1-kyori
print(x3,y3,x4,y4)

Submission status: Wrong Answer

Solution code:
a, b, c, d = list(map(int, input().split()))

length = abs(a-c) + abs(b-d)
if a == b:
    print(a-length, d, a-length, b)
else:
    print(c, d+length, a, d+length)

Submission status: Wrong Answer

Solution code:
a, b, c, d = list(map(int, input().split()))

length = abs(a-b) + abs(c-d)
if a == b:
    print(a-length, d, a-length, b)
else:
    print(c, d+length, a, d+length)

Submission status: Wrong Answer

Solution code:
x1, y1, x2, y2 = map(int, input().split())

deltax = abs(x1 - x2)
deltay = abs(y1 - y2)

if x2 > x1 and y2 > y1 or deltax == 0 and y2 > y1:
    x3 = x2 - deltay
    y3 = y2 + deltax
    x4 = x1 - deltay
    y4 = y1 + deltax
elif x2 > x1 and y2 < y1 or deltax == 0 and y2 < y1:
    x3 = deltay + x2
    y3 = y2 - deltax
    x4 = deltay + x1
    y4 = y1 - deltax
elif x2 < x1 and y2 > y1 or deltay == 0 and x1 > x2:
    x3 = x2 - deltay
    y3 = y2 - deltax
    x4 = x1 - deltay
    y4 = y1 - deltax
elif x2 < x1 and y2 < y1 or deltay == 0 and x1 < x2:
    x3 = x2 + deltay
    y3 = y2 + deltax
    x4 = x1 + deltay
    y4 = y1 + deltax

else:
    print("ERROR")


print("{} {} {} {}".format(x3,y3,x4,y4))

Submission status: Wrong Answer

Solution code:
x1, y1, x2, y2 = map(int, input().split())

deltax = abs(x1 - x2)
deltay = abs(y1 - y2)

if x2 >= x1 and y2 >= y1:
    x3 = x2 - deltay
    y3 = y2 + deltax
    x4 = x1 - deltay
    y4 = y1 + deltax
elif x2 >= x1 and y2 <= y1:
    x3 = deltay + x2
    y3 = y2 - deltax
    x4 = deltay + x1
    y4 = y1 - deltax
elif x2 <= x1 and y2 >= y1:
    x3 = x2 - deltay
    y3 = y2 - deltax
    x4 = x1 - deltay
    y4 = y1 - deltax
elif x2 <= x1 and y2 <= y1:
    x3 = x2 + deltay
    y3 = y2 + deltax
    x4 = x1 + deltay
    y4 = y1 + deltax

else:
    print("ERROR")


print("{} {} {} {}".format(x3,y3,x4,y4))

Submission status: Wrong Answer

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7

x1, y1, x2, y2 = MAP()
l = sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
a = complex(x1, y1)
b = complex(x2, y2)
c = b + (a - b) * complex(cos(- pi / 2), sin(- pi / 2))
d = a + (b - a) * complex(cos(pi / 2), sin(pi / 2))
print(int(c.real), int(c.imag), int(d.real), int(d.imag))

Submission status: Wrong Answer

Solution code:
x1, y1, x2, y2 = map(complex, input().split())
OA = x1 + y1 * 1j
OB = x2 + y2 * 1j
OD = (1j + 1) * OA + 1j * OB
OC = OD + OB - OA

x4, y4 = int(OD.real), int(OD.imag)
x3, y3 = int(OC.real), int(OC.imag)
print(x3, y3, x4, y4)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!

x_1,y_1,x_2,y_2=map(int,input().split())
leng=y_2-x_1
print('{} {} {} {}'.format(x_2-leng,y_2,x_1-leng,y_1))

Submission status: Wrong Answer

Solution code:
import numpy as np
x1, y1, x2, y2 = map(int, input().split())
# r = int(np.sqrt((x1 - x2)**2 + (y1 - y2)**2))
dx = abs(x1 - x2)
dy = abs(y1 - y2)
# print(dx, dy)
if x1 > x2:
    y3 = y2 - dx 
    if y1 > y2:
        x3 = x2 - dy
        # y3 = y2 
        x4 = x3 + dx
        y4 = y3 - dy
    else:
        x3 = x2 + dy
        # y3 = y2 + dx
        x4 = x3 + dx
        y4 = y3 - dy
else:
    y3 = y2 + dx
    if y1 > y2:
        x3 = x2 + dy
        x4 = x3 - dx
        y4 = y3 - dy
    else:
        x3 = x2 - dy
        x4 = x3 - dx
        y4 = y3 - dy

print(x3, y3, x4, y4)

Submission status: Wrong Answer

Solution code:
import numpy as np
x1, y1, x2, y2 = map(int, input().split())
# r = int(np.sqrt((x1 - x2)**2 + (y1 - y2)**2))
dx = abs(x1 - x2)
dy = abs(y1 - y2)
# print(dx, dy)
if x1 > x2:
    y3 = y2 - dx 
    if y1 > y2:
        x3 = x2 - dy
        # y3 = y2 
        x4 = x3 + dx
        y4 = y3 - dy
    else:
        x3 = x2 - dy
        # y3 = y2 + dx
        x4 = x3 + dx
        y4 = y3 - dy
else:
    y3 = y2 + dx
    if y1 > y2:
        x3 = x2 + dy
        x4 = x3 - dx
        y4 = y3 - dy
    else:
        x3 = x2 + dy
        x4 = x3 - dx
        y4 = y3 - dy

print(x3, y3, x4, y4)

Submission status: Wrong Answer

Solution code:
import numpy as np
x1, y1, x2, y2 = map(int, input().split())
# r = int(np.sqrt((x1 - x2)**2 + (y1 - y2)**2))
dx = abs(x1 - x2)
dy = abs(y1 - y2)
# print(dx, dy)
if x1 > x2:
    y3 = y2 - dx 
    if y1 > y2:
        x3 = x2 - dy
        # y3 = y2 
        x4 = x3 + dx
        y4 = y3 - dy
    else:
        x3 = x2 - dy
        # y3 = y2 + dx
        x4 = x3 + dx
        y4 = y3 - dy
else:
    y3 = y2 + dx
    if y1 > y2:
        x3 = x2 + dy
        x4 = x3 - dx
        y4 = y3 - dy
    else:
        x3 = x2 - dy
        x4 = x3 - dx
        y4 = y3 - dy

print(x3, y3, x4, y4)

Submission status: Wrong Answer

Solution code:
import numpy as np
x1, y1, x2, y2 = map(int, input().split())
# r = int(np.sqrt((x1 - x2)**2 + (y1 - y2)**2))
dx = abs(x1 - x2)
dy = abs(y1 - y2)
print(dx, dy)
if x1 > x2:
    y3 = y2 - dx 
    if y1 > y2:
        x3 = x2 - dy
        # y3 = y2 
        x4 = x3 + dx
        y4 = y3 - dy
    else:
        x3 = x2 - dy
        # y3 = y2 + dx
        x4 = x3 + dx
        y4 = y3 - dy
else:
    y3 = y2 + dx
    if y1 > y2:
        x3 = x2 + dy
        x4 = x3 - dx
        y4 = y3 - dy
    else:
        x3 = x2 - dy
        x4 = x3 - dx
        y4 = y3 - dy

print(x3, y3, x4, y4)

Submission status: Wrong Answer

Solution code:
n=list(map(int,input().split()))
ans_l=[n[2]+n[1]-n[3],n[3]-n[0]+n[2],n[0]+n[1]-n[3],n[1]-n[0]+n[2]]
print(ans_l)

Submission status: Wrong Answer

Solution code:
x1,y1,x2,y2=map(int,input().split())
dx=x2-x1
dy=y2-y1
x3=x2-dy
y3=x2+dx
x4=x3-dx
y4=y3-dy
print(x3,y3,x4,y4)

Submission status: Wrong Answer

Solution code:
x1,y1,x2,y2=map(int,input().split())
#90°回転より、
#x1'=y1,y1'=x1,x2'=y2,y2'=x2
x4=x1+(y2-y1)
#x4=x1+(x1'-x2')
x3=x2+(y2-y1)
y4=y1+(x2-x1)
y3=y2+(x2-x1)
 
print(x3,y3,x4,y4)

Submission status: Wrong Answer

Solution code:
x1,y1,x2,y2=map(int,input().split())
#90°回転より、
#x1'=y1,y1'=x1,x2'=y2,y2'=x2
x4=x1+(y1-y2)
#x4=x1+(x1'-x2')
x3=x2+(y1-y2)
y4=y1+(x1-x2)
y3=y2+(x1-x2)

print(x3,y3,x4,y4)

Submission status: Wrong Answer

Solution code:
a = [list(map(int, s.split())) for s in open(0)] 
a = a[0]

tmp1 = a[2] - a[0]
tmp2 = a[3] - a[1]



print(int(tmp1 - a[3]), int(tmp2 - a[2]), int(tmp1 - a[1]), int(tmp2 - a[2]))

Submission status: Wrong Answer

Solution code:
x1, y1, x2, y2 = map(int,input().split())
dx = x2-x1
dy = y2-y1
print(x2-dy,y2+dx,x2-dy+dx,y2+dx-dy)

Submission status: Wrong Answer

Solution code:
x1,y1,x2,y2=map(int,input().split())
dx=abs(x1-x2)
dy=abs(y1-y2)
if x1<x2 and y1<=y2:
    x3=x2-dy
    y3=y2+dx
    x4=x3-dx
    y4=y3-dy
if x1>=x2 and y1<y2:
    x3=x2-dy
    y3=y2-dx
    x4=x3+dx
    y4=y3-dy
if x1>x2 and y1>=y2:
    x3=x2-dy
    y3=y2+dx
    x4=x3-dx
    y4=y3-dy
elif x1<=x2 and y1>y2:
    x3=x2+dy
    y3=y2+dx
    x4=x3-dx
    y4=y3+dy
print(x3,y3,x4,y4)

Submission status: Wrong Answer

Solution code:
def main():
    x1, y1, x2, y2 = map(int, input().split(" "))
    dx = abs(x1 - x2)
    dy = abs(y1 - y2)
    if x1 > x2 or y1 > y2:
        print(x2 - dy, y2 - dx, x1 - dy, y1 - dx)
    else:
        print(x2 - dy, y2 + dx, x1 - dy, y1 + dx)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
x1,y1,x2,y2=map(int,input().split())
print((x2-(y2-y1)),(y2-(x1-x2)),(x1-(y2-y1)),(x1-(x1-x2)))

Submission status: Wrong Answer

Solution code:
A = list(map(int, input().split()))
L = len(A)
ans = [0, 0, 0, 0]
dx = A[2] - A[0]
dy = A[3] - A[1]
if(dx>0 and dy>0):
    dx = abs(dx)
    dy = abs(dy)
    x3 = A[2] - dy
    y3 = A[3] + dx
    x4 = x3 - dx
    y4 = y3 - dy
elif(dx>0 and dy<0):
    dx = abs(dx)
    dy = abs(dy)
    x3 = A[2] + dy
    y3 = A[3] + dx
    x4 = x3 - dx
    y4 = y3 + dy
elif(dx<0 and dy<0):
    dx = abs(dx)
    dy = abs(dy)
    x3 = A[2] + dy
    y3 = A[3] - dx
    x4 = x3 + dx
    y4 = y3 + dy
else:
    dx = abs(dx)
    dy = abs(dy)
    x3 = A[2] - dy
    y3 = A[3] - dx
    x4 = x3 + dx
    y4 = y3 - dy

ans[0] = str(x3)
ans[1] = str(y3)
ans[2] = str(x4)
ans[3] = str(y4)
ans = ' '.join(ans)
print(ans)

Submission status: Wrong Answer

Solution code:
A = list(map(int, input().split()))
L = len(A)
ans = [0, 0, 0, 0]
dx = A[2] - A[0]
dy = A[3] - A[1]
if(dx>0 and dy>0):
    dx = abs(dx)
    dy = abs(dy)
    x3 = A[2] - dy
    y3 = A[3] + dx
    x4 = x3 - dx
    y4 = y3 - dy
elif(dx>0 and dy<0):
    dx = abs(dx)
    dy = abs(dy)
    x3 = A[2] - dy
    y3 = A[3] + dx
    x4 = x3 - dx
    y4 = y3 + dy
elif(dx<0 and dy>0):
    dx = abs(dx)
    dy = abs(dy)
    x3 = A[2] + dy
    y3 = A[3] + dx
    x4 = x3 + dx
    y4 = y3 - dy
else:
    dx = abs(dx)
    dy = abs(dy)
    x3 = A[2] - dy
    y3 = A[3] - dx
    x4 = x3 + dx
    y4 = y3 - dy

ans[0] = str(x3)
ans[1] = str(y3)
ans[2] = str(x4)
ans[3] = str(y4)
ans = ' '.join(ans)
print(ans)