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):
import numpy as np
ps = list(map(int, input().split()))
v1 = [ps[2]-ps[0], ps[3]-ps[1]]
res = []
res.append(ps[2]-v1[1])
res.append(ps[3]+v1[0])
res.append(res[0]-v1[0])
res.append(res[1]-v1[1])
print(res)

import numpy as np
ps = list(map(int, input().split()))
v1 = [ps[2]-ps[0], ps[3]-ps[1]]
res = []
res.append(ps[2]-v1[1])
res.append(ps[3]+v1[0])
res.append(res[0]-v1[0])
res.append(res[1]-v1[1])
print("{} {} {} {}".format(res[0],
                           res[1],
                           res[2],
                           res[3]))

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):
def next(x1, y1, x2, y2):
  xd = x2 - x1
  yd = y2 - y1
  nyd = xd
  if xd > 0:
    nxd = -1*yd if yd > 0 else yd 
  else:
    nxd = -1*yd
  print(xd,yd,nxd,nyd)
  x3 = x2 + nxd
  y3 = y2 + nyd
  return [x3,y3]

x1, y1, x2, y2 = list(map(int,input().split()))
p3 = next(x1,y1,x2,y2)
p4 = next(x2,y2,p3[0],p3[1])
print(p3[0],p3[1],p4[0],p4[1])

def next(x1,y1,x2,y2):
  xd = x2 - x1
  yd = y2 - y1
  nyd = xd
  nxd = -yd
  return [x2+nxd,y2+nyd]

x1,y1,x2,y2 = list(map(int,input().split()))
x3,y3 = next(x1,y1,x2,y2)
x4,y4 = next(x2,y2,x3,y3)
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
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()

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(int(C.real), int(C.imag), int(D.real), int(D.imag))
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 = list(map(int, input().split()))
print(l)
a = l[2] - l[0] 
b = l[3] - l[1] 

if l[2]>=l[0]:
    if l[3]>l[1]:
        a1 = - b
        b1 = a
        a2 = -a
        b2 = -b

    if l[3]<l[1]:
        a1 = b
        b1 = a
        a2 = -a
        b2 = b

    x1 = l[2] + a1
    y1 = l[3] + b1
    x2 = x1 + a2
    y2 = y1 + b2
    print(x1, y1, x2, y2)
    exit()

elif l[2]<l[0]:
    if l[3]<=l[1]:
        a1 = b
        b1 = - a
        a2 = a
        b2 = b

    if l[3]>l[1]:
        a1 = - b
        b1 = - a
        a2 = a
        b2 = - b
        print("yes")

    x1 = l[2] + a1
    y1 = l[3] - b1
    x2 = x1 - a2
    y2 = y1 + b2
    print(x1, y1, x2, y2)



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

a = x2 - x1
b = y2 - y1

x3 = x2 - b
y3 = y2 + a
x4 = x2 - b - a
y4 = y2 + a - b

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())
k = abs(y2-y1)
m = x2-x1
print(k,m)
print(x2-k,y2-m,x1-k,y1-m)

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

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=x2-x1
dy=y2-y1
x3=x2-dy
y3=x2+dx
x4=x3-dx
y4=y3-dy
print(x3,y3,x4,y4)

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):
a,b,c,d=map(int,input().split())
l=[0]*4
l[0]=c+b-d
l[1]=d-(a-c)
l[2]=l[0]+a-c
l[3]=l[1]-(b-d) 
for i in range(3):
    print(l[i],end=' ')
print(l[3])

a,b,c,d=map(int,input().split())
l=[0]*4
l[0]=c+b-d
l[1]=d-(a-c)
l[2]=l[0]+a-c
l[3]=l[1]+(b-d) 
for i in range(3):
    print(l[i],end=' ')
print(l[3])


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,y3,x4,y4=x2-(y2-y1),y2+(x2-x1),x3-(x2-x1),y3-(y2-y1);print(x3,y3,x4,y4)

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)

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):
l = input().split()
p = [int(l[0]),int(l[1])]
q = [int(l[2]),int(l[3])]
r = [r1,r2]
s = [s1,s2]

