TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
N,M,C=map(int,input().split()) 
B=list(map(int,input().split()))
A =[list(map(int,input().split()))for i in range(N)]
ans=0
for i in range(N):
    X=0
    for j in range(M):
        X+=(A[i][j]*B[j])
    X=X+C
    if  0 < X:
        ans = ans+1
print(ans)
    


H,W=map(int,input().split())
h,w=map(int,input().split())
B=H*W-h*w
print(B)

N,M,C=map(int,input().split()) 
B=list(map(int,input().split()))
A =[list(map(int,input().split()))for i in range(N)]
ans=0
for i in range(N):
    X=0
    for j in range(M):
        X += A[i][j]*B[j]
    X=X+C
    if  0 < X:
        ans += 1
print(ans)

H, W = map(int, input().split())
h, w = map(int, input().split())

print((H-h)*(W-w))

Verdicts: Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H, W=int(HW[0]),int(HW[1])
h, w=int(hw[0]),int(hw[1])
ans=(W-w)*(H-h)
print(ans)

H, W=int(HW[0]),int(HW[1])
h, w=int(hw[0]),int(hw[1])
print((W-w)*(H-h))

H, W=map(int, input().split())
h, w=map(int, input().split())
ans=(W-w)*(H-h)
print(ans)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H,W=(int(x) for x in input().split())
h,w=(int(x) for x in input().split())

print((H*W)-(h*w))

H,W=(int(x) for x in input().split())
h,w=(int(x) for x in input().split())

print((H*W)+(h*w)-(H*w)-(h*W))

Verdicts: Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

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

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


Verdicts: Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

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

output = (a(0)-b(0))*(a(1)*b(1))
print output

n = int(input())
lines = [[int(i) for i in input().split()] for i in range(n)]
e = map(int, lines().split()) 
output =(e(0)-e(2))*(e(1)-e(3))
print output

H, W = map(int, input().split())
h, w = map(int, input().split())
output = (H-h)*(W-w)
print output

n = int(input())
e = [[int(i) for i in input().split()] for i in range(n)]
output =(e(0)-e(2))*(e(1)-e(3))
print output

H, W = map(int, input().split())
h, w = map(int, input().split())
output = (H-h)*(W-w)
print (output)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

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

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

Verdicts: Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H,W = map(int,input().split())
h,w = map(int,input().split())

print(H*W - (h*W + H*w - min(h,w)))

H,W = map(int,input().split())
h,w = map(int,input().split())
print((W-w)*(H-h))

Verdicts: Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

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

origin= S[0]*S[1]
deduction = (S[1]*s[0])+((S[1]-s[0])*s[1])

ans= origin - deduction
print(ans)

H,W = map(int, input().split())
h,w = map(int, input().split())

ans=(H*W)-(H*w)-(w*H-h*w)
print(ans)

H,W = map(int, input().split())
h,w = map(int, input().split())

ans=(H*W)-(h*W)-(w*H-h*w)
print(ans)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
N, M = map(int, input().split(" "))
A_list = []
B_list = []
total = 0

for i in range(N):
    A, B = map(int, input().split(" "))
    A_list.append(A)
    B_list.append(B)

z = list(zip(A_list, B_list))
z.sort()

for a, b in z:
    if b > M:
        total += M * a
        break
    else:
        total += b * a
        M -= b

print(total)

H, W = map(int, input().split(" "))
h, w = map(int, input().split(" "))

result = H * W - (h * W + w * (H - h))

print (result)

Verdicts: Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H, W = map(int, input())
h, w = map(int, input())

print((H-h)*(W-w))

H, W = map(int, input().split())
h, w = map(int, input().split())

print((H-h)*(W-w))

Verdicts: Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H,W = map(int,input().split())
h,w = map(int,input().split())

print(H*W - h*w)


H,W = int(input().split())
h,w = int(input().split())

print(H*W - h*w)

H,W = map(int,input().split())
h,w = map(int,input().split())

