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):
H,W = map(int,input().split())
h,w = map(int,input().split())

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

print(A)


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

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

print(A)


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 = [int(x) for x in input().split()]
l = [list(map(int,input().split())) for _ in range(n)]
l.sort()
cost = 0
for x in range(n):
    if m == 0:
        exit()
    if l[x][1] <= m:
        cost += l[x][0]*l[x][1]
    else:
        cost += l[x][0]*m
    m -= l[x][1]
print(cost)

H,W = [int(x) for x in input().split()]
h,w = [int(x) for x in 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 - 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: 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=(H-h)*(W-w)
print(s)


int(input(H,W,h,w))

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


int(input(H W h w))

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


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

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


Verdicts: 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(int,input().split())
c,d=map(int,input().split())
print(a*b-c*d)

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):
N,M,C=map(int,input().split())
B=list(map(int,input().split()))
A=[list(map(int,input().split())) for _ in range(N)]
cnt=0
for a in A:
  ans=C
  for i in range(M):
    ans+=a[i]*B[i]
  if ans>0:
    cnt+=1
print(cnt)

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

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):
N, M, C = map(int, input().split())
B = list(map(int, input().split()))
A = [list(map(int, input().split())) for _ in range(N)]

cnt = 0

for a in A:
    
    if(sum([ta * tb for ta, tb in zip(a, B)]) + C > 0):
        cnt += 1

print(cnt)

h, w = map(int, input().split())
a, b = map(int, input().split())
print((h-a) * (w-b))

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 = [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-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):
H,W = map(int,input().split())
h,w = map(int,input().split())

total = H*W
line = (H - h) * W
print(total - line)

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

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

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):
import sys
input = sys.stdin.readline

def main():
    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 a:
        cnt = c
        for j in range(m):
            cnt += i[j] * b[j]
        
        if cnt > 0:
            ans += 1
    print(ans)

if __name__ == "__main__":
    main()

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):
N, M, C = list(map(int, input().split()))
b = list(map(int, input().split()))
count = 0

for i in range(N):
    a = list(map(int, input().split()))
    add = 0
    for j in range(M):
        add += a[j] * b[j]

    if add + C > 0:
        count += 1

print(count)


h, w = list(map(int, input().split()))
dh, dw = list(map(int, input().split()))

print((h-dh) * (w-dw))


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

a=H*W
b=h*w

print(a-b)



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

a=H*W
b=h*w

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

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

a=H*W
b=h*w

print(a+h*W+H*W-b)



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

a=H*W
b=h*w

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


Verdicts: 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):
H,W,h,w = (int(i) for i in input().split())
print((H-W)*(h-w))


H,W, = (int(i) for i in input().split())
h,w = (int(i) for i in 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*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: 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=map(int(input(),split())
x,y=map(int(input(),split())
a=(X-x)*(Y-y)
print(a)

X,Y=map(int,input().split())
x,y=map(int,input().split())
a=(X-x)*(Y-y)
print(a)

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,inout(),split())
h,w=map(int,inout().split())
all=H*W
black=h*w+H*w-h*w
white=all-black
purint(white)

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


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



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 = 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,w = map(int,input().split())
print(H*W-h*W-w*H+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):
A,B=map(int,input().split())
C,D=map(int,input().split())
print((A-1)*(B-1)-(C-1)*(D-1))

A,B=map(int,input().split())
C,D=map(int,input().split())
print(A*B-D*A-B*C+D*C)

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=int(input())
W=int(input())
h=int(input())
w=int(input())
print((H-h)*(W-w))

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

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*h-h*w)

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

print(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: 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):
from math import *
num_digit = lambda n: int(log2(n)+1)    
A, B = [int(s) for s in input().split()]

ret = 0
N = (B-A)+1
nd = num_digit(B)
for i in range(nd):
    nb = int(pow(2, i+1) if i>0 else pow(2, i+2))
    nr = N%nb
    s = sum([(A+j) >> i for j in range(nr)])
    ret += ((s%2) << i)
    
print(ret)

from math import log2
num_digit = lambda n: int(log2(n)+1)    

def to_digits(num, nd):
    rest = num
    ret = []
    for i in list(range(nd))[::-1]:
        d = pow(2, i)
        n = int(rest/d)
        rest = rest - d*n
        ret.append(n)
    return ret

def to_num(digits):
    nd = len(digits)
    ret = 0
    for dig, i in zip(digits, list(range(nd))[::-1]):
        d = int(pow(2, i))
        ret += dig*d
    return ret

def solve(A, B):
    nd = num_digit(B)
    digitss = [to_digits(n, nd) for n in range(A, B+1)]
    return to_num([digits.count(1) %2 for digits in zip(*digitss)])
  
A, B = [int(s) for s in input().split()]
print(solve(A, B))

H, W = [int(s) for s in input().split()]
h, w = [int(s) for s in input().split()]
print((H-h)*(W-w))

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):
H,W = input().split()
h, w = 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

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 - (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-W*h+min(w,h))

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

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

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):
H, W = input().split()
h, w = input().split()

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

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

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 = input().split(' ')
h, w = input().split(' ')
H = int(H)
W = int(W)
h = int(w)
w = int(w)

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