if p[0]==q[0]:
    m = q[1]-p[1]
    r[0]=q[0]-m
    r[1]=q[1]
    s[0]=p[0]-m
    s[1]=p[1]
else:
    m = q[0]-p[0]
    r[0] = q[0] 
    r[1] = q[1]+m
    s[0] = p[0] 
    s[1] = p[1]+m
print(str(r1)+" "+str(r2)+" "+str(s1)+" "+str(s2))

l = input().split(" ")
p = [int(l[0]),int(l[1])]
q = [int(l[2]),int(l[3])]
r = [0,0]
s = [0,0]
if p[0]==q[0]:
    m = q[1]-p[1]
    r[0] = q[0]-m
    r[1] = q[1]
    s[0] = p[0]-m
    s[1] = p[1]
else:
    v = [q[1]-p[1],q[0]-p[0]]
    r[0]= q[0]-v[0]
    r[1]=q[1]+v[1]
    s[0]=p[0]-v[0]
    s[1]=p[1]+v[1]
print(str(r[0])+" "+str(r[1])+" "+str(s[0])+" "+str(s[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())
print(x2+y1-y2,y2-x1+x2,x1-x2+x3,y1-y2+y3)

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

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 - y1 + y2
y3 = y2 - x1 + x2
x4 = x3 + y2 - y3
x4 = y3 - x2 + x3
print(' '.join( list(map(str, [x3, y3, x4, y4])) ))

x1, y1, x2, y2 = map(int, input().split())
x3 = x2 + y1 - y2
y3 = y2 - x1 + x2
x4 = x3 + y2 - y3
y4 = y3 - x2 + x3
print(' '.join( map(str, [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):
xy=input().split()
x1=int(hw[0])
y1=int(hw[1])
x2=int(hw[2])
y2=int(hw[3])
a=x2-x1
b=y2-y1
print(x2-b,y2+a,x1-b,y1+a)

xy=input().split()
x1=int(xy[0])
y1=int(xy[1])
x2=int(xy[2])
y2=int(xy[3])
a=x2-x1
b=y2-y1
print(x2-b,y2+a,x1-b,y1+a)

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):
zahyou=input().rstrip().split(" ")
x1 = int(zahyou[0])
y1 = int(zahyou[1])
x2 = int(zahyou[2])
y2 = int(zahyou[3])
if(x1==x2):
    ippen=abs(y1-y2)
    kotae=[x1-ippen,y2,x1-ippen,y1]
    print(kotae)
else:
    ippen=abs(x1-x2)
    kotae=[x2,y2-ippen,x1,y2-ippen]
    print(kotae)

zahyou=input().rstrip().split(" ")
x1 = int(zahyou[0])
y1 = int(zahyou[1])
x2 = int(zahyou[2])
y2 = int(zahyou[3])
if(x1==x2 and y2>y1):
    ippen=y2-y1
    kotae=[x1-ippen,y2,x1-ippen,y1]
elif(y1==y2 and x2<x1):
    ippen=x1-x2
    kotae=[x2,y2-ippen,x1,y2-ippen]
elif(x1==x2 and y1>y2):
    ippen=y1-y2
    kotae=[x2+ippen,y2,x1+ippen,y1]
else:
    ippen=x2-x1
    kotae=[x2,y2+ippen,x1,y1+ippen]
    
print(kotae)

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


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):
k = int(input())
print((k//2)*((k+1)//2)


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)


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())
x4 = x1+y1-y2
y4 = x2-x1+y1
x3 = x2+y1-y2
y3 = x2-x1+y1
print(x3,y3,x4,y4)

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

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 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)

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)

x1, y1, x2, y2 = map(int, input().split())
 
x4 = x1 - (y2 - y1)
y4 = y1 + (x2 - x1)
 
x3 = x4 - (y1 - y4)
y3 = y4 + (x1 - x4)
 
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 actual(x1, y1, x2, y2):
    a = x2 - x1
    b = y2 - y1

    x3, y3 = x2 - b, y2 + a
    x4, y4 = x3 - a, y3 - b

    return x3, y3, x4, y4

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

def actual(x1, y1, x2, y2):
    a = x2 - x1
    b = y2 - y1

    x3, y3 = x2 - b, y2 + a
    x4, y4 = x3 - a, y3 - b

    # return f'{x3} {y3} {x4} {y4}'
    return '{} {} {} {}'.format(x3, y3, x4, y4)

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


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 numpy as np

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

a = np.array([[x1], [y1]])
b = np.array([[x2], [y2]])

rot = np.array([[0, -1], [1, 0]])
ab = b - a
bc = np.dot(rot, ab)

c = b + bc
d = a + bc

# print(a, b)
# print(c, d)

print(*c.flatten()+' '+*d.flatten())

import numpy as np

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

a = np.array([[x1], [y1]])
b = np.array([[x2], [y2]])

rot = np.array([[0, -1], [1, 0]])
ab = b - a
bc = np.dot(rot, ab)

c = b + bc
d = a + bc

# print(a, b)
# print(c, d)

print(*c.flatten(), end=" ")
print(*d.flatten())


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())

