TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdlib>
#include <iomanip>

#include <numeric>

#include <set>
#include <string>


using namespace std;

using ll = long long;
using P = pair<int, int>;




#define CLR(a, b) memset((a), (b), sizeof(a))
#define DUMP(x) cout << #x << " = " << (x) << endl;
#define INF 1001001001001001001ll
#define fcout cout << fixed << setprecision(12)

const int MOD = 1000000007;

// vector<vector<int>> data(3, vector<int>(4));

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);

  ll a, b, c, d;
  cin >> a >> b >> c >> d;

  ll ans = a * c;
  ans = max(ans, a * d);
  ans = max(ans, b * c);
  ans = max(ans, b * d);

  printf("%lld", ans);
}


a,b,c,d = map(int, input().split())
ans = a*c
ans = max(ans,a*d)
ans = max(ans,b*c)
ans = max(ans,b*d)
print(ans)

Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
a, b, c, d = map(int, input().split())
L = [a * c, a * d, b * c, b * d]
print(L)
print(max(L))

a, b, c, d = map(int, input().split())
L = [a * c, a * d, b * c, b * d]
print(max(L))

Verdicts: Wrong Answer

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

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

print(max(a*c, a*d, b*c, b*d))

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

print(max(a*c, a*d, b*c, b*d))


Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
a, b, c, d = [int(s) for s in input().split()]
return max(a * c, a * d, b *c, b * d)

