TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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.

Submission attempts (in order):
a,b,c,d=map(int,input().split())
y,x=c-a,d-b
print("{} {} {} {}".format(c+x,d+y,a-x,b-y))

a,b,c,d=map(int,input().split())
y,x=c-a,d-b
print("{} {} {} {}".format(c-x,d+y,a-x,b+y))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def SS(): return map(str,sys.stdin.readline().rstrip().split())
def II(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

x1,y1,x2,y2 = II()
norm = ((x1-x2)**2 + (y1-y2)**2) ** (0.5)
radian = math.atan2(y1-y2,x1-x2)

if radian >= 0:
  x3 = x2 + norm * math.sin(radian)
  y3 = y2 + norm * math.cos(radian)

  x4 = x1 + norm * math.sin(radian)
  y4 = y1 + norm * math.cos(radian)
else:
  x3 = x2 + norm * math.sin(radian)
  y3 = y2 - norm * math.cos(radian)

  x4 = x1 + norm * math.sin(radian)
  y4 = y1 - norm * math.cos(radian)

print(int(x3),int(y3),int(x4),int(y4))

import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def SS(): return map(str,sys.stdin.readline().rstrip().split())
def II(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

x1,y1,x2,y2 = II()


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

print(x3,y3,x4,y4)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x1,y1,x2,y2=map(int,input().split())
print((y2-y1)+x2,-1*(x2-x1)+y2,-1*(y1-y2)+x1,(x1-x2)+y1)

x1,y1,x2,y2=map(int,input().split())
print(-1*(y2-y1)+x2,(x2-x1)+y2,(y1-y2)+x1,-1*(x1-x2)+y1)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
%%test_input https://abc108.contest.atcoder.jp/tasks/abc108_b
x1, y1, x2, y2 = map(int, input().split())
dx = x2 - x1
dy = y2 - y1
x3, y3 = x2 - dy, y2 + dx
x4, y4 = x3 - dx, y3 - dy
print('{} {} {} {}'.format(x3, y3, x4, y4))

x1, y1, x2, y2 = map(int, input().split())
dx = x2 - x1
dy = y2 - y1
x3, y3 = x2 - dy, y2 + dx
x4, y4 = x3 - dx, y3 - dy
print('{} {} {} {}'.format(x3, y3, x4, y4))

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
length = int(input())
s = input()

if s[:length // 2] == s[length // 2:]:
    print("Yes")
else:
    print("No")


length = int(input())
s = input()

if s[:length // 2] == s[length // 2:]:
    print("Yes")
else:
    print("No")


Ax, Ay, Bx, By = map(int, input().split())
x = Ax - Bx
y = Ay - By

print(Bx + y, By - x, Ax + y, Ay - x)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = list(map(int, input().split()))

a,b = (n[2] - n[0]), (n[3] - n[1])

o1,o2 = (n[2] - b), (n[3] + a)
o3,o4 = (o1 - a),(o2 - b)

print(" ".join([o1,o2,o3,o4]))

n = list(map(int, input().split()))

a,b = (n[2] - n[0]), (n[3] - n[1])

o1,o2 = (n[2] - b), (n[3] + a)
o3,o4 = (o1 - a),(o2 - b)

print(" ".join(list(map(str, [o1,o2,o3,o4]))))

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
x1,y1,x2,y2=map(int,input().split())
x=x2-x1
y=y2-y1
print(x2-y, y2+x, x1-y1, y1+x)

x1,y1,x2,y2=map(int,input().split())
x=x2-x1
y=y2-y1
print(x2-y, y2+x, x1-y, y1+x)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x1, y1, x2, y2 = map(int, input().split())
print(x2+y2-y1, y2+x2-x1, x1+y1-y2, y1-x1+x2)


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

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


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x1, y1, x2, y2 = map(int, input().split())
x = x2 - x1
y = y2 - y1
print(x, y)
z = int((x**2 + y**2) ** (1/2))
x3 = x2 - y
y3 = y2 + x
x4 = x1 - y
y4 = y1 + x
print(x3, y3, x4, y4)


x1, y1, x2, y2 = map(int, input().split())
x = x2 - x1
y = y2 - y1
z = int((x**2 + y**2) ** (1/2))
x3 = x2 - y
y3 = y2 + x
x4 = x1 - y
y4 = y1 + x
print(x3, y3, x4, y4)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x1,y1,x2,y2 = map(int,input().split())

dx = x1 - x2 #-4
dy = y1 - y2 #-3

x3,y3 = y2 - dy,x2 - dx
x4,y4 = x3 + dx,y3 + dy

print(x3,y3,x4,y4)


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

dx = x1 - x2 #-4
dy = y1 - y2 #-3

x3,y3 = x2 - dy,y2 - dx
x4,y4 = x3 + dx,y3 + dy

print(x3,y3,x4,y4)

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

dx = x1 - x2 #-4
dy = y1 - y2 #-3

x3,y3 = x2 + dy,y2 - dx
x4,y4 = x3 + dx,y3 + dy

print(x3,y3,x4,y4)


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
def resolve():
    x1, y1, x2, y2 = map(int, input().split())
    x3 = [x2-abs(y2-y1), x2+abs(y2-y1)]
    y3 = [y2-abs(x2-x1), y2+abs(x2-x1)]
    x4 = [x1-abs(y2-y1), x1+abs(y2-y1)]
    y4 = [y1-abs(x2-x1), y1+abs(x2-x1)]
    k = (x2-x1)**2+(y2-y1)**2
    s = 4*k**2
    for i in x3:
        for j in y3:
            for p in x4:
                for q in y4:
                    if (i-x2)**2+(j-y2)**2 == k and (p-x1)**2+(q-y1)**2 == k and (i-p)**2+(j-q)**2 == k and (i-x1)**2+(j-y1)**2 == s and (p-x2)**2+(q-y2)**2 == s:
                        print(i, j, p, q)
                        exit()
resolve()

def resolve():
    x1, y1, x2, y2 = map(int, input().split())
    x3 = [x2-abs(y2-y1), x2+abs(y2-y1)]
    y3 = [y2-abs(x2-x1), y2+abs(x2-x1)]
    x4 = [x1-abs(y2-y1), x1+abs(y2-y1)]
    y4 = [y1-abs(x2-x1), y1+abs(x2-x1)]
    k = (x2-x1)**2+(y2-y1)**2
    s = 4*k**2
    for i in x3:
        for j in y3:
            for p in x4:
                for q in y4:
                    if (i-x2)**2+(j-y2)**2 == k and (p-x1)**2+(q-y1)**2 == k and (i-p)**2+(j-q)**2 == k and (i-x1)**2+(j-y1)**2 == s and (p-x2)**2+(q-y2)**2 == s:
                        print(i, j, p, q)
resolve()


def resolve():
    x1, y1, x2, y2 = map(int, input().split())
    x3 = [x2-abs(y2-y1), x2+abs(y2-y1)]
    y3 = [y2-abs(x2-x1), y2+abs(x2-x1)]
    x4 = [x1-abs(y2-y1), x1+abs(y2-y1)]
    y4 = [y1-abs(x2-x1), y1+abs(x2-x1)]
    k = (x2-x1)**2+(y2-y1)**2
    for i in x3:
        for j in y3:
            for p in x4:
                for q in y4:
                    if (i-x2)**2+(j-y2)**2 == k and (p-x1)**2+(q-y1)**2 == k and (i-p)**2+(j-q)**2 == k and (i-x1)**2+(j-y1)**2 == k and (p-x2)**2+(q-y2)**2 == k:
                        print(i, j, p, q)
                        exit()
resolve()

x1, y1, x2, y2 = map(int, input().split())
k = (x2-x1)**2+(y2-y1)**2
for i in range(-100, 101):
    for j in range(-100, 101):
        for p in range(-100, 101):
            for q in range(-100, 101):
                if (i-x2)**2+(j-y2)**2 == k and (p-x1)**2+(q-y1)**2 == k and (i-p)**2+(j-q)**2 == k:
                    print(i, j, p, q)
                    exit()

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Time Limit Exceeded

Accepted
Problem: 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.

Submission attempts (in order):
x1 = int(input())
y1 = int(input())
x2 = int(input())
y2 = int(input())
v1x = x2 - x1
v1y = y2 - y1

v2x = -v1y
v2y = v1x
v3x = -v2y
v3y = v2x
x3 = x2 + v2x
y3 = y2 + v2y
x4 = x3 + v3x
y4 = y3 + v3y
print(x3, " ", y3, " ", x4, " ", y4)

x1, y1, x2, y2 = map(int, input().split())
v1x = x2 - x1
v1y = y2 - y1

v2x = -v1y
v2y = v1x
v3x = -v2y
v3y = v2x
x3 = x2 + v2x
y3 = y2 + v2y
x4 = x3 + v3x
y4 = y3 + v3y
print(x3, y3, x4, y4)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
a

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

X = x2 - x1
Y = y2 - y1

print((x2-Y),(y2 + X),(x1-Y),(y1 + X))

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
val = input().split()
val = [int(i) for i in val]

a, b, c, d = val

x1 = val[2] - val[0]
y1 = val[3] - val[1]

import numpy as np

print(x1, y1)

if x1 * y1 > 0:
    x2 = -1 * np.sign(x1) * abs(y1)
    y2 = np.sign(y1) * abs(x1)
    x3 = np.sign(x2) * abs(x1)
    y3 = -1 * np.sign(y2) * abs(y1)
elif x1 == 0:
    x2 = -1 * y1
    y2 = 0
    x3 = 0
    y3 = x2
else:
    x2 = np.sign(x1) * abs(y1)
    y2 = -1 * np.sign(y1) * abs(x1)
    x3 = -1 * np.sign(x2) * abs(x1)
    y3 = np.sign(y2) * abs(y1)

print(x2, y2, x3, y3)
   
e = c + x2
f = d + y2
g = e + x3
h = f + y3

print(e, f, g, h)

val = input().split()
val = [int(i) for i in val]

a, b, c, d = val

x1 = val[2] - val[0]
y1 = val[3] - val[1]

import numpy as np

if x1 * y1 >= 0:
    x2 = -1 * np.sign(x1) * abs(y1)
    y2 = np.sign(y1) * abs(x1)
    x3 = np.sign(x2) * abs(x1)
    y3 = -1 * np.sign(y2) * abs(y1)
else:
    x2 = np.sign(x1) * abs(y1)
    y2 = -1 * np.sign(y1) * abs(x1)
    x3 = -1 * np.sign(x2) * abs(x1)
    y3 = np.sign(y2) * abs(y1)

e = c + x2
f = d + y2
g = e + x3
h = f + y3

print(e, f, g, h)

val = input().split()
val = [int(i) for i in val]

a, b, c, d = val

x1 = val[2] - val[0]
y1 = val[3] - val[1]

import numpy as np

if x1 * y1 > 0:
    x2 = -1 * np.sign(x1) * abs(y1)
    y2 = np.sign(y1) * abs(x1)
    x3 = np.sign(x2) * abs(x1)
    y3 = -1 * np.sign(y2) * abs(y1)
elif x1 == 0:
    x2 = -1 * y1
    y2 = 0
    x3 = 0
    y3 = x2
elif y1 == 0:
    x2 = 0
    y2 = x1
    x3 = -1 * x1
    y3 = 0
else:
    x2 = np.sign(x1) * abs(y1)
    y2 = -1 * np.sign(y1) * abs(x1)
    x3 = -1 * np.sign(x2) * abs(x1)
    y3 = np.sign(y2) * abs(y1)

e = c + x2
f = d + y2
g = e + x3
h = f + y3

print(e, f, g, h)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import sys

def main():
  input = sys.stdin.readline
  x1, y1, x2, y2 = map(int, input().split())

  x4 = -(y2 - y1) + x1
  y4 = (x2 - x1) + y1
  x3 = x2 + x4 - x1
  y3 = y2 + y4 - y1
  print('{} {} {} {}'.format(x3, y3, x4, y4)


if __name__ == '__main__':
  main()

import sys

def main():
  input = sys.stdin.readline
  x1, y1, x2, y2 = map(int, input().split())

  x4 = -(y2 - y1) + x1
  y4 = (x2 - x1) + y1
  x3 = x2 + x4 - x1
  y3 = y2 + y4 - y1
  print('{} {} {} {}'.format(x3, y3, x4, y4))


if __name__ == '__main__':
  main()

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
A=input()
A=A.rstrip().split(" ")
x1=int(A[0])
y1=int(A[1])
x2=int(A[2])
y2=int(A[3])
#print(x1,y1,x2,y2)
x3=x2+(y1-y2)
y3=y2+(x2-x1)
x4=x1+(y2-y3)
y4=y1+(x2-x1)
print(x3,y3,x4,y4)

A=input()
A=A.rstrip().split(" ")
x1=int(A[0])
y1=int(A[1])
x2=int(A[2])
y2=int(A[3])
#print(x1,y1,x2,y2)
x3=x2+(y1-y2)
y3=y2+(x2-x1)
x4=x1-(y2-y1)
y4=y1+(x2-x1)
print(x3,y3,x4,y4)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import sys, os, math, bisect, itertools, collections, heapq, queue
# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
from decimal import Decimal
from collections import defaultdict, deque

sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)

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


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

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


if __name__ == '__main__':
    main()


import sys, os, math, bisect, itertools, collections, heapq, queue
# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
from decimal import Decimal
from collections import defaultdict, deque

sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)

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


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

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


if __name__ == '__main__':
    main()


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
l = raw_input().split()

x1 = int(l[0])
y1 = int(l[1])
x2 = int(l[2])
y2 = int(l[3])

a = max(abs(x1-x2), abs(y1-y2))

if x1 < x2:
  x3 = x2
  y3 = y1 + a
  x4 = x1
  y4 = y1 + a
elif x1 == x2:
  if y1 > y2:
    x3 = x2 + a
    y3 = y2
    x4 = x2 + a
    y4 = y1
  else:
    x3 = x2 - a
    y3 = y2
    x4 = x2 - a
    y4 = y1
elif x1 > x2:
  x3 = x2
  y3 = y1 - a
  x4 = x1
  y4 = y1 - a
  
print(str(x3)+' '+str(y3)+' '+str(x4)+' '+str(y4))

import math
l = input().split()

x1 = int(l[0])
y1 = int(l[1])
x2 = int(l[2])
y2 = int(l[3])

yoko = x2-x1
tate = y2-y1

x3 = x2 - tate
y3 = y2 + yoko
x4 = x1 - tate
y4 = y1 + yoko

  
print(str(x3)+' '+str(y3)+' '+str(x4)+' '+str(y4))


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
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)

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
x1,y1,x2,y2=map(int,input().split())
x3=x2-(y2-y1)
y3=y2-(x2-x1)
x4=x3-(y3-y2)
y4=y3-(x3-x2)
lst=[x3,y3,x4,y4]
print(*lst)

x1,y1,x2,y2=map(int,input().split())
x3=x2-(y2-y1)
y3=y2-(x2-x1)
x4=x3-(y1-y2)
y4=y3-(x1-x2)
lst=[x3,y3,x4,y4]
print(*lst)

x1,y1,x2,y2=map(int,input().split())
x3=x2-(y2-y1)
y3=y2+(x2-x1)
x4=x1+(y1-y2)
y4=y1-(x1-x2)
lst=[x3,y3,x4,y4]
print(*lst)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import sys

input = sys.stdin.readline


def main():
    x1, y1, x2, y2 = map(int, input().split())
    x, y = x2 - x1, y2 - y1
    print(x2 - y, y2 + x, x1 + y, y1 - x)
    # print(" ".join([x1 - x, y1, x2, y2]))


if __name__ == "__main__":
    main()


import sys

input = sys.stdin.readline


def main():
    x1, y1, x2, y2 = map(int, input().split())
    x, y = x2 - x1, y2 - y1
    print(x2 - y, y2 + x, x1 + y, y2 - x)
    # print(" ".join([x1 - x, y1, x2, y2]))


if __name__ == "__main__":
    main()


import sys

input = sys.stdin.readline


def main():
    x1, y1, x2, y2 = map(int, input().split())
    x, y = x2 - x1, y2 - y1
    print(x2 - y, y2 + x, x1 - y, y2 - x)
    # print(" ".join([x1 - x, y1, x2, y2]))


if __name__ == "__main__":
    main()


import sys

input = sys.stdin.readline


def main():
    x1, y1, x2, y2 = map(int, input().split())
    x, y = x1 - x2, y1 - y2
    print(x2 + y, y2 - x, x1 + y, y1 - x)
    # print(" ".join([x1 - x, y1, x2, y2]))


if __name__ == "__main__":
    main()


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
def rotleft(dx,dy):
  return -dy, dx

s = input().split()
x1 = int(s[0])
y1 = int(s[1])
x2 = int(s[2])
y2 = int(s[3])

dx = x2 - x1
dy = y2 - y1

dx,dy = rotleft(dx,dy)

x3 = x2 + dx
y3 = y2 + dy

dx,dy = rotleft(dx,dy)

x4 = x3 + dx
y4 = y3 + dy

print("%d,%d,%d,%d" % (x3,y3,x4,y4))
   

def rotleft(dx,dy):
  return -dy, dx

s = input().split()
x1 = int(s[0])
y1 = int(s[1])
x2 = int(s[2])
y2 = int(s[3])

dx = x2 - x1
dy = y2 - y1

dx,dy = rotleft(dx,dy)

x3 = x2 + dx
y3 = y2 + dy

dx,dy = rotleft(dx,dy)

x4 = x3 + dx
y4 = y3 + dy

print("%d %d %d %d" % (x3,y3,x4,y4))
   

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x1,y1,x2,y2 = map(int,input().split())
x3 = x2 + y1 - y2
y3 = y2 + x2 - x1
x4 = x1 + y1 - y2
y4 = y1 + x2 - x1
print("x3","","y3","","x4","","y4")

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):

import math
x1,x2,y1,y2 = map(int,input().split())
x = x1-x2
y = y1-y2

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



import math
x1,y1,x2,y2 = map(int,input().split())
x = x2-x1
y = y2-y1

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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x_1,y_1,x_2,y_2=tuple(map(int,input().split()))

be=[x_2-x_1,y_2-y_1]
za3=[x_2+(-1)*be[1],y_2+be[0]]
za4=[x_1+(-1)*be[1],y_1+be[0]]

print(za3[0],za3[1],za4[0],za4[

x_1,y_1,x_2,y_2=tuple(map(int,input().split()))

be=[x_2-x_1,y_2-y_1]
za3=[x_2+(-1)*be[1],y_2+be[0]]
za4=[x_1+(-1)*be[1],y_1+be[0]]

print(za3[0],za3[1],za4[0],za4[1])

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
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)


x1, y1, x2, y2 = list(map(int, input().split()))
x3 = x2 - (y2 - y1)
y3 = y2 + (x2 - x1)
x4 = x3 - (x2 - x1)
y4 = y3 - (y2 - y1)
print("{} {} {} {}".format(x3, y3, x4, y4))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
#ABC108B
x1, y1, x2, y2 = map(int, input().split())
dx = x2 - x1
dy = y2 - y1

x3 = x2 - dy
y3 = y2 + dx
 
x4 = x3 - dx
y4 = y3 - dy

#ABC108B
x1, y1, x2, y2 = map(int, input().split())
dx = x2 - x1
dy = y2 - y1

x3 = x2 - dy
y3 = y2 + dx
 
x4 = x3 - dx
y4 = y3 - dy

print(x3, y3, x4, y4)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
from sys import stdin
x1, y1, x2, y2 = [int(x) for x in stdin.readline.rstrip().split()]
print(x2-(y2-y1), y2+(x2-x1), x1-(y2-y1), y1+(x2-x1))

from sys import stdin
x1, y1, x2, y2 = [int(x) for x in stdin.readline().rstrip().split()]
print(x2-(y2-y1), y2+(x2-x1), x1-(y2-y1), y1+(x2-x1))

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
x1, y1, x2, y2 = map(int, input().split())
if (y2-y1) >=0 and (x2-x1) >=0:
    print(1)
    x3 = x2 - abs(y2-y1)
    y3 = y2 + abs(x2-x1)
elif (y2-y1) >=0 and (x2-x1) <0:
    print(2)
    x3 = x2 - abs(y2-y1)
    y3 = y2 - abs(x2-x1)
elif (y2-y1) <0 and (x2-x1) >=0:
    print(3)
    x3 = x2 + abs(y2-y1)
    y3 = y2 + abs(x2-x1)
else:
    print(4)
    x3 = x2 + abs(y2-y1)
    y3 = y2 - abs(x2-x1)
x4 = x3 - (x2-x1)
y4 = y3 - (y2-y1)
print(x3, y3, x4, y4)

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x0, y0, x1, y1 = [int(x) for x in input().split()]
dx = x1 - x0
dy = y1 - y0
print(x1 + dy, y1 - dx)
print(x0 + dy, y0 - dx)


x0, y0, x1, y1 = [int(x) for x in input().split()]
dx = x1 - x0
dy = y1 - y0
print(x1 - dy, y1 + dx, x0 - dy, y0 + dx)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
# coding:utf-8

INF = float('inf')


def inpl(): return list(map(int, input().split()))


x1, y1, x2, y2 = inpl()

diff_y = y2 - y1
diff_x = x2 - x1
ans1 = [x2 - diff_y, y2 + diff_x]
ans2 = [ans1[0] - diff_x, ans1[1] - diff_y]
ans = ans1 + ans2
print(' '.join(map(str, ans))

# coding:utf-8

INF = float('inf')


def inpl(): return list(map(int, input().split()))


x1, y1, x2, y2 = inpl()

diff_y = y2 - y1
diff_x = x2 - x1
ans1 = [x2 - diff_y, y2 + diff_x]
ans2 = [ans1[0] - diff_x, ans1[1] - diff_y]
ans = ans1 + ans2
ans = ' '.join(map(str, ans))
print(ans)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
x1,y1,x2,y2 = map(int,input())

x = x2-x1
y = y2-y1

x3 = x2 - y
y3 = y2 + x
x4 = x3 - x
y4 = y3 - y

print(x3,y3,x4,y4)




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

x = x2-x1
y = y2-y1

x3 = x2 - y
y3 = y2 + x
x4 = x3 - x
y4 = y3 - y

print(x3,y3,x4,y4)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
a,b,c,d=map(int,input(),split())
e=(d-b)
f=(c-a)
print(c-e,d+f,a-e,b+f)

a,b,c,d=map(int,input().split())
e=(d-b)
f=(c-a)
print(c-e,d+f,a-e,b+f)


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
x1, y1, x2, y2 = map(int, input().split())
if x1 == x2:
  y3 = y2
  y4 = y1
  x3 = x2 + y2 - y1
  x4 = x1 + y2 - y1
else:# y1 == y2
  x3 = x2
  x4 = x1
  y3 = y2 + x2 - x1
  y4 = y1 + x2 - x1
  
print(x3, x4, y3, y4)

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

#print( x2 - x1, y2 - y1)

x3 = x2 - y2 + y1
y3 = y2 + x2 - x1
x4 = x1 - y2 + y1
y4 = y1 + x2 - x1

print(x3, y3, x4, y4)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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)


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



Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a,b,c,d = map(int,input().split())

x = a-(d-b)
y = b+(c-a)
z = x+(c-a)
w = y+(d-b)

print(x,y,z,w)


a,b,c,d = map(int,input().split())

x = a-(d-b)
y = b+(c-a)
z = x+(c-a)
w = y+(d-b)

print(z,w,x,y)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
nums = list(map(int, input().split()))
x = abs(nums[0] - nums[2])
y = abs(nums[1] - nums[3])

n1 = nums[2] - y
n2 = nums[3] + x
print(n1, end="")
print(" ", end="")
print(n2, end="")
print(" ", end="")
print(n1 - x, end="")
print(" ", end="")
print(n2 - y, end="")
print(" ", end="")

nums = list(map(int, input().split()))
x = (nums[2] - nums[0])
y = (nums[3] - nums[1])

n1 = nums[2] - y
n2 = nums[3] + x
print(n1, end="")
print(" ", end="")
print(n2, end="")
print(" ", end="")
print(n1 - x, end="")
print(" ", end="")
print(n2 - y)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a,b,c,d=map(int,input().split())
w=c-a
h=b-d
ans=[c-h,d+w,a-h,b+w]
print(*ans)
res=[c+h,d-w,a+h,b-w]
print(*res)

x1,y1,x2,y2=map(int,input().split())
h=y2-y1;w=x2-x1
x3=x2-h
y3=y2+w
x4=x3-w
y4=y3-h
print(x3,y3,x4,y4)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x(1),y(1),x(2),y(2)=map(int,input().split())
for i in range(3,5):
  x(i)=x(i-1)+y(i-2)-y(i-1)
  y(i)=y(i-1)+x(i-1)-x(i-2)
print(x(3) y(3) x(4) y(4))


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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
x1,y1,x2,y2=map(int,input().split())
dx=x1-x2
dy=y1-y2

x3=x2+dy
y3=y2-dx

x4=x1+dy
y4=y1-dx
ans=[x3,y3,x4,y4]
print("".join(list(map(str,ans)))

x1,y1,x2,y2=map(int,input().split())
dx=x1-x2
dy=y1-y2

x3=x2+dy
y3=y2-dx

x4=x1+dy
y4=y1-dx
ans=[x3,y3,x4,y4]
print(" ".join(list(map(str,ans))))

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
xyList = list(map(int,input().split()))
print(xyList)
x = xyList[2]-xyList[0]
y = xyList[3]-xyList[1]
print(xyList[2]-y,xyList[3]+x,xyList[0]-y,xyList[1]+x)


xyList = list(map(int,input().split()))
print(xyList)
x = xyList[2]-xyList[0]
y = xyList[3]-xyList[1]
print(xyList[2]-y,xyList[3]+x,xyList[0]-y,xyList[1]+x)


xyList = list(map(int,input().split()))
x = xyList[2]-xyList[0]
y = xyList[3]-xyList[1]
print(xyList[2]-y,xyList[3]+x,xyList[0]-y,xyList[1]+x)


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

x1, y1, x2, y2 = rm()
c1, c2 = x1+y1*1j, x2+y2*1j
c3, c4 = -1j*(c2-c1), 1j*(c1-c2)
print(int(c3.real), int(c3.imag), int(c4.real), int(c4.imag))




import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

x1, y1, x2, y2 = rm()
c1, c2 = x1+y1*1j, x2+y2*1j
c3, c4 = -1j*(c1-c2), 1j*(c2-c1)
print(int(c3.real), int(c3.imag), int(c4.real), int(c4.imag))




import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

x1, y1, x2, y2 = rm()
c1, c2 = x1+y1*1j, x2+y2*1j
c3, c4 = -1j*(c1-c2) + c2, 1j*(c2-c1) + c1
print(int(c3.real), int(c3.imag), int(c4.real), int(c4.imag))




Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x1,y1,x2,y2=map(int,input().split())
print(x2+y1-y2,y2+x2-x1,x3+y2-y3,y3+x3-x2)

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
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))

x1, y1, x2, y2 = list(map(int, input().split()))
A = x2 - x1
B = y2 - y1
print(A, B)
x3 = x2 - B
if x1 >= y2:
    y3 = y2 - A
else:
    y3 = y2 + A
x4 = x3 - A

y4 = y3 - B
print(x3, y3, x4, y4)


import math
x1, y1, x2, y2 = map(int, input().split())
x2 -= x1
y2 -= y1
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
#theta = 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))

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x1,y1,x2,y2 = map(int, input().split())
len = abs(x1 - x2)

x4 = x1 - len
x3 = x2 - len
y4 = y1 - len
y3 = y2 - len

print(x3 + " " + y3 + " " + x4 + " " + y4) 

x1,y1,x2,y2 = map(int, input().split())
ylen = y2 - y1
xlen = x2 - x1

x3 = x2 - ylen
y3 = y2 + xlen
x4 = x3 - xlen
y4 = y3 - ylen

print(str(x3) + " " + str(y3) + " " + str(x4) + " " + str(y4))

Verdicts: Runtime Error

Accepted