print((H-h) * (W-w))


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
import numpy as np


N, M = map(int, input().split())
A, B = list(), list()
for i in range(N):
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)
A = np.array(A)
B = np.array(B)

n_bins = 0
cost = 0
indices = np.argsort(A)
for idx in indices:
    print(idx, B[idx], A[idx] * B[idx])
    # enough bins @idx
    if n_bins + B[idx] > M:
        cost += A[idx] * (M - n_bins)
        break
    # buy all bins
    else:
        n_bins += B[idx]
        cost += A[idx] * B[idx]
print(cost)

import numpy as np


H, W = map(int, input().split())
h, w = map(int, input().split())
board = np.ones((H, W), dtype=int)
board[0:h] = 0
board[:, 0:w] = 0
print(board.sum())

Verdicts: Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
h, w = map(int,input().split())
h1, w1 = map(int,input().split())
print(h*w - (h + w - 1))

h, w = map(int,input().split())
h1, w1 = map(int,input().split())
print((h-h1)*(w-w1))

Verdicts: Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H,W = map(int, input().split(" "))
h,w = map(int, input().split(" "))

print(H*W-H*w-w*H+w*h)


H,W = map(int, input().split(" "))
h,w = map(int, input().split(" "))

print(H*W-H*w-W*h+w*h)


Verdicts: Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H, W = list(map(int, input().split()))
h, w = list(map(int, input().split()))

white = H*W
if h 
black = h*W + w*(H-h)

print(white-black)

H, W = list(map(int, input().split()))
h, w = list(map(int, input().split()))

white = H*W
black = h*W + (w-h)*H

print(white-black)

H, W = list(map(int, input().split()))
h, w = list(map(int, input().split()))

white = H*W
black = h*W + w*(H-h)

print(white-black)

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H W = map(int, input().split())
h w = map(int, input().split())
print((H-h)*(W-w))

H, W = map(int, input().split())
h, w = map(int, input().split())
print((H-h)*(W-w))

Verdicts: Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H,W = map(int, input().split())
h,w = map(int, input().split())
print(HW-hW-Hw+hw)

H,W = map(int, input().split())
h,w = map(int, input().split())
print(H*W-h*w)

H,W = map(int, input().split())
h,w = map(int, input().split())
print(H*W-h*W-H*w+h*w)


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H,W = map(int, input().split())
h,w = map(int, input().split())
print(H*w+h*W-h*w)

H,W = map(int, input().split())
h,w = map(int, input().split())
print(H*W-H*w-h*W+h*w)

Verdicts: Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
h, w = map(int,input().split())
x, y = map(int, input().split())
print(h*w - h*x - w*y + x*y)

h, w = map(int,input().split())
x, y = map(int, input().split())
print(h*w - h*y - w*x + x*y)

Verdicts: Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

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

print((H-h)*(W-w))

H, W = map(int, input().split())
h, w = map(int, input().split())

print((H-h)*(W-w))

Verdicts: Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
import numpy as np

N, M, C = map(int, input().split())
M=[int(x) for x in input().split()]
nlist=[]

for i in range(N):
    nlist.append([int(x) for x in input().split()])

nlist=np.array(nlist)
M= np.array(M)
ans=(nlist*M+C).sum(axis=1)
print((ans>0).sum())

H, W = map(int, input().split())
h, w = map(int, input().split())
print((H-h)*(W-w))
    

Verdicts: Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H,W=map(int,input().split())
h,w=map(int,input().split())
print(H*W-h*w)

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

Verdicts: Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H,W = map(int,input().split())
h,w = map(int,input().split())
tot = H*W 
print(tot - {(h*W)+(w*H)-(h*w)})

H,W = map(int,input().split())
h,w = map(int,input().split()) 
print(H*W - ((h*W)+(w*H)-(h*w)))


Verdicts: Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H, W = map(int, input().split())
h, w = map(int, input().split())

print(H*W-(H*h+W*w-h*w))