H, W = input().split(' ')
h, w = input().split(' ')
H = int(H)
W = int(W)
h = int(h)
w = int(w)
 
print(H*W - h*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 numpy as np
N,M,C = (int(j) for j in input().split())
B = [int(j) for j in input().split()]
list = [[0]* M]*N
for j in range(0,N):
        list[j] = [int(k) for k in input().split()]
count = 0
for j in range(0,N):
    if np.sum(np.array(list[j]) * np.array(B)) + C > 0:
        count = count + 1
print(count)

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

H,W = (int(j) for j in input().split())
h,w = (int(j) for j in 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):
N, M, C = map(int,input().split())

B = list(map(int,input().split()))
A = []

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

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

print(count)

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

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


N, M, C = map(int,input().split())

B = list(map(int,input().split()))
A = []

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

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

print(count)

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

sum = H*W
ans = sum - 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: 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):
# ABC121A

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


# ABC121A

H, W = map(int, input().split())
h, w = map(int, input().split())
#print(H*W-h*W-H*w+ h*w)
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):
n,m,c=map(int,input().split())
b=list(map(int,input().split()))
a=[list(map(int,input().split())) for d in range(n)]
ans=0
for i in range(n):
  C=c
  for j in range(m):
    C=C+a[i][j]*b[j]
    if C>0:
      ans=ans+1
print(ans)


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):
  C=c
  for j in range(m):
    C=C+a[i][j]*b[j]
    if C>0:
      ans=ans+1
print(ans)

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

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 = map(int,input().split())
h,w = map(int,input().split())

 print(max(H*W-h*W-(H-h)*w,0))

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

print(max(H*W-h*W-(H-h)*w,0))

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, h, w = (int(i) for i in input().split())

def whiecells(H, W, h, w):
	ans = H * W - (h*W + w*(H-h))
	return ans

print(ans)


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

def whiecells(H, W, h, w):
	ans = H * W -(h*W + w*(H-h))
	return ans

print(ans)


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

ans = H * W - (h*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=map(int,input().split())
h,w=map(int,input().split())

print(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: 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())
print((H-1)*(W-1))

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):
H,W,h,w=map(int,open(0).read().split())
print(W*h+H*w-h*w)

H,W,h,w=map(int,open(0).read().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):
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):
H,W = (int(i) for i in input().split())
h,w = (int(i) for i in input().split())

#calc
r = H-h
print((h*W)-(h*w))

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