diff_x = x2 - x1
diff_y = y2 - y1

x3 = x1 - diff_y
y3 = y1 + diff_x

x4 = x2 - diff_y
y4 = y2 + diff_x

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

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

diff_x = x2 - x1
diff_y = y2 - x2

x3 = x1 - diff_y
y3 = y1 + diff_x

x4 = x2 - diff_y
y4 = y2 + diff_x

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

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

diff_x = x2 - x1
diff_y = y2 - y1

x4 = x1 - diff_y
y4 = y1 + diff_x

x3 = x2 - diff_y
y3 = y2 + diff_x

print("{} {} {} {}".format(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):
x1,y1,x2,y2=map(int,input().split())
h=x1-x2
v=y1-y2
print(str(x2-v)+" "+str(y2+h)+" "+str(x1-v)+" "+str(y1+h))

x1,y1,x2,y2=map(int,input().split())
x3=x2-(y2-y1)
y3=y2+(x2-x1)
x4=x3-(y3-y2)
y4=y3+(x3-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())

x = x2 - x1
y = y2 - y1
print(y2 - y, y2 + x, x1 - y, 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())

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

print(a, b)

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


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

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

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

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

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):
x, y, xx, yy = input().split()
x = int(x)
y = int(y)
xx = int(xx)
yy = int(yy)

xdiff = (xx-x)
ydiff = (yy-y)

if xdiff < 0 and ydiff < 0:
    xdiff = abs(xx-x)
    ydiff = abs(yy-y)
    print(str(xx+ydiff),str(yy-xdiff),str(x+ydiff),str(y-xdiff))
elif 0 < xdiff and 0 < ydiff:
    xdiff = abs(xx-x)
    ydiff = abs(yy-y)
    print(str(xx-ydiff),str(yy+xdiff),str(x-ydiff),str(y+xdiff))
elif xdiff < 0 and 0 < ydiff:
    xdiff = abs(xx-x)
    ydiff = abs(yy-y)
    print(str(xx-ydiff),str(yy-xdiff),str(x-ydiff),str(y-xdiff))
else:
    xdiff = abs(xx-x)
    ydiff = abs(yy-y)
    print(str(xx+ydiff),str(yy+xdiff),str(x+ydiff),str(y+xdiff))

x, y, xx, yy = input().split()
x = int(x)
y = int(y)
xx = int(xx)
yy = int(yy)

xdiff = (xx-x)
ydiff = (yy-y)

if xdiff <= 0 and ydiff <= 0:
    xdiff = abs(xx-x)
    ydiff = abs(yy-y)
    print(str(xx+ydiff),str(yy-xdiff),str(x+ydiff),str(y-xdiff))
elif 0 <= xdiff and 0 <= ydiff:
    xdiff = abs(xx-x)
    ydiff = abs(yy-y)
    print(str(xx-ydiff),str(yy+xdiff),str(x-ydiff),str(y+xdiff))
elif xdiff <= 0 and 0 <= ydiff:
    xdiff = abs(xx-x)
    ydiff = abs(yy-y)
    print(str(xx-ydiff),str(yy-xdiff),str(x-ydiff),str(y-xdiff))