H, W = map(int, input().split())
h, w = map(int, input().split())

print(H*W-(H*w+W*h-h*w))


Verdicts: Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
import math
def I():
  return input()
def II():
  return int(input())
def MII():
  return map(int, input().split())
def LMII():
  return list(map(int, input().split()))
def P(s):
  return print(s)

import math
a, b , h, m = map(int, input().split())
xa = a * math.sin(h/6*math.pi)
ya = a * math.cos(h/6*math.pi)
xb = b * math.sin(m/30*math.pi)
yb = b * math.cos(m/30*math.pi)
print(math.sqrt((xa-xb)**2 + (ya-yb)**2))
a,b = MII()
h,w = MII()
print((a-h)*(b-w))

import math
def I():
  return input()
def II():
  return int(input())
def MII():
  return map(int, input().split())
def LMII():
  return list(map(int, input().split()))
def P(s):
  return print(s)

a,b = MII()
h,w=MII()
P((a-h)*(b-w))

Verdicts: Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H, W = map(int, input().split())
h, w = map(int, input().split())
res = H * W - h * w
print(res)

H, W = map(int, input().split())
h, w = map(int, input().split())
res = (H - h) * (W - w)
print(res)


Verdicts: Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

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

ba = B - A 
if A % 2 == 0:
	ja = "j0"
else:
	ja = "j1"

if B % 2 == 0:
	jb = "j0"
else:
	jb = "j1"

a = A
b = B
a2 = ""
b2 = ""

if a == 0:
	a2 = "0"