a, b, c, d =[int(s) for s in input().split()]
print(max(a * c, a * d, b * c, b * d)

a, b, c, d =[int(s) for s in input().split()]
print(max(a * c, a * d, b * c, b * d))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
N = int(input())
INF = 10 ** 9
y_min_pos = [INF, []]
x_min_pos = [INF, []]
y_max_pos = [0, []]
x_max_pos = [0, []]
for _ in range(N):
    
    x, y = map(int, input().split())
    if y <= y_min_pos[0]:
        if y == y_min_pos[0]:
            y_min_pos[1].append(x)
        else:
            y_min_pos = [y, [x]]
    if y >= y_max_pos[0]:
        if y == y_max_pos[0]:
            y_max_pos[1].append(x)
        else:
            y_max_pos = [y, [x]]

    if x <= x_min_pos[0]:
        if x == x_min_pos[0]:
            x_min_pos[1].append(y)
        else:
            x_min_pos = [x, [y]]
    if x >= x_max_pos[0]:
        if x == x_max_pos[0]:
            x_max_pos[1].append(y)
        else:
            x_max_pos = [x, [y]]
# print(x_max_pos[1])
x_min_ymax = max(x_min_pos[1])
x_max_ymax = max(x_max_pos[1])
y_min_xmax = max(y_min_pos[1])
y_max_xmax = max(y_max_pos[1])
x_min_ymin = min(x_min_pos[1])
x_max_ymin = min(x_max_pos[1])
y_min_xmin = min(y_min_pos[1])
y_max_xmin = min(y_max_pos[1])

y_min_max = max(
    abs(y_min_xmax - x_min_pos[0]) + abs(y_min_pos[0] - x_min_ymax),
    abs(y_min_xmax - y_max_xmin) + abs(y_min_pos[0] - y_max_pos[0]),
    abs(y_min_xmin - x_max_pos[0]) + abs(y_min_pos[0] - x_max_ymax),
    abs(y_min_xmin - y_max_xmax) + abs(y_min_pos[0] - y_max_pos[0]),
)
y_max_max = max(
    abs(y_max_xmax - x_min_pos[0]) + abs(y_max_pos[0] - x_min_ymin),
    abs(y_max_xmax - y_min_xmin) + abs(y_max_pos[0] - y_min_pos[0]),
    abs(y_max_xmin - x_max_pos[0]) + abs(y_max_pos[0] - x_max_ymin),
    abs(y_max_xmin - y_max_xmax) + abs(y_max_pos[0] - y_min_pos[0]),
)
x_min_max = max(
    abs(x_min_ymax - y_min_pos[0]) + abs(x_min_pos[0] - y_min_xmax),
    abs(x_min_ymax - x_max_ymin) + abs(x_min_pos[0] - x_max_pos[0]),
    abs(x_min_ymin - y_max_pos[0]) + abs(x_min_pos[0] - y_max_xmax),
    abs(x_min_ymin - x_max_ymax) + abs(x_min_pos[0] - x_max_pos[0]),
)
x_max_max = max(
    abs(x_max_ymax - y_min_pos[0]) + abs(x_max_pos[0] - y_min_xmin),
    abs(x_max_ymax - x_min_ymin) + abs(x_max_pos[0] - x_min_pos[0]),
    abs(x_max_ymin - y_max_pos[0]) + abs(x_max_pos[0] - y_max_xmin),
    abs(x_max_ymin - x_min_ymax) + abs(x_max_pos[0] - x_min_pos[0]),
)
print(max(y_min_max, y_max_max, x_min_max, x_max_max))


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

print(max(a * c, a * d, b * c, b * d))


Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

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



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



Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

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

if b > 0 && d > 0:
  print(b * d)
elif b < 0 && d > 0:
  print(b * c)
elif b > 0 && d < 0:
  print(a * d)
else:
  print(a * c)

a, b, c, d = int(input()).split()
 
if b > 0 && d > 0:
  print(b * d)
elif b < 0 && d > 0:
  print(b * c)
elif b > 0 && d < 0:
  print(a * d)
elif a < 0 && c < 0:
  print(a * c)
else:
  print(0)

a, b, c, d = int(input()).split()
 
if b > 0 && d > 0:
  print(b * d)
elif b < 0 && d > 0:
  print(b * c)
elif b > 0 && d < 0:
  print(a * d)
elif b <= 0 && d <= 0:
  print(a * c)
else:
  print(0)

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

print(max(a*c,a*d,b*c,b*d))

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
nums = [int(x) for x in input().split()]

sign = [1] * 4
for x in range(4):
    if nums[x] < 0:
        sign[x] = 0

result = min(nums[0:2]) * min(nums[2:])

if sum(sign) == 1:
    result = max(a[0:2]) * max(a[2:])

if sum(sign) == 2:
    if (sign[0] == 1 and sign[1]) or (sign[2] == 1 and sign[3] == 1):
        if sign[0] == 1:
             result = max(nums[0:2]) * min(nums[2:])
        elif sign[2] == 0:
             result = min(nums[0:2]) * max(nums[2:])

print(result)


nums = [int(x) for x in input().split()]

sign = [0] * 4
for x in range(4):
    if nums[x] < 0:
        sign[x] = 1

result = min(nums[0:2]) * min(nums[2:])

if sum(sign) == 1 or sum(sign) == 0:
    result = max(nums[0:2]) * max(nums[2:])

if sum(sign) == 2:
    if (sign[0] == 1 and sign[1]) or (sign[2] == 1 and sign[3] == 1):
        if sign[0] == 1:
             result = max(nums[0:2]) * min(nums[2:])
        elif sign[2] == 1:
             result = min(nums[0:2]) * max(nums[2:])
    else:
        cur1 = nums[0] * nums[2]
        cur2 = nums[1] * nums[3]
        if abs(cur1) > abs(cur2):
            result = cur1
        else:
            result = cur2
print(result)


Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
a,b,c,d=int(input().split())
print(max(abs(a),abs(b))*max(abs(c),abs(d)))


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

a,b,c,d=int(input()).split()
print(max(abs(a),abs(b))*max(abs(c),abs(d)))

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


Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
def get_ints() :
  list(map(int,input().split()))

a,b,c,d=get_ints()
ans=max(a*c,b*c,a*d,b*d)
print(ans)

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

a,b,c,d=get_ints()
ans=max(a*c,b*c,a*d,b*d)
print(ans)


Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

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

a, b, c, d = map(int, input().split())
print(max([a*c, a*d, b*c, b*d]))

Verdicts: Wrong Answer

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
a,b,c,d=list(map(int, input("Enter a multiple value: ").split())) 
prod=[]

prod.append(a*c)
prod.append(a*d)
prod.append(b*c)
prod.append(b*d)

print(max(prod))

a,b,c,d=list(map(int, input("Enter a multiple value: ").split())) 
prod=[]

prod.append(a*c)
prod.append(a*d)
prod.append(b*c)
prod.append(b*d)

print(max(prod))

a,b,c,d=list(map(int, input().split())) 
prod=[]

prod.append(a*c)
prod.append(a*d)
prod.append(b*c)
prod.append(b*d)

print(max(prod))

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

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

a = li[0]
b = li[1]
c = li[2]
d = li[3]

print(a,b,c,d)

ac = a * c
bc = b * c
ad = a * d
bd = b * d
result = ac
if result < bc:
    result = bc
if result < ad:
    result = ad
if result < bd:
    result = bd
if a <= 0 and 0 <= b and result < 0:
    result = 0
if c <= 0 and 0 <= d and result < 0:
    result = 0
print(result)

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

a = li[0]
b = li[1]
c = li[2]
d = li[3]


ac = a * c
bc = b * c
ad = a * d
bd = b * d
result = ac
if result < bc:
    result = bc
if result < ad:
    result = ad
if result < bd:
    result = bd
if a <= 0 and 0 <= b and result < 0:
    result = 0
if c <= 0 and 0 <= d and result < 0:
    result = 0
print(result)


Verdicts: Wrong Answer

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
n = input()
m = n.split(" ")

x_min = int(m[0])
x_max = int(m[1])
y_min = int(m[2])
y_max = int(m[3])

a = x_min * y_min
b = x_min * y_max
c = x_max * y_min
d = x_max * y_max

if a > b and a > c and a > d:
  print(a)

elif b > a and b > c and b > d:
  print(b)

elif c > a and c > b and c > d:
  print(c)

elif d > a and d > b and d > c:
  print(d)

n = input()
m = n.split(" ")
 
x_min = int(m[0])
x_max = int(m[1])
y_min = int(m[2])
y_max = int(m[3])
 
a = x_min * y_min
b = x_min * y_max
c = x_max * y_min
d = x_max * y_max
 
if a >= b and a >= c and a >= d:
    print(a)
 
elif b >= a and b >= c and b >= d:
    print(b)
 
elif c >= a and c >= b and c >= d:
    print(c)
 
elif d >= a and d >= b and d >= c:
    print(d)

Verdicts: Wrong Answer

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

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

a, b, c, d = list(map(int, input().split()))
 
print(max(a*c,a*d,b*c,b*d))

Verdicts: Wrong Answer

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
a,b,c,d = map(int,input().split())
answer = 0
ac =a*c
ad = a*d
bc = b*C
bd = b*d
answer = max(ac,ad)
answer = max(answer,bc)
answer = max(answer,bd)
print(answer)

a,b,c,d = map(int,input().split())
answer = 0
ac =a*c
ad = a*d
bc = b*c
bd = b*d
answer = max(ac,ad)
answer = max(answer,bc)
answer = max(answer,bd)
print(answer)


Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
f = open("input.txt", "r")
a, b, c, d = list(map(int, f.readline().split()))

if b <= 0 and d <= 0:
    print(a*c)
elif b < 0 and d >= 0:
    print(max(c, 1)*b)
elif b >= 0 and d < 0:
    print(max(a, 1)*d)
else:
    print(b*d)

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

ans = []

if b <= 0 and d <= 0:
    ans.append(a*c)
if b < 0 and d >= 0:
    ans.append(max(c,1)*b)
if b >= 0 and d < 0:
    ans.append(max(a,1)*d)

ans.append(max(b*d, a*c))

print(max(ans))

Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
a,b,c,d=list(map(int,input().split()))
charo=[a*c,a*d,b*c,b*d]
print(max)

a,b,c,d=list(map(int,input().split()))
charo=[a*c,a*d,b*c,b*d]
print(max(charo))


Verdicts: Wrong Answer

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
a,b,c,d=[int(_) for _ in input().split()]
if a<0 or b<0 or c<0 or d<0:
    print(min(a,b)*max(c,d))
else:
    print(max(a,b)*max(c,d))
5 -4 8 -1

a,b,c,d=[int(_) for _ in input().split()]
ans=max(a*c,a*d,b*c,b*d)
print(ans)    
    

Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

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

if a < b:
    x = b
if a < b:
    x = a

if c < d:
    y = d
if c > d:
    y = c
print(x*y)

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

ri1 = [a,b]
ri2 = [c,d]
ma = -10**20

for i in range(2):
    for j in range(2):
        a = ri1[i]*ri2[j]
        if a > ma:
            ma = a
print(ma)

Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

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

list = []
list2 =[]

list.append(a)
list.append(b)
list2.append(c)
list2.append(d)

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

a,b,c,d = gets_ints()

ans = max(a*c, a*d, b*c, b*d)
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

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

A = a*c
B = a*d
C = b*c
D = b*d


max([A, B, C, D])

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

A = a*c
B = a*d
C = b*c
D = b*d


print(max([A, B, C, D]))

Verdicts: Wrong Answer

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
a,b,c,d=list(map(int, input().split()))
ac=a*c
ad=a*d
bc=b*c
cd=b*d
print(max([ac,ad,bc,bd]))

a,b,c,d=list(map(int, input().split()))
ac=a*c
ad=a*d
bc=b*c
bd=b*d
print(max([ac,ad,bc,bd]))

Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

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

_list_multi = [_list[0]*_list[2], _list[0]*_list[3], _list[1]*_list[2], _list[1]*_list[3]]
print(max(_list_multi))  

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

_list_multi = [_list[0]*_list[2], _list[0]*_list[3], _list[1]*_list[2], _list[1]*_list[3]]
print(max(_list_multi))  

Verdicts: Wrong Answer

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

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

if a >= 0 and d <= 0:
    if a == 0 or b == 0 or c == 0 or d == 0:
        ans = 0
    else:
        ans = a * d
elif b <= 0 and c >= 0:
    if a == 0 or b == 0 or c == 0 or d == 0:
        ans = 0
    else:
        ans = b * c
elif a >= 0 and c >= 0:
    ans = b * d
elif  b < 0 and d < 0:
    ans = a * c

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

ans = []

ans.append(a * c)
ans.append(b * c)
ans.append(a * d)
ans.append(b * d)

print(max(ans))

Verdicts: Wrong Answer

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

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

x=0
y=0
if b < 0:
  x=b
else:
  x=a

if d < 0:
  y=d
else:
  y=c

print(x*y)

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

l = [a*c,a*d,b*c,b*d]

print(max(l))

Verdicts: Wrong Answer

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
(X1,X2,Y1,Y2)=list(map(int,input().split()))
print (X1,X2,Y1,Y2)
ans=X2*Y2
ans=max(ans,X1*Y1)
ans=max(ans,X1*Y2)
ans=max(ans,X2*Y1)
print (ans)

(X1,X2,Y1,Y2)=list(map(int,input().split()))
ans=max(X2*Y2,X1*Y1,X1*Y2,X2*Y1)
print (ans)

Verdicts: Wrong Answer

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
a,b,c,d=int(input()),int(input()),int(input()),int(input())
x=range(a,b+1)
y=range(c,d+1)
i=0
J=0
list=[]
for i in x:
    for j in y:
        list.append(i*j)
        j=j+1
    i=i+1
print(max(list))


a,b,c,d=list(map(int,input().split()))
print(max([a*c,a*d,b*c,b*d]))


Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
a,b,c,d=map(int,input().split())
if a*b<=0 and c*d<=0:
    print(max(a*c,b*d))
elif: b>0 and d>0    
    print(b*d)
else:
    print(a*c)

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

Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
nums = [int(e) for e in input().split()]
a=nums[0]
b=nums[1]
c=nums[2]
d=nums[3]
i = 0
j = 0
max = a*c
if not a < 0 and c < 0:
    for i in range(a, b+1, 1):
        for j in range(c, d+1, 1):
            if max < i * j:
                max = i * j

print(max)

nums = [int(e) for e in input().split()]
a=nums[0]
b=nums[1]
c=nums[2]
d=nums[3]
max = a*c
if a * d > max:
    max = a * d
if b * c > max:
    max = b * c
if b * d > max:
    max = b * d

print(max)

Verdicts: Wrong Answer

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
n = int(input())

x = n*(n-1)*2*(10**(n-2))

print(x%(10**9 + 7))


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

n = [a*c, a*d, b*c, b*d]
print(max(n))

Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
array = list(map(int, input().strip().split()))
l = len(array)
list = []
if(l==4):
	ac=array[0]*array[2]
	ad=array[0]*array[3]
	bc=array[1]*array[2]
	bd=array[1]*array[3]

	list.append(ac)
	list.append(ad)
	list.append(bc)
	list.append(bd)

	print(list)

	print(max(list))

else:
  print("")
  


array = list(map(int, input().strip().split()))
l = len(array)
list = []
if(l==4):
	ac=array[0]*array[2]
	ad=array[0]*array[3]
	bc=array[1]*array[2]
	bd=array[1]*array[3]

	list.append(ac)
	list.append(ad)
	list.append(bc)
	list.append(bd)

	print(max(list))

else:
  print("")
  
  
  

Verdicts: Wrong Answer

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
a, b, c, d = input().split()
a=int(a)
b=int(b)
c=int(c)
d=int(d)
def m():
    if -10^9 <= a <= b <=10^9 and :-10^9 <= c <= d <=10^9
        if a>=0 and d<=0:
            max=a*d
            print(max)
        elif a>=0 and c>=0:
            max=b*d
            print(max)
        elif b<=0 and c>=0:
            max=b*c
            print(max)
        elif b<=0 and d<=0:
            max=a*c
            print(max)
        elif a<=0 and b>=0 and c<=0 and d>=0:
            if a*c>=b*d:
                max=a*c
                print(max)
            else:
                max=b*d
                print(max)
        elif a>=0 and c<=0 and d>=0:
            max=b*d
            print(max)
        elif b<=0 and c<=0 and d>=0:
            max=a*c
            print(max)
        elif a<=0 and b>=0 and c>=0:
            max=b*d
            print(max)
        

m()


a, b, c, d = input().split()
a=int(a)
b=int(b)
c=int(c)
d=int(d)
def m():
    if a>=0:and d<=0:
        max=a*d
        print(max)
    elif a>=0 and c>=0:
        max=b*d
        print(max)
    elif b<=0 and c>=0:
        max=b*c
        print(max)
    elif b<=0 and d<=0:
        max=a*c
        print(max)
        
m()


a, b, c, d = input().split()
a=int(a)
b=int(b)
c=int(c)
d=int(d)
def m():
    if a<=b and c<=d:
        max=a*b+c*d
        print(max)
    else:
        print("plese press again")
m()


a, b, c, d = input().split()
a=int(a)
b=int(b)
c=int(c)
d=int(d)
def m():
        if a>=0 and d<=0:
            max=a*d
            print(max)
        elif a>=0 and c>=0:
            max=b*d
            print(max)
        elif b<=0 and c>=0:
            max=b*c
            print(max)
        elif b<=0 and d<=0:
            max=a*c
            print(max)
        elif a<=0 and b>=0 and c<=0 and d>=0:
            if a*c>=b*d:
                max=a*c
                print(max)
            else:
                max=b*d
                print(max)
        elif a>=0 and c<=0 and d>=0:
            max=b*d
            print(max)
        elif b<=0 and c<=0 and d>=0:
            max=a*c
            print(max)
        elif a<=0 and b>=0 and c>=0:
            max=b*d
            print(max)
        elif a<=0 and b>=0 and d<=0:
            max=a*c
            print(max)

m()

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
a,b,c,d=map(int,input().split())
ans=[]
ans.append(a+c)
ans.append(a+d)
ans.append(b+c)
ans.append(b+d)
print(max(ans))

a,b,c,d=map(int,input().split())
ans=[]
ans.append(a*c)
ans.append(a*d)
ans.append(b*c)
ans.append(b*d)
print(max(ans))


Verdicts: Wrong Answer

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
if b > 0 and d > 0:
    print(max(b*d, a*c))
elif b > 0 and d < 0:
    print(a*d)
elif b < 0 and d > 0:
    print(b*c)
elif b <= 0 and d <= 0:
    print(a*c)

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

print(max(a*c, a*d, b*c, b*d))

Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

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


a, b, c, d = map(int, input().split())
ans = max(max(a*c, a*d), max(b*c, b*d))
print(ans)


Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

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

print(max( [a*c,a*d,b*c,b*d]  ))

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

print( max( [a*c,a*d,b*c,b*d] ))

Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
    import numpy as np
  	l = map(int, input().split())
    [a, b, c, d] = l
    [A, B, C, D] = np.abs(l)
    [ab, cd, abcd, bc, Bb, ac] = [a*b, c*d, a*b*c*d, b*c, B*b, a*c]
    if abcd>=0:
        if bc<0:
            if Bb<0:
                print(b*c)
            elif a<0:
                print(b*d)
            else:
                print(a*d)
        elif a>=0:
            print(b*d)
        else:
            print(a*c)
    elif Bb<0:
        print(a*c)
    elif bc<0:
        if ac<0:
            print(b*d)
        else:
            print(a*c)
    
    else:
        print(b*d)
    

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

nums = [a * c, a * d, b * c, b * d]

print(max(nums))


Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
a,b,c,d=map(int(),input().split())
maxa=a*c
e=a*d
f=b*c
g=b*d
h=max(maxa,e)
j=max(f,g)
if h>j:
  print(h)
else:
  print(j)

a,b,c,d=map(int(),input().split())
maxa=max(a*c,a*d,b*c,b*d)
print(maxa)

a,b,c,d=map(int,input().split())
maxa=max(a*c,a*d,b*c,b*d)
print(maxa)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

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

a += 1
c += 1

maxn = a*c

x = a*d
y = b*c
z = b*d

if maxn < x :
    maxn = x
if maxn < y :
    maxn = y
if maxn < z :
    maxn = z

print(maxn)

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

a += 1
c += 1

max = a*c

a*d = x
b*c = y
b*d = z

if max < x :
    max = x
if max < y :
    max = y
if max < z :
    max = z

print(max)

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

maxn = a*c

x = a*d
y = b*c
z = b*d

if maxn < x :
    maxn = x
if maxn < y :
    maxn = y
if maxn < z :
    maxn = z

print(maxn)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
a, b, c, d = map(int, input().split())
xmx = max([a, b])
xmin = min([a, b])
#xabsmx = max([a, b], key = abs)
#xabsmin = min([a, b],key = abs)
ymx = max([c, d])
ymin = min([c, d])
#yabsmx = max([c,d], key = abs)
#yabsmin = min([c, d],key = abs)
if xmin >= 0:#all X plus
    if ymx <= 0:
        print(xmin * ymx)
    else:
        print(xmx * ymx)

if xmx <= 0:
    if ymin >= 0:#all Y plus
        print(xmx * ymin)
    else:
        print(xmin * ymin)
else:#X plus and minas
    if ymx <= 0:
        print(xmin * ymx)
    else:
        print(xmx * ymx)

a, b, c, d = map(int, input().split)
xmx = max([a, b])
xmin = min([a, b])
#xabsmx = max([a, b], key = abs)
#xabsmin = min([a, b],key = abs)
ymx = max([c, d])
ymin = min([c, d])
#yabsmx = max([c,d], key = abs)
#yabsmin = min([c, d],key = abs)
if xmin >= 0:#all X plus
    if ymx <= 0:
        print(xmin * ymx)
    else:
        print(xmx * ymx)

if xmx <= 0:
    if ymin >= 0:#all Y plus
        print(xmx * ymin)
    else:
        print(xmin * ymin)
else:#X plus and minas
    if ymx <= 0:
        print(xmin * ymx)
    else:
        print(xmx * ymx)

a, b, c, d = map(int, input().split())
xmx = max([a, b])
xmin = min([a, b])
#xabsmx = max([a, b], key = abs)
#xabsmin = min([a, b],key = abs)
ymx = max([c, d])
ymin = min([c, d])
#yabsmx = max([c,d], key = abs)
#yabsmin = min([c, d],key = abs)
if xmin >= 0:#all X plus
    if ymx <= 0:
        print(xmin * ymx)
    else:
        print(xmx * ymx)

elif xmx <= 0:
    if ymin >= 0:#all Y plus
        print(xmx * ymin)
    else:
        print(xmin * ymin)
else:#X plus and minas
    if ymx <= 0:
        print(xmin * ymin)
    elif ymin >= 0:#all Y plus
        print(xmx * ymx)
    else:#Y plus and minas
        if xmx * ymx > xmin * ymin:
            print(xmx * ymx)
        else:
            print(xmin * ymin)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
a, b, c, d = map(int, open(0).read().split())
max_n = a*b
for x in [a, b, c, d]:
  for y in [a, b, c, d]:
    if max_n < x*y:
      max_n = x*y
print(max_n)

a, b, c, d = map(int, open(0).read().split())
print(max(a*c,a*d,b*c,b*d))

Verdicts: Wrong Answer

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
a,b,c,d=map(int,input().split())
m = list()
list.append(a*c)
list.append(a*d)
list.append(b*c)
list.append(b*d)
print(max(m))


a,b,c,d=map(int,input().split())
m = list()
m.append(a*c)
m.append(a*d)
m.append(b*c)
m.append(b*d)
print(max(m))


Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
a, b, c, d = [int(i) for i in input()]
print(max([a * d, a * c, b * c, b * d]))

a, b, c, d = [int(i) for i in input().split()]
print(max([a * d, a * c, b * c, b * d]))

Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
a,b,c,d = map(int, input().split())
l = []
l.append(a*c)
l.append(a*d)
l.append(b*c)
l.append(b*d)

l.sort()
print(l)
print(max(l))

a,b,c,d = map(int, input().split())
l = []
l.append(a*c)
l.append(a*d)
l.append(b*c)
l.append(b*d)

l.sort()
print(max(l))

Verdicts: Wrong Answer

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

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

print(max{X[0]*X[1], X[1]*X[2], X[2]*X[3], X[3]*X[0], X[0]*X[2],
         X[1]*X[3]})

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

print(max(X[1]*X[2], X[3]*X[0], X[0]*X[2],X[1]*X[3]))

Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

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

if 0 <= a:
    if 0 <= c:
        ans = a*d
    elif c < 0 < d:
        ans = b*d
    elif d <= 0:
        ans = a*d
        
elif a < 0 < b:
    if 0 <= c:
        ans = a*c
    elif c < 0 < d:
        ans = max([a*c, b*d])
    elif d <= 0:
        ans = a*c
        
elif b <= 0:
    if 0 <= c:
        ans = b*c
    elif c < 0 < d:
        ans = a*c
    elif d <= 0:
        ans = a*c
        
        
print(ans)

a, b, c, d = map(int, input().split())
ans = max(a*c, a*d, b*c, b*d)    
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
import itertool
a,b,c,d=int(input().split())
l=[a,b,c,d]
c=itertools.combinations(l,2)
ans=a*b
for i in c:
  if i[0]*i[1]>ans:
    ans=i[0]*i[1]
print(ans)

l=list(map(int, input().split()))
l1=[l[0],l[1]]
l2=[l[2],l[3]]
ans=l[0]*l[2]
for i in l1:
  for j in l2:
    if i*j>ans:
      ans=i*j
print(ans)


Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
a,b,c,d=map(int,input().split())
"""
if b<=0 and d<=0:
    print(a*c)
elif b<=0 and d>=0:
    print(a*d)
elif b>=0 and d<=0:
"""
A=abs(a)
B=abs(b)
C=abs(c)
D=abs(d)

check_1 = a*c
check_2=a*d
check_3=b*c
check_4=b*d

if check_1<=check_2:
    check_1=check_2

if check_3<=check_4:
    check_3=check_4

if check_1<=check_3:
    print(check_1)
else:
    print(check_2)


a,b,c,d=map(int,input().split())
"""
if b<=0 and d<=0:
    print(a*c)
elif b<=0 and d>=0:
    print(a*d)
elif b>=0 and d<=0:
"""
A=abs(a)
B=abs(b)
C=abs(c)
D=abs(d)

check_1 = a*c
check_2=a*d
check_3=b*c
check_4=b*d

if check_1<=check_2:
    check_1=check_2

if check_3<=check_4:
    check_3=check_4

if check_1<=check_3:
    print(check_3)
else:
    print(check_1)


Verdicts: Wrong Answer

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
a,b,c,d = map(int,input().split())
answer =0
if b < 0:
	if c < 0:
		answer = a*c
	if c>=0:
		answer = a * c
if b>=0:
	if a <0:
		answer = max(a*c ,b * d,0)
	if a >= 0:
		if d< 0:
			if a == 0:
				answer = 0
			elif:
				answer = a*d
		if d>=0:
			answer = b*d
print(answer)


a,b,c,d = map(int,input().split())
answer =0
if b < 0:
	if c < 0:
		answer = max(a*c,b*d)
	if c>=0:
		answer = max(a*c,b*d,b*c)
if b>=0:
	if a <0:
		answer = max(a*c ,b * d,0)
	if a >= 0:
		if d< 0:
			if a == 0:
				answer = 0
			else:
				answer = a*d
		if d>=0:
			answer = b*d
print(answer)


Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

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

input_line = input()
x = input_line.split()
a = x[0]
b = x[1]
c = x[2]
d = x[3]

xy1 = a*c
xy2 = a*d
xy3 = b*c
xy4 = b*d

print(max([xy1, xy2, xy3, xy4]))

a = input()
b = input()
c = input()
d = input()
 
xy1 = a*c
xy2 = a*d
xy3 = b*c
xy4 = b*d
 
print(max([xy1, xy2, xy3, xy4]))

a, b, c, d = input().split() 
xy1 = a*c
xy2 = a*d
xy3 = b*c
xy4 = b*d
 
print(max([xy1, xy2, xy3, xy4]))

a, b, c, d = input().split() 
a = int(a)
b = int(b)
c = int(c)
d = int(d)
xy1 = a*c
xy2 = a*d
xy3 = b*c
xy4 = b*d
 
print(max([xy1, xy2, xy3, xy4]))

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
values = [a*c, a*d, b*c, b*d]
print(max(values))

inputs = input().split(" ")
a = int(inputs[0])
b = int(inputs[1])
c = int(inputs[2])
d = int(inputs[3])

values = [a*c, a*d, b*c, b*d]
print(max(values))

Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

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

max([a * c, a * d, b * c, b * d])

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

print(max([a * c, a * d, b * c, b * d]))


Verdicts: Wrong Answer

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
x=input().rstrip.split(" ")
z=[]
for i in range(2):
	for y in range(2):
      z.append(x[i-2]*x[y-2])
print(max(z))

x=input().rstrip.split(" ")
z=[]
for i in range(2):
	z.append(x[i-2]*x[0])
    z.append(x[i-2]*x[1])
print(max(z))


x=input().split(" ")
z=[]
for i in range(2):
	z.append(int(x[i-2])*int(x[0]))
for i in range(2):
    z.append(int(x[i-2])*int(x[1]))
print(max(z))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

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

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

Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
a=int(input(''))
a=list(map(int,a))

b=(a[0])
c=(a[1])
d=(a[2])
e=(a[3])

f=b*d
g=b*e
h=c*d
i=c*e

if f>g:
  if h>f:
    if i>h:
      print(i)
    else:
      print(h)
  else:
    if i>f:
      print(i)
    else:
      print(f)
else:
  if h>g:
    if i>h:
      print(i)
    else:
      print(h)
  else:
    if i>g:
      print(i)
    else:
      print(g)

a=input('').split()
a=list(map(int,a))

b=(a[0])
c=(a[1])
d=(a[2])
e=(a[3])

f=b*d
g=b*e
h=c*d
i=c*e

if f>g:
  if h>f:
    if i>h:
      print(i)
    else:
      print(h)
  else:
    if i>f:
      print(i)
    else:
      print(f)
else:
  if h>g:
    if i>h:
      print(i)
    else:
      print(h)
  else:
    if i>g:
      print(i)
    else:
      print(g)


Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

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

results = []
for i in (0, 1):
  for j in (2, 3):
    results.append(inputs[i] * inputs[j])

print(max(results))


inputs = map(int, input().split())

results = []
for i in (0, 1):
  for j in (2, 3):
    reults.append(inputs[i] * inputs[j])

print(max(results))


inputs = [int(d) for d in input().split()]

results = []
for i in (0, 1):
  for j in (2, 3):
    results.append(inputs[i] * inputs[j])

print(max(results))


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vpii;
typedef vector<pll> vpl;
typedef vector<vi> vvi;
typedef vector<vll> vvll;

void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}
void __print(vector<bool> v) {bool first = true; cerr << "{"; for (int i = 0; i < static_cast<int>(v.size()); i++) {if (!first) {cerr << ", ";} first = false; __print(v[i]);} cerr << "}";}
template <size_t N>
void __print(bitset<N> bs) {string res = "<"; for (size_t i = 0; i < N; i++) {res += static_cast<char>('0' + bs[i]);} res += '>'; cerr << res;}
template<typename T>
void __print(const T &x) {int j = 0; cerr << "{"; for (auto &i: x) cerr << (j++ ? ", " : ""), __print(i); cerr << "}";}
template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << "("; __print(x.first); cerr << ", "; __print(x.second); cerr << ")";}
template <typename A, typename B, typename C>
void __print(const tuple<A, B, C> t) {cerr << "("; __print(get<0>(t)); cerr << ", "; __print(get<1>(t)); cerr << ", "; __print(get<2>(t)); cerr << ")";}
template <typename A, typename B, typename C, typename D>
void __print(const tuple<A, B, C, D> t) {cerr << "("; __print(get<0>(t)); cerr << ", "; __print(get<1>(t)); cerr << ", "; __print(get<2>(t)); cerr << ", "; __print(get<3>(t)); cerr << ")";}
void _print() {cerr << " ]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}

#ifndef ONLINE_JUDGE


#else


#endif

#define ALL(DS) (DS).begin(), (DS).end()


#define SZ(DS) (int)((DS).size())



#define folli(ITER, LO, UP) for (ll ITER = (ll)(LO); ITER < (ll)(UP); ++ITER)
#define iter(ITER, DS) for (auto &ITER: DS)

const int M = 1000000007;
const int INF = 1e9 + 5;

void init() {}

void solve() {
    int a, b, c, d; cin >> a >> b >> c >> d;
    
    cout << max({a*c, a*d, b*c, b*d}) << "\n";
}

int main() {
    ios::sync_with_stdio(0); cin.tie(0); cout.setf(ios::fixed); cout.precision(20);
    init();
    solve();
}



a, b, c, d = [int(x) for x in input().split()]
print(max(a*c, a*d, b*c, b*d))


Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
a,b,c,d = map(int,input().split())
print(max[a*c,a*d,b*c,b*d])

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


Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

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


for x in (a, b):
    for y in (c, d):
        ans = max(ans, x * y)

print(ans)

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

ans = -float("INF")  

for x in (a, b):
    for y in (c, d):
        ans = max(ans, x * y)

print(ans)

Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
n=int(input())
mod=10**9+7
dp=[0]*2001
dp[0]=1
sdp=[0]*2001
sdp[0]=1
for i in range(2000):
  dp[i+1]=sdp[i-2]
  sdp[i+1]=dp[i+1]+sdp[i]
print(dp[n]%mod)

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

e=a*c
f=a*d
g=b*c
h=b*d

print(max(e,f,g,h))

Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
a,b,c,d=map(int,input().split())
print(min([a*c,a*d,b*c,b*d]))

a,b,c,d=map(int,input().split())
print(max([a*c,a*d,b*c,b*d]))

Verdicts: Wrong Answer

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
a,b,c,d = int(input(),split())
ans = -float("inf")
xrange = range(a,b+1)
yrange = range(c,d+1)
for x in xrange:
  for y in yrange:
    if x*y > ans:
      ans = x*y

a,b,c,d = (int(x) for x in input().split())
ans = max(a*c,a*d,b*c,b*d)
print(ans)

Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

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

print(max(int(x)*int(y)))



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

print(max(a*c, a*d, b*c, b*d))


Verdicts: Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

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



a,b,c,d = map(int,input().split())
result=(a*c),(b*c),(a*d),(b*d)
print(max(result))



Verdicts: Wrong Answer

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

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

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

Verdicts: Wrong Answer

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
input_lines = input().split()
num_lines = []
a = int(input_lines[0])
b = int(input_lines[1])
c = int(input_lines[2])
d = int1(input_lines[3])

num_lines.append(a*c)
num_lines.append(a*d)
num_lines.append(b*c)
num_lines.append(b*d)

print(max(num_lines))

input_lines = input().split()
num_lines = []
a = int(input_lines[0])
b = int(input_lines[1])
c = int(input_lines[2])
d = int(input_lines[3])

num_lines.append(a*c)
num_lines.append(a*d)
num_lines.append(b*c)
num_lines.append(b*b)

print(max(num_lines))

input_lines = input().split()
num_lines = []
a = int(input_lines[0])
b = int(input_lines[1])
c = int(input_lines[2])
d = int(input_lines[3])

num_lines.append(a*c)
num_lines.append(a*d)
num_lines.append(b*c)
num_lines.append(b*d)

print(max(num_lines))

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
a=int(input())
b=int(input())
c=int(input())
d=int(input())
if b>=0:
  if d<0:
      ans=a*d
  else:
      ans=b*d
elif b<0:
  if d<0:
      ans=a*c
  else:
      ans=b*d
print(ans)

a=int(input())
b=int(input())
c=int(input())
d=int(input())
tmp=[a*c,a*d,b*c,b*d]
print(max(tmp))


a,b,c,d=map(int,input().split())
tmp=[a*c,a*d,b*c,b*d]
print(max(tmp))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

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

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

Verdicts: Wrong Answer

Accepted
Problem: Given are integers a,b,c and d. If x and y are integers and a \leq x \leq b and c\leq y \leq d hold, what is the maximum possible value of x \times y?

Submission attempts (in order):
listA=list(map(int,input().split()))
print(listA)
x_list = []
for i in [0,1]:
    x_list.append(listA[i])

y_list = []
for i in [2,3]:
    y_list.append(listA[i])

i_list = []
for x in x_list:
    for y in y_list:
        i_list.append(x*y)

print(max(i_list))

listA=list(map(int,input().split()))
x_list = []
for i in [0,1]:
    x_list.append(listA[i])

y_list = []
for i in [2,3]:
    y_list.append(listA[i])

i_list = []
for x in x_list:
    for y in y_list:
        i_list.append(x*y)

print(max(i_list))

Verdicts: Wrong Answer

Accepted