else:
    xdiff = abs(xx-x)
    ydiff = abs(yy-y)
    print(str(xx+ydiff),str(yy+xdiff),str(x+ydiff),str(y+xdiff))

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):
def answer(in0, in1, in2, in3):
    x1 = int(in0)
    y1 = int(in1)
    x2 = int(in2)
    y2 = int(in3)

    width = (x2 - x1)
    height = (y2 - y1)

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

    print(x3, y3, x4, y4)

answer(input(), input(), input(), input())


def answer(in0):
    nums = [int(n) for n in in0.split(" ")]
    x1 = int(nums[0])
    y1 = int(nums[1])
    x2 = int(nums[2])
    y2 = int(nums[3])

    width = (x2 - x1)
    height = (y2 - y1)

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

    print(x3, y3, x4, y4)

answer(input())

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())
print(c+(d-b),d-(c-a),c+d-b-c+a,d-c+a-d+b)

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


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())
x=x1-x2;y=y1-y2
print(x2+y,y2-x,x1-y,y1+x)

x1,y1,x2,y2=map(int,input().split())
x=x1-x2;y=y1-y2
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):
import sys
x1,y1,x2,y2 = list(map(int, input().split()))

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

print(x3,y3,x4,y4)

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

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

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())
x = x1 - x2
y = y1 - y2
print(c - y, d + x, a - y, b + x)

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

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

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

Verdicts: Runtime Error

Runtime Error

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+y2-y1
y3=y2-x2+x1
x4=x1+y2-y1
y4=y1-x2+x1
print(x3,y3,x4,y4)

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)

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):
o

a=list(map(int,input().split()))
x1=a[0]
y1=a[1]
x2=a[2]
y2=a[3]
x=x2-x1
y=y2-y1
print(str(x2-y)+' '+str(x1-y)+' '+str(x1-y)+' '+str(y1+x))


X1, Y1, X2, Y2 = map(int, input().split())
X3, Y3 = X2-(Y2-Y1), Y2+(X2-X1)
X4, Y4 = X3-(Y3-Y2), Y3+(X3-X2)
print(X3, Y3, X4, Y4)

Verdicts: Runtime Error

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 = list(map(int, input().split(" ")))
print(a)

p1 = (a[0], a[1])
p2 = (a[2], a[3])

dif = (p2[0]-p1[0], p2[1]-p1[1])

p3 = (p2[0]-dif[1], p2[1]+dif[0])
p4 = (p3[0]-dif[0], p3[1]-dif[1])

print(p3[0], p3[1], p4[0], p4[1])

a = list(map(int, input().split(" ")))
 
p1 = (a[0], a[1])
p2 = (a[2], a[3])
 
dif = (p2[0]-p1[0], p2[1]-p1[1])
 
p3 = (p2[0]-dif[1], p2[1]+dif[0])
p4 = (p3[0]-dif[0], p3[1]-dif[1])
 
print(p3[0], p3[1], p4[0], p4[1])

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())
x = x2 - x1
y = y2 - y1
x3 = x2 + y
y3 = y2 - x
x4 = y1 - y
y4 = y1 + x
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 = x1 - y
y4 = y1 + x
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 = x1 + y
y4 = y1 - x
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 = x1 - y
y4 = y1 + x
print(x3, y3, x4, y4)


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):
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)

b = list(map(int, input().split()))
x1=b[0]
y1=b[1]
x2=b[2]
y2=b[3]
xkyori=abs(x1-x2)
ykyori=abs(y1-y2)
if x1>=x2:
    if y1>=y2:
        print(x2+ykyori,y2-xkyori,x1+ykyori,y1-xkyori)
    else:
        print(x2-ykyori,y2-xkyori,x1-ykyori,y1-xkyori)
else:
    if y1>=y2:
        print(x2 + ykyori, y2 + xkyori, x1 + ykyori, y1 + xkyori)
    else:
        print(x2-ykyori,y2+xkyori,x1-ykyori,y1+xkyori)

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())
nx = x2
ny = y2
l = []
for i in range(2) :
    dx, dy = -dy, dx
    nx += dx
    ny += dy
    l.append(nx)
    l.append(ny)
print(l[0], l[1], l[2], l[3])


x1, y1, x2, y2 = map(int, input().split())
dx = x2 - x1
dy = y2 - y1
nx = x2
ny = y2
l = []
for i in range(2) :
    dx, dy = -dy, dx
    nx += dx
    ny += dy
    l.append(nx)
    l.append(ny)