else:
	while True:
		if a % 2 == 0:
			a2 += "0"
		else:
			a2 += "1"
		a = int(a // 2)
		if a == 1:
			a2 += "1"
			break
if b == 0:
	b2 = "0"
else:
	while True:
		if b % 2 == 0:
			b2 += "0"
		else:
			b2 += "1"
		b = int(b // 2)
		if b == 1:
			b2 += "1"
			break

a2 += "0" * (len(b2) - len(a2))
c2 = 0

if a2[0] == "0":
	if ba % 4 == 2 or ba % 4 == 1:
		c2 += 1
	else:
		c2 += 0

if a2[0] == "1":
	if ba % 4 <= 1:
		c2 += 1
	else:
		c2 += 0

for i in range(1, len(a2)):
	n = 0
	if a2[i] == "1":
		if ja == "j1":
			n += 1

	if b2[i] == "1":
		if jb == "j0":
			n += 1

	if n % 2 == 0:
		c2 += 0
	else:
		c2 += 2 ** i

print(c2)


H, W = list(map(int, input().split()))
h, w = list(map(int, input().split()))
print((H - h) * (W - w))

Verdicts: Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H,W=map(int,input().split())
h,w=map(int,input().split())
a=H*W
print(a-H*h-(H-h)*w)

H,W=map(int,input().split())
h,w=map(int,input().split())
print(H*W-W*h-(H-h)*w)

Verdicts: Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H,W=map(int,input().split())
h,w–map(int,input().split())
print(H*W-H*w-h*W+h*w)

H,W=map(int,input().split())
h,w=map(int,input().split())
print(H*W-H*w-h*W+h*w)


Verdicts: Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H,W=map(int,input().split())
h,w=map(int,input().split())
print(H*W-H*w-W*h)

H,W=map(int,input().split())
h,w=map(int,input().split())
print((H-h)*(W-w))

Verdicts: Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
a=list(input().split())
b=list(input(),split())
c=int(a[0])
d=int(a[1])
e=int(b[0])
f=int(b[1])
g=c*d-d*e-c*f+e*f
print(g)

a=list(input().split())
b=list(input().split())
c=int(a[0])
d=int(a[1])
e=int(b[0])
f=int(b[1])
g=c*d-d*e-c*f+e*f
print(g)

Verdicts: Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H, W = map(int, input().split())
h, w = map(int, input().split())
print(h * W + H * w - h * w)

H, W = map(int, input().split())
h, w = map(int, input().split())
print(H * W - (h * W + H * w - h * w))

Verdicts: Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H,W=int(input())
h,w=int(input())
print((H-h)*(W-w))


s1 = list(map(int, input().split()))
s2 = list(map(int, input().split()))
print((s1[0]-s2[0])*(s1[1]-s2[1]))

Verdicts: Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
h1, w1 = list(map(int, input().split()))
h2, w2 = list(map(int, input().split()))
print((h1 - h2) * (w2 - w1))

h1, w1 = list(map(int, input().split()))
h2, w2 = list(map(int, input().split()))
print((h1 - h2) * (w1 - w2))

Verdicts: Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
N, M = map(int, input().split())
l1 = []
l2 = []
ans = 0
rest = M
for i in (N+1):
	l1[i],l2[i]  = map(int, input().split())

while true:
	min_index = l1.index(min(l1))
	ans += (min(l1) * l2[min_index])
	rest -= l2[min_index]
	if rest == 0:
		break
	l1.pop(min_index)

print(ans)

N, M = map(int, input().split())
#N = 1
#M = 1
l1 = []
l2 = []
ans = 0
rest = M
for i in range(N):
	temp1, temp2 = map(int, input().split())
	#temp1 = 1
	#temp2 = 1
	l1.append(temp1)
	l2.append(temp2)

while True:
	min_index = l1.index(min(l1))
	ans += (min(l1) * l2[min_index])
	rest -= l2[min_index]
	if rest <= 0:
		break
	l1.pop(min_index)

print(ans)

N, M, C = map(int, input().split())
B = []
A = []

B.append(map(int, input().split()))
for i in range(N):
	A.append(list(map(int, input().split())))


sum = 0
count = 0

for i in range(N):
	sum = 0
	for j in range(M):
		sum += A[i][j]
		sum += B[j]
	sum += C
	if sum > 0:
		count += 1

print(sum)

N, M = map(int, input().split())
X = []
for i in range(N):
	X.append(list(map(int, input().split())))

#Sorted by first element
X.sort(key=lambda x:x[0])
i = 0
total = 0
ans = 0

while i <= N-1:
	total += X[i][1]
	ans += X[i][0] * X[i][1]
	if total > M:
		ans -= X[i][0] * (total-M)
		break
	i += 1
print(ans)

H,W = map(int, input().split())
h,w = map(int, input().split())

total = H* W
ans = total - (H*h + W*w - h*w) 
print (ans)

H,W = map(int, input().split())
h,w = map(int, input().split())
ans = H * W - (h+w-1)
print (ans)

H,W = map(int, input().split())
h,w = map(int, input().split())

total = H* W
ans = total - (H*w + W*h - h*w) 
print (ans)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

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

print((HW[0] - hw[0])(HW[1] - hw[1]))

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

print((HW[0] - hw[0])*(HW[1] - hw[1]))

Verdicts: Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H, W = map(int, input().split())
h, w = map(int, input().split())

print(2*W+w*H-w*h)

H, W = map(int, input().split())
h, w = map(int, input().split())


print(H*W-(h*W+H*w-h*w))

Verdicts: Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

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

if a%2 == 0 and b%2 == 0:
    ans = b^((b-a)//2)%2
elif a%2 == 0 and b%2 != 0:
    ans = ((b-a+1)//2)%2
elif a%2 != 0 and b%2 == 0:
    ans = a^b^((b-1-a)//2)%2
else:
    ans = a^(b-a//2)%2

print(ans)

H,W = map(int,input().split())
h,w = map(int,input().split())

ans = (H-h)*(W-w)
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
ni = lambda: int(ns())
na = lambda: list(map(int, input().split()))
ns = lambda: input().rstrip()  # ignore trailing spaces
 
n, m = na()
ab = []
for i in range(n):
    ab.append(na())
ab.sort(key=lambda x: x[0])
 
rem = m
ans = 0
for v in ab:
    buy = min(rem, v[1])
    ans += buy * v[0]
    rem -= buy
print(ans)

H,W = map(int, input().split())
h,w = map(int, input().split())
print((H-h)*(W-w))

Verdicts: Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H, W = map(int, input().split())
h, w = map(int input().split())

s = (H - h) * (W - w)

print(s)

H, W = map(int, input().split())
h, w = map(int, input().split())

s = (H - h) * (W - w)

print(s)


Verdicts: Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H,W=map(int, input().split())
h,w=map(int, input().split())

print (H*W - H*h*w)

H,W=map(int, input().split())
h,w=map(int, input().split())

print ((H-h)*w + (W-w)*(h-1))

H,W=map(int, input().split())
h,w=map(int, input().split())

print (H*W - (h*w))

H,W=map(int, input().split())
h,w=map(int, input().split())

print (H*W - (H-h)*(W-w))

H,W=map(int, input().split())
h,w=map(int, input().split())

s = H * W 
b1 = h * W
b2 = w * (H - h)

print(s - b1 - b2)


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
x,y = input().split(),input().split()
h,w,hh,ww = x[0],x[1],y[0],y[1]
print((h - hh) * (w - ww))

import sys
x,y = input().split(),input().split()
h,w,hh,ww = x[0],x[1],y[0],y[1]
print((h - hh) * (w - ww))

x,y = input().split(),input().split()
h,w,hh,ww = int(x[0]),int(x[1]),int(y[0]),int(y[1])
print((h - hh) * (w - ww))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
HW = input().split()
hw = input().split
print((HW[0]-hw[0])*(HW[1]-hw[1]))

H, W = map(int, input().split())
h, w = map(int, input().split())
print((H-h)*(W-w))

Verdicts: Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
h, w = map(int, input().split())
y, x = map(int, input().split())

print(h * w - h * y - w * x + x * y)

h, w = map(int, input().split())
y, x = map(int, input().split())

print(h * w - h * x - w * y + x * y)

Verdicts: Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
l = input().split(" ")
s = input().split(" ")

H = int(l[0])
W = int(l[1])
h = int(s[0])
w = int(s[1])

print(HW-(wH + hW - wh))

l = input().split(" ")
s = input().split(" ")

H = int(l[0])
W = int(l[1])
h = int(s[0])
w = int(s[1])

print(H*W-(w*H + h*W - w*h))

Verdicts: Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
from functools import reduce
N, M, C = map(int, input().split())
B = map(int, input().split())
count = 0
for _ in range(N):
    if 0 < C + reduce(lambda p: p[0]*p[1], zip(map(int, input().split()), B)):
        count += 1
print(count)


H, W = map(int, input().split())
h, w = map(int, input().split())
print((H-h)*(W-w))


Verdicts: Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H,W=map(int,input().split())
h,w=map(int,input().split())
print(H*W-h*w)

H,W=map(int,input().split())
h,w=map(int,input().split())
print((H-h)*(W-w))

Verdicts: Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
import numpy as np

N, M, C = [int(x) for x in input().split()]
B = np.array([int(x) for x in input().split()])
A = np.empty((N,M))

count = 0
for n in range(N):
    A[n] = [int(m) for m in input().split()]
    count += (sum(A[n] * B)+C > 0)
print(count)


H, W = map(int, input().split())
h, w = map(int, input().split())

print(str(H * W - (h * W + w * H - h * w)))

Verdicts: Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H,W=map(int,input().split())
h,w=map(int,input().split())
print((H*W)-(h*w))

H,W=map(int,input().split())
h,w=map(int,input().split())
print((H*W)-((h*W)+(w*H))+(h*w))

Verdicts: Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H, W = map(int, input().split())
h, w = map(int, input().split())
print(H*W - (H - h)(W - w))

H, W = map(int, input().split())
h, w = map(int, input().split())
print(H*W - (H - h)*(W - w))

H,W = map(int, input().split())
h,w = map(int, input().split())
print((H-h)*(W-w))

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H,W=map(int.input().split())
h,w=map(int.input().split())

return H*W-h*W-w*H+h*w

H,W=map(int, input().split())
h,w=map(int, input().split())

H*W-h*W-w*H+h*w

p=[input().split() for i in range(2)]

(p[0][0]-p[1][0])*(p[0][1]-p[1][1])

H,W=map(int, input().split())
h,w=map(int, input().split())

return H*W-h*W-w*H+h*w

H,W=map(int, input().split())
h,w=map(int, input().split())

(H-h)*(W-w)

p=[list(map(int,input().split()) for i in range(2))]

(p[0][0]-p[1][0])*(p[0][1]-p[1][1])

p=[list(map(int,input().split())) for i in range(2)]

(p[0][0]-p[1][0])*(p[0][1]-p[1][1])

p=[list(map(int,input().split())) for i in range(2)]

print((p[0][0]-p[1][0])*(p[0][1]-p[1][1]))

Verdicts: Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H,W = map(int,input().rsplit().split())
h,w = map(int,input().rsplit().split())
print(H * W - h * w)

H,W = map(int,input().rstrip().split())
h,w = map(int,input().rstrip().split())
print(H * W - h * W - (H - h) * w)


Verdicts: Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H, W = map(int, input().split())
h, w = map(int, input().split())

ans = H*W - (H*h + W*w - h*w)

print(ans)

H, W = map(int, input().split())
h, w = map(int, input().split())

ans = H*W - (H*w + W*h - h*w)

print(ans)

Verdicts: Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H, W = map(int, input().split())
h, w = map(int, input().split())

print(h * W + H * w - h * w)

H, W = map(int, input().split())
h, w = map(int, input().split())

print(H * W - (h * W + H * w - h * w))

Verdicts: Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H, W = map(int,input().split())
h, w = map(int, input().split())

print(H*W-H*h-W*w+h*w)

H, W = map(int,input().split())
h, w = map(int, input().split())

print(H*W-H*w-W*h+h*w)

Verdicts: Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
HW=input()
hw=input()
HWlist=HW.split()
hwlist=hw.split()
print(HWlist)
print(hwlist)
H=int(HWlist[0])
W=int(HWlist[1])
h=int(hwlist[0])
w=int(hwlist[1])
print(H*W-h*W-H*w+h*w)

H, W = map(int, input().split())
a, b = map(int, input().split())
print(H*W-H*b-W*a+a*b)


Verdicts: Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H,W=map(int,input().split())
h,w=map(int,input().split())
print((H*W)-(h*w))

H,W=map(int,input().split())
h,w=map(int,input().split())
print((H-h)*(W-w))

Verdicts: Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

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

print(a*b - c*d)

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

print((a-c)*(b-d))

Verdicts: Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H, W = map(int, input().split()) 
h, w = map(int, input(.split()))
print((H-h) * (W - w))


H, W = map(int, input().split()) 
h, w = map(int, input().split())
print((H-h) * (W - w))

Verdicts: Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H, W = map(int, input().split())
h, w = map(int, input().split())
print((H-w) * (W-w))

H, W = map(int, input().split())
h, w = map(int, input().split())
print((H-h) * (W-w))

Verdicts: Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
"""White Cells"""
H,W=(int(i) for i in input().split())
h,w=(int(i) for i in input().split())
H*W-H*w-W*h+h*w

"""White Cells"""
H,W=(int(i) for i in input().split())
h,w=(int(i) for i in input().split())
print(H*W-H*w-W*h+h*w)

Verdicts: Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
print((H-h)*(W-w))

H,W=map(int, input().split())
h,w=map(int, input().split())
print((H-h)*(W-w))

Verdicts: Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H, W = map(int, input().split())
h, w = map(int, input().split())
print((H-w)*(W-w))

H, W = map(int, input().split())
h, w = map(int, input().split())
print((H-h)*(W-w))

Verdicts: Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

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

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

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

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


Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H,W=map(int,input().split())
h,w=map(int,input().split())
X=(H-h)*(W-w)
print(x)

H,W=map(int,input().split())
h,w=map(int,input().split())
X=(H-h)*(W-w)
print(X)

Verdicts: Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
a = input().split()
b = input().split()
c = a[0] * b[1]
d = a[1] * b[0]
print(a[0] * a[1] - (c + d - b[0] * b[1]))

a = int(input().split())
b = int(input().split())
c = a[0] * b[1]
d = a[1] * b[0]
print(a[0] * a[1] - (c + d - b[0] * b[1]))

a = input().split()
b = input().split()
a = list(map(int, a))
b = list(map(int, b))
c = a[0] * b[1]
d = a[1] * b[0]
print(a[0] * a[1] - (c + d - b[0] * b[1]))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
n = int(input())
 
l = []
for i in range(n):
    l.append(input())

if len(set(l)) != n :
    print("No")
    exit()

for i in range(n-1) :
    if l[i][-1] != l[i+1][0]:
        print("No")
        exit()

print("Yes")

hh, ww = map(int, input().split())
h, w = map(int, input().split())

print(int((hh-h)*(ww-w)))

Verdicts: Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

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

print((a * b) - (a * c) - (b * d) + (c * d))

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

print((a * b) - (a * d) - (b * c) + (c * d))

Verdicts: Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
HW_list =[list(map(int,input().split())) for i in range(2)]
print(HW_list[0][0]*HW_list[0][1]-HW_list[1][0]*HW_list[1][1])

HW =[list(map(int,input().split())) for i in range(2)]
print((HW[0][0]-HW[1][0])*(HW[0][1]-HW[1][1])

HW =[list(map(int,input().split())) for i in range(2)]
print((HW[0][0]-HW[1][0])*(HW[0][1]-HW[1][1]))

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H,W =map(int,input().split())
h,m =map(int,input().split())
print(H*W-h*W-w*H+h*W)

H,W =map(int,input().split())
h,w =map(int,input().split())
print(H*W-h*W-w*H+h*W)

H,W =map(int,input().split())
h,m =map(int,input().split())
print(H*W-h*W-w*H+h*W)

H,W =map(int,input().split())
h,m =map(int,input(),split())
print(H*W-h*W-w*H+h*W)


H,W =map(int,input().split())
h,w =map(int,input().split())
print(H*W-h*W-w*H+h*w)

Verdicts: Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
data = input().rstrip().split()
mat=[[1 for i in range(int(data[1]))] for j in range(int(data[0]))]
n = input().rstrip().split()
print(mat)
for i2 in range(int(n[0])):
  for k in range(int(data[1])):
    mat[i2][k]=0
print(mat)
for j2 in range(int(n[1])):
  for k in range(int(data[0])):
    mat[k][j2]=0
ans=0
for l in range(len(mat)):
  ans+=sum(mat[l])
print(ans)

data = input().rstrip().split()
mat=[[1 for i in range(int(data[1]))] for j in range(int(data[0]))]
n = input().rstrip().split()
#print(mat)
for i2 in range(int(n[0])):
  for k in range(int(data[1])):
    mat[i2][k]=0
#print(mat)
for j2 in range(int(n[1])):
  for k in range(int(data[0])):
    mat[k][j2]=0
ans=0
for l in range(len(mat)):
  ans+=sum(mat[l])
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: There are H rows and W columns of white square cells.  You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.  How many white cells will remain?  It can be proved that this count does not depend on what rows and columns are chosen.

Submission attempts (in order):
H, W = map(int, input().split())
h, w = map(int, input().split())
print(H * W * (h / H) * (w / W))

H, W = map(int, input().split())
h, w = map(int, input().split())
print((H-h) * (W-w))


Verdicts: Wrong Answer

Accepted