#calc
r = H-h
print((r*W)-(r*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-w*(H-h))

H,W=map(int,input().split())
h,w=map(int,input().split())
print(H*W-h*W-w*(H-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):
# coding: utf-8
# Your code here!

N, M = (int(i) for i in input().split()) 
AB=[list(map(int,input().split())) for _ in range(N)]

AB.sort()


money = 0
for a, b in AB:

    # print(M) 
    if M==0:
        break
    elif b < M:
        # print(a*xb)
        money += a*b
        M -= b
    elif b >= M:
        # print(M)
        money += M*a
        M = 0
    # print(M, money)
print(money)
        

H, W = (int(i) for i in input().split())
h, w = (int(i) for i in 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):
a,b,c,d=map(int,input().split())
print (a*b-(b*c+a*d-c*d))

a=int(input())
b=int(input())
c=int(input())
d=int(input())
print (a*b-(b*c+a*d-c*d))

a=input()
b=input()
c=input()
d=input()

aa=int(a)
bb=int(b)
cc=int(c)
dd=int(d)
print (aa*bb-(bb*cc+aa*dd-cc*dd))

a=input()
b=input()
c=input()
d=input()

aa=int(a)
bb=int(b)
cc=int(c)
dd=int(d)
print (aa*bb-(bb*cc+aa*dd-cc*dd))

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

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):
import numpy as np
M=np.zeros((H,W))
H,W=[int(x) for x in input().split()]
h,w=[int(x) for x in input().split()]

for n in range(h):
    print
    M[n]=1
for m in range(w):
        M.T[m]=1
        
print(len(M[M==0]))

import numpy as np
M=np.zeros((H,W))
H,W=[int(x) for x in input().split()]
h,w=[int(x) for x in input().split()]

for n in range(h):
    print
    M[n]=1
for m in range(w):
        M.T[m]=1
        
len(M[M==0])

import numpy as np
H,W=[int(x) for x in input().split()]
h,w=[int(x) for x in input().split()]

M=np.zeros((H,W))

for n in range(h):
    print
    M[n]=1
for m in range(w):
        M.T[m]=1
        
print(len(M[M==0]))


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 = map(int,input().split())
h,w = map(int,input().split())
prin((H-h)*(W-w))

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

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

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

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

from sys import exit

def main():
  A, B = map(int, input().split(' '))
  values = range(A, B+1)
  # values = []

  # for n in N:
  #   values.append('{:043b}'.format(n))

  values = np.array(values)
  for i, value in enumerate(values):
    if i == 0:
      result = value
    else:
      result = np.bitwise_xor(result, value)
  print(int(result))
    
  # if len(values) == 1:
  #   print(int(values[0], 2))
  #   return

  # result = ''

  # if len(values) % 2 == 1:
  #   for n in range(43):
  
  #     for value in values:
  #       if value[n] == '0':
  

  
  #       result += '1'
  #     else:
  #       result += '0'

  # else:
  #   for n in range(43):
  

  #     for value in values:
  #       if value[n] == '0':
  

  
  #       result += '0'
  #     else:
  #       result += '1'
  # print(int(result, 2))
  
main()



def main():
  H, W = map(int, input().split(' '))
  h, w = map(int, input().split(' '))
  
  a = H*W
  b = (h * W) + (w * H) - h * w
  print(a - b)
  


main()

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

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 = list(map(int,input().split())
h1,w1 = list(map(int,input().split())

print((h-h1)*(w-w1))


h,w = list(map(int,input().split())
h1,w1 = list(map(intinput().split())

print((h-h1)*(w-w1))

h,w = list(map(int,input().split()))
h1,w1 = list(map(int,input().split()))

print((h-h1)*(w-w1))


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):
(a, b) = list(map(int, input().split()))
(c, d) = list(map(int, input().split()))

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

input1 = input().split()
input2 = input().split()

W = int(input1[0])
w = int(input2[0])
H = int(input1[1])
h = int(input2[1])

print(str((W-w)*(H-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):
H,W=map(int,input().split())
h,w=map(int,input().split())
ptint((H-h)*(W-w))

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

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

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):
A,B=map(int,input().split())
a,b=map(int,input().split())

A-a=x
B-b=y

print(int(x*y))

A,B=map(int,input().split())
a,b=map(int,input().split())

A-a=m
B-b=n

print(int(m*n))

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

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


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):
import sys
input = sys.stdin.readline
def print_ans(H, W, h, w):
    """Test Case
    >>> print_ans(3, 2, 2, 1)
    1
    >>> print_ans(5, 5, 2, 3)
    6
    >>> print_ans(2, 4, 2, 4)
    0
    """
    print((H - h) * (W  -w))


if __name__ == '__main__':
    H, W = map(int, input().rstrip().split())
    h, w = map(int, input().rstrip().split())
    print_ans(b)




import sys
input = sys.stdin.readline
def print_ans(H, W, h, w):
    """Test Case
    >>> print_ans(3, 2, 2, 1)
    1
    >>> print_ans(5, 5, 2, 3)
    6
    >>> print_ans(2, 4, 2, 4)
    0
    """
    print((H - h) * (W  -w))


if __name__ == '__main__':
    H, W = map(int, input().rstrip().split())
    h, w = map(int, input().rstrip().split())
    print_ans(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(str, input().split(' '))
h, w = map(str, 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

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, c = map(int, input().split())
b = list(map(int, input().split()))

count = 0
for i in range(0, n):
    a = list(map(int, input().split()))
    s = 0
    for j in range(0, m):
        s += a[j] * b[j]
    if s + c > 0:
        count += 1
print(count)


H, W, 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

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):
listA = [] 
while True:
    try:
        listA.append(list(map(int,input().split())))

    except:
        break;


field = []

for(int i = 0; i < listA[0][0]; i++)
    field.appnd([])
    
    for(int i = 0; i < listA[0][1]; i++)
        field[i].appnd(0)
        
for(int i = 0; i < listA[1][0]; i++)
    for(int j = 0; j < listA[1][1]; j++)
    field[i][j] = 1
    
cnt = 0
for item in field:
    for i in item:
        cnt++
        
print(cnt)

listA = [] 
while True:
    try:
        listA.append(list(map(int,input().split())))

    except:
        break;

H = listA[0][0]
W = listA[0][1]
h = listA[1][0]
w = listA[1][1]

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

print(ans)

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 - (W*h + 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+W*h-h*w)


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

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):
H, W = list(map(int, input()))
h, w = list(map(int, input()))

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

H, W = list(map(int, input().split()))
h, w = list(map(int, input().split()))
 
print(int((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):
input_lines = sys.stdin.read()

[H W] = input_lines[0].split()
[h w] = input_lines[1].split()

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

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

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


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=input()
h=input()
W=input()
w=input()
x=(int(H)-int(h))*(int(W)-int(w))

H=input()
h=input()
W=input()
w=input()
x=(int(H)-int(h))*(int(W)-int(w))
ptint(x)

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

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

H=input()
H=int(H)
h=input()
h=int(h)
W=input()
W=int(W)
w=input()
w=int(w)
print((H-h)*(W-w))

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

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

Verdicts: Runtime Error

Runtime Error

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

print((length-x) * (width-y))

length, width = input().split()
length, width = int(length),int(width)
x, y = input().split()
x,y = int(x),int(y)
 
print((length-x) * (width-y))

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

def xor(n):
  if n % 2 == 0:
    if int(n / 2) % 2 == 0:
      return n
    else:
      return n ^ 1
  else:
    if int((n - 1) / 2) & 2 == 0:
      return 0
    else:
      return 1

print(xor(A - 1) ^ xor(B))

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 = map(int, input().split())
num = B - A
result = (num // 2) % 2
if num % 2 == 1:
  result ^= (B-1) ^ B
else:
  result ^= B
print(result)

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

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

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

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

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

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

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

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


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

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


Verdicts: 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):
a = [int(i) for i in input().split()] 

b = a[1]*a[2] - (a[3]*a[2] + a[4]*(a[1]-1[3]))
print(b)

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


c = a[0]*a[1] - ( b[0]*a[1] + b[1]*(a[0]-b[0]) )
print(c)

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 = mat(int, input().split())
h, w = mat(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=(int,input().split())
h,w=(int,input().split())
S=H*W
print(S-(H*w+W*h)+w*h)



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


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


Verdicts: Runtime Error

Runtime Error

Accepted