print(l[0], l[1], l[2], l[3])


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 numpy as np
x1_, y_1, x_2, y_2 = map(int, input().split())

x_4 = x_1 - (y_2 - y_1)
y_4 = y_1 + (x_2 - x_1)
x_3 = x_4 - (y_1 - y_4)
y_3 = y_4 + (x_1 - x_4)
 
print(x_3, y_3, x_4, y_4)

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

x_4 = x_1 - (y_2 - y_1)
y_4 = y_1 + (x_2 - x_1)
x_3 = x_4 - (y_1 - y_4)
y_3 = y_4 + (x_1 - x_4)
 
print(x_3, y_3, x_4, y_4)

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):
x_1,y_1,x_2,y_2=map(int,input().split())
x_3=-(y_2-y_1)+x_1
y_3=(x_1-x_2)+y_1
x_4=(x_3-x_1)+(x_2-x_1)+x_1
y_4=(y_3-y_1)+(y_2-y_1)+y_1
print(x_3 y_3 x_4 y_4)

x_1, y_1, x_2, y_2 = map(int, input().split())
x_3 = x_2 - y_2 + y_1
y_3 = y_2 + x_2 - x_1
x_4 = x_3 - x_2 + x_1
y_4 = y_3 - y_2 + y_1
print(x_3, y_3, x_4, y_4)


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())
deltax = x2 - x1
deltay = y2 - y1
x3 = x2 - deltay
y3 = y2 + deltax
x4 = x1 - deltay
y4 = y1 + deltax
print(x3, y3, x2, y2)

x1, y1, x2, y2 = map(int,input().split())
deltax = x2 - x1
deltay = y2 - y1
x3 = x2 - deltay
y3 = y2 + deltax
x4 = x1 - deltay
y4 = y1 + deltax
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=[int(i) for i in input().split()]

dx = x2 - x1
dy = y2 - y1

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

x1,y1,x2,y2=[int(i) for i in input().split()]

dx = x2 - x1
dy = y2 - y1

print(x2-dy,y2+dx,x1-dy,y1+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):
x1,y1,x2,y2 = map(int,input().split())
a = x2 - x1
b = y2 - y1
x3 = x2 - a
y3 = y2 + b
x4 = x1 - a
y4 = y1 + b
print(x3,y3,x4,y4)

x1,y1,x2,y2 = map(int,input().split())
a = x2 - x1
b = y2 - y1
x3 = x2 - b
y3 = y2 + a
x4 = x1 - b
y4 = y1 + a
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 numpy as np
p = map(int, input().split())
ps = list(map(lambda x, y: np.array([x, y]), p[::2], p[1::2]))+ [None, None]

ans = ""
for s, d, i in zip(ps[0:-1], ps[1:], range(2,4)):
  v = d - s
  s = d
  d = s + v.dot([[0,1], [-1,0]])
  ans += " ".join(map(str, d))
  ps[i] = d
print(ans[1:])


p = list(map(int, input().split()))
s, d = list(map(lambda x, y: x + y * 1j, p[::2], p[1::2]))

ans = ""
for _ in range(2):
  v = d - s
  s = d
  d = s + v * 1j
  ans += " {:.0f} {:.0f}".format(d.real, d.imag)
print(ans[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=list(map(int,input().split()))

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

elif x2<x1 and y2>y1:
  x3=x2-abs(y2-y1);y3=y2-abs(x2-x1);x4=x3+abs(y3-y2);y4=y3-abs(x3-x2)

elif x2<x1 and y2<y1:
  x3=x2+abs(y2-y1);y3=y2-abs(x2-x1);x4=x3+abs(y3-y2);y4=y3+abs(x3-x2)

elif x2>x1 and y2<y1:
  x3=x2+abs(y2-y1);y3=y2+abs(x2-x1);x4=x3-abs(y3-y2);y4=y3+abs(x3-x2)

  
print(x3,y3,x4,y4)


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


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())
print(x2+y2-y1,y2+x2-x1,x1+y2-y1,y1+x2-x1)

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

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
# Your code here!
x1,y1,x2,y2 = map(int,input().split())

print(x1,y1,x2,y2)
tx = y1-y2
ty = x2-x1

print(x2+tx,y2+ty,x1+tx,y1+ty)

# coding: utf-8
# Your code here!
x1,y1,x2,y2 = map(int,input().split())

tx = y1-y2
ty = x2-x1

print(x2+tx,y2+ty,x1+tx,y1+ty)

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 - (y2-y1)
y3 = y2 + (x2-x1)
x4 = x3 - (y3-y2)
y4 = y4 + (x3-x3)
print(x3,y3,x4,y4)

x1, y1,x2,y2 = map(int,input().split())
x3 = x2 - (y2-y1)
y3 = y2 + (x2-x1)
x4 = x3 - (y3-y2)
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())
d1 = abs(x2-x1)
d2 = abs(y2-y1)
x3 = x2 + d2
y3 = y2 + d1
x4 = x1 + d1
y4 = y1 + d2
print(x3 y3 x4 y4)


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


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


Verdicts: Runtime Error

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 ,y = c - a, d - b
print(a - y, b + x, c - y , c + x)

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

x ,y = c - a, d - b
print(c - y, d + x, a - y , b + 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())

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

print(x3, y3, x4, y4)


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

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

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()))

p1 = (int(n[0]) + int(n[1]) * 1j)
p2 = (int(n[2]) + int(n[3]) * 1j)

p3 = (p2 - p1) * 1j + p2
p4 = p3 + (p1 - p2)

print(p3.real, p3.imag, p4.real, p4.imag)


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

p1 = (n[0] + n[1]j)
p2 = (n[2] + n[3]j)

p3 = (p1 - p2) * j + p2
p4 = p3 + (p1 - p2)

print(real(p3),img(p3),real(p4)img(p4))

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

p1 = (int(n[0]) + int(n[1]) * 1j)
p2 = (int(n[2]) + int(n[3]) * 1j)

p3 = (p1 - p2) * 1j + p2
p4 = p3 + (p1 - p2)

print(p3.real, p3.imag, p4.real, p4.imag)

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

p1 = (int(n[0]) + int(n[1]) * 1j)
p2 = (int(n[2]) + int(n[3]) * 1j)

p3 = (p2 - p1) * 1j + p2
p4 = p3 + (p1 - p2)

print(int(p3.real9), int(p3.imag), int(p4.real), int(p4.imag))

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

p1 = (int(n[0]) + int(n[1]) * 1j)
p2 = (int(n[2]) + int(n[3]) * 1j)

p3 = (p2 - p1) * 1j + p2
p4 = p3 + (p1 - p2)

print(int(p3.real), int(p3.imag), int(p4.real), int(p4.imag))

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

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 = list(map(int,input().split()))
xdis = x2-x1
ydis = y2-y1
print(x2-ydis,y2+xdis,x1-xdis,y1+ydis)

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

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):
1,y1,x2,y2=[int(s) for s in input().split()]
(dx,dy)=(x2-x1,y2-y1)
print(x2-dy,y2+dx,x1-dy,y1+dx)

x1,y1,x2,y2=[int(s) for s in input().split()]
(dx,dy)=(x2-x1,y2-y1)
print(x2-dy,y2+dx,x1-dy,y1+dx)

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:
    y3=y1-abs(x2-x1)
else:
    y3=y1+abs(x2-x1)

if x2>x1:
    x3=x1+abs(y2-y1)
else:
    x3=x1-abs(y2-y1)

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

print(x3,y3,x4,y4)

x1,y1,x2,y2=map(int,input().split())
if y2>=y1 and x2>=x1:
    y3=y2+abs(x2-x1)
    x3=x2-abs(y2-y1)
elif y2>=y1 and x1>x2:
    x3=x2-abs(y2-y1)
    y3=y2-abs(x2-x1)
elif y1>y2 and x2>=x1:
    x3=x2+abs(y2-y1)
    y3=y2+abs(x2-x1)
elif y1>y2 and x1>x2:
    x3=x2+abs(y2-y1)
    y3=y2-abs(x2-x1)

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

print(x3,y3,x4,y4)

Verdicts: Wrong Answer

Accepted