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()))
tmp=0
cnt=0
a_i=[]
for _ in range(n):
    a=list(map(int, input().split()))
    for i in range(m):
        tmp=0
        tmp+=int(a[i])*int(b[i])
    if tmp+c>0:
        cnt+=1
        
print(cnt)

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):
uh, uw = map(int, input().split())
h, w = map(int, input().split())
print(int((uh*uw) - (uh*h) - (uw*w) + (h*w)))

uh, uw = map(int, input().split())
h, w = map(int, input().split())
print((uh*uw) - (uh*h) - (uw*w) + (h*w))

uh,uw = map(int, input().split())
h, w = map(int, input().split())
print((uh-h)*(uw-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):
# abc121_a
H, W = map(int, input().split())
h, w = map(int, input().split())
print((H-h)*(W-w)9




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


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

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

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())
B = []
B.append(list(map(int, input().split())))
arrB = np.array(B)
#A = np.array()

#    A[i] = input()


#a = list()

#    a.append(map(int, input().split()))

#a = list(a)

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

arrA = np.array(A)

D = np.empty((0,M), int)
for i in range(N):
    D = np.append(D, arrB*arrA[i], axis=0)
#    C.append(arrB*arrA[i])


F = np.empty((0,N), int)
for i in range(N):
    F = np.append(F, np.sum(D[i]))

E = F + C
t=0
for i in range(N):
    if E[i]>0:
        t = t+1
    else:
        t =t




#print(arrA)
#print(D)
#print(E)
#print(F)
print(t)


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

A = h * W
B = H * w
print(A + B - h*w)


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

A = h * W
B = H * w

a = H * W - (A + B - h * w)
print(a)


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):
import numpy as np

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

table = np.array(np.ones((H, W)))
table[:h] = 0
table[:,:w] = 0
print(np.sum(table))

import numpy as np

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

table = np.array(np.ones((H, W)))
table[:h] = 0
table[:,:w] = 0
print(int(np.sum(table)))

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):
num_shops, target_drinks = map(int, input().split())
sell = {}

for _ in range(num_shops):
    a,b = map(int, input().split())

    try:
        sell[a] += b
    except:
        sell[a] = b

ans, bought = 0, 0

for price in sorted(sell):

    selling = sell[price]

    if bought + selling < target_drinks:
        ans += price * selling    
        bought += selling
    else:
        ans += price * (target_drinks - bought)
        break

print(ans)


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

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

tot = H * W

rows = h * W
cols = H * w
common = h * w

print(tot - rows - cols + common)

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

W,H=map(int,input().split())
w,h=map(int,input().split())
print((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):
a = list(map(int, input().split()))
b = list(map(int, input().split()))
H = a[0]
W = a[1]
h = b[0]
w = b[1]
k = H * h - W * w
print(k)

a = list(map(int, input().split()))
b = list(map(int, input().split()))
H = a[0]
W = a[1]
h = b[0]
w = b[1]
k = (H - h) * (W - w)
print(k)


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

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

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

print(H*W - W*h - 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):
A,B=map(int,input().split())
l=[]
ldi=[]
ans=""

a=A
while a<=B:
    l.append(format(a, 'b'))
    a+=1

i=0
while i<=B-A:
    ldi.append(l[i].zfill(len(format(B, 'b'))))
    i+=1

j=0
while j<=len(format(B, 'b'))-1:
    k=0
    p=0
    while k<=B-A:
        if ldi[k][j]=="1":
            p+=1
        else:
            pass
        k+=1
    if p%2==1:
        ans=ans+"1"
    else:
        ans=ans+"0"
    j+=1

print(int(ans, 2))

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):
import sys
import numpy as np
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))

n, m, c = rm()
b = np.array(rl())
cnt = 0
for _ in range(n):
  a = np.array(rl())
  if np.sum(a*b) > -c:
    cnt += 1
print(cnt)

import sys
rm = lambda: map(int, sys.stdin.buffer.readline().split())

a, b = rm()
c, d = rm()
print((c-a) * (d-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):
import sys

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


import sys

input = sys.stdin.readline
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):
def white_marker():
  line, row = map(int,input().split())
  line_marker, row_marker = map(int, input().split())
  line -= line_marker
  row -= row_marker
  
  return line * row

line, row = map(int,input().split())
line_marker, row_marker = map(int, input().split())
line -= line_marker
row -= row_marker
print(line * row)

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):
total_cost = 0

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

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

AB_list = sorted(AB_list)

for i in range(N):
    if AB_list[i][1]<M:
        M = M - AB_list[i][1]
        total_cost =  total_cost + AB_list[i][0] * AB_list[i][1]
    else:
        total_cost = total_cost + M * AB_list[i][0]
        break
print(total_cost)



total_cost = 0

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

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

AB_list.sort()

for i in range(N):
    if AB_list[i][1]<M:
        M = M - AB_list[i][1]
        total_cost =  total_cost + AB_list[i][0] * AB_list[i][1]
    else:
        total_cost = total_cost + M * AB_list[i][0]
        break
print(total_cost)


import scipy as sp

answer = 0
A, B = map(int, input().split()) 
for i in sp.arange(A, B+1):
    answer = answer ^ i
print(answer)


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

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

Verdicts: Runtime Error

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())
TOTAL = H * W
total = h * w
result = TOTAL - total
print(resurt)

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

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

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

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

h, w = [int(i) for i in input().split()]
_ = input()
 
print(h * w - (h + w - 1))

h, w = [int(i) for i in input().split()]
h1, w1 = [int(i) for i in input().split()]
 
print(h * w - (h * w1 + w * h1 - h1 * w1))

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

def even_odd(x, n):
    if n == 1:
        if x % 4 == 1 or x % 4 == 2:
            return 1
        else:
            return 0

    num = (x % (2 ** n)) - 2 ** (n - 1)
    if num < 0:
        return 0
    elif num % 2 == 0:
        return 1
    else:
        return 0

s = 0
for i in range(1, 40):
    if (even_odd(B, i) + even_odd(A-1, i)) % 2 == 1:
        s += 2 ** (i - 1)
print(s)

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):
tmp = input()
H = int(tmp.split()[0])
W = int(tmp.split()[1])

tmp = input()
h = int(tmp.split()[0])
w = int(tmp.split()[1])

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

tmp = input()
H = int(tmp.split()[0])
W = int(tmp.split()[1])   
tmp = input()
h = int(tmp.split()[0])
w = int(tmp.split()[1])
ans = H*W-W*h-H*w+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())

white = int(H * W)

white -= h * w

print(white)


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

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

print(white)


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

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

print(white)


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):
A,B  = map(int,input().split())
 
xor = A
for i in range(B-A):
    xor = xor ^ (A + i+1)
 
print(xor)

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

l = lsit(map(int, input().split(' ')))
s = lsit(map(int, input().split(' ')))

print(int((l[1]-s[1])*(l[0]-s[0])))


l = list(map(int, input().split(' ')))
s = list(map(int, input().split(' ')))

print(int((l[1]-s[1])*(l[0]-s[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):
def main():
    H, W = map(int, input())
    h, w = map(int, input())

    print(H*W - h*w)


if __name__ == "__main__":
    main()


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

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


if __name__ == "__main__":
    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):
s=[int(input()) for i in range(4)]

ans=s[1]*s[2]-s[2]*s[3]-s[1]*s[4]+s[3]*s[4]
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())
print((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
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-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):
matrix = list(map(int,input().split()))
shitei = list(map(int,input().split()))

masume = matrix[0]*matrix[1]
black = shitei[0]*matrix[1]+shitei[0]*(matrix[0]-shitei[0])
white = masume-black

print(white)

matrix = list(map(int,input().split()))
shitei = list(map(int,input().split()))

masume = matrix[0]*matrix[1]
black = shitei[0]*matrix[1]+shitei[1]*(matrix[0]-shitei[0])
white = masume-black

print(white)

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(x)for x in input().split()]
c,d=[int(x)for x in input().split()]
print(a*b-c*d)

a,b=[int(x)for x in input().split()]
c,d=[int(x)for x 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):
A,B = map(int,input().split())
a,b = map(int,input().split())

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


A,B = map(int,input().split())
a,b = map(int,input().split())
print((A-a)*(B-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):
import io, sys, atexit, os

import math as ma
from sys import exit
from decimal import Decimal as dec
from itertools import permutations


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


def num ():
	return map (int, input ().split ())


def nu ():
	return int (input ())


def find_gcd ( x, y ):
	while (y):
		x, y = y, x % y
	return x


mm = 1000000007



def solve ():
	t = 1
	for it in range (t):
		a,b=num()
		c,d=num()
		print(a*b-c*d)





if __name__ == "__main__":
	solve ()

import io, sys, atexit, os

import math as ma
from sys import exit
from decimal import Decimal as dec
from itertools import permutations


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


def num ():
	return map (int, input ().split ())


def nu ():
	return int (input ())


def find_gcd ( x, y ):
	while (y):
		x, y = y, x % y
	return x


mm = 1000000007



def solve ():
	t = 1
	for it in range (t):
		a,b=num()
		c,d=num()
		ff=c*b+a*d-(c*d)
		print(a*b-ff)





if __name__ == "__main__":
	solve ()

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*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,s=map(int,input().split())
f,g=map(int,input().split())
print(a*s-f*g)

a,s=map(int,input().split())
f,g=map(int,input().split())
print((a-f)*(s-g))

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

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

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

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

lst=input().split(" ")
H=int(lst[0])
W=int(lst[1])
lst=input().split(" ")
h=int(lst[0])
w=int(lst[1])

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

lst=input().split(" ")
H=int(lst[0])
W=int(lst[1])
lst=input().split(" ")
h=int(lst[0])
w=int(lst[1])

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-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):
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*b - (b*c + (a-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):
H,W = map(int, input())
h,w = map(int, input())

sum = H * w
cnt = W * h + w * (H - h)
print(sum - cnt)

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

sum = H * w
cnt = W * h + w * (H - h)
print(sum - cnt)

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

sum = H * W
cnt = (W * h) + (w * (H - h))
print(sum - cnt)

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):
math_line = list(map(int,input().split()))
input_line = list(map(int,input().split()))

area = math_line[0]*math_line[1]　

black_cell = math_line[0]*input_line[1] + math_line[1]*input_line[0] 
duplicate =  black_cell - input_line[0]*input_line[1]

white_cell = area - duplicate

print(white_cell)

math_line = list(map(int,input().split()))
input_line = list(map(int,input().split()))

area = math_line[0]*math_line[1]
black_cell = math_line[0]*input_line[1] + math_line[1]*input_line[0]
duplicate =  black_cell - input_line[0]*input_line[1]
white_cell = area - duplicate

print(white_cell)

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

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

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

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

Verdicts: 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())
a, b = map(int, input())

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


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

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

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

print(ans)

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

x = map(int, input().split())
print(2*x*3.14)

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

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

a,b = map(int,input().split())
c,d = map(int,input().split())
print(a*b+c*d-a*d-b*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):
HW = list(map(int, input().split()))
hw = list(map(int, input().split()))
 
H = HW[0]
W = HW[1]
 
h = hw[0]
w = hw[1]
 
if H >= W:
  print(H * W - (H * h + (W - h) * w))
else:
  print(H * W - (W * h + (H - h) * w))

HW = list(map(int, input().split()))
hw = list(map(int, input().split()))
 
H = HW[0]
W = HW[1]
 
h = hw[0]
w = hw[1]
 
print(H * W - (H * h + (W - h) * w))

HW = list(map(int, input().split()))
hw = list(map(int, input().split()))
 
H = HW[0]
W = HW[1]
 
h = hw[0]
w = hw[1]

if H <= W:
  print(H * W - (H * h + (W - h) * w))
else:
  print(H * W - (W * w + (H - w) * h))

HW = list(map(int, input().split()))
hw = list(map(int, input().split()))

H = HW[0]
W = HW[1]

h = hw[0]
w = hw[1]

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


N = int(input())
a = [input() for i in range(N)]
print(a)

HW = list(map(int, input().split()))
hw = list(map(int, input().split()))
H = HW[0]
W = HW[1]
h = hw[0]
w = hw[1]
r = H * W - (W * h + (H - h) * w)
print(r)

Verdicts: Wrong Answer

Wrong Answer

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):
n,m,c=map(int,input().split())
b=list(map(int,input().split()))
a=[list(map(int,input().split())) for k in range(n)]
 
count=0
 
for i in range(n):
  absum=0
  for j in range(m):
    absum +=a[i][j]*b[j]
   
  ans=absum+c
  if ans>0:
    count+=1
      
print(count)

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

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

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

print(s)

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-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-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):
import numpy as np
import sys

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)

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

print(remain)

import numpy as np
import sys

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

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

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

print(remain)

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


H, W = map(int, input().split())
h, w = map(int, input().split())
table = np.array([[0 for i in range(W)] for j in range(H)])
ans = 0
for i in range(h):
    table[i] += 1
for i in range(H):
    table[i][:w] += 1
    ans += sum(table[i])
print(table)
print((H*W)-(ans-(h*w)))


import numpy as np


H, W = map(int, input().split())
h, w = map(int, input().split())
table = np.array([[0 for i in range(W)] for j in range(H)])
ans = 0
for i in range(h):
    table[i] += 1
for i in range(H):
    table[i][:w] += 1
    ans += sum(table[i])
print((H*W)-(ans-(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(int((H*W)-(h*H+w*W - h*w)))

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

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

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

# Insert all the data into dictionary
stores = []
while 1:
	try:
		a, b = list(map(int, input().split()))
		stores.append([a,b])
	except:
		break

stores = sorted(stores, key=lambda x:x[0])

m = 0
money = 0

for store in stores:
	money += min(store[1], M - m) * store[0]
	if m == M:
		break
print(money)
        
print(stores)

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

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



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):
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.array([[int(x) for x in input().split()] for _ in range(N)])
 
print(np.sum(A.dot(B) > -C))

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

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

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):
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 19 17:00:19 2019

@author: Koki Yagihara
"""

H, W = map(int, input().split())
h, w = map(int, input().split())
s = 1
white = H*W
black = h + w - s
R = white - black
print("{}".format(R))

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

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

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

x, y = map(int, input().split("  "))
X, Y = map(int, input().split("  "))
ptint{(x-X)*(y-Y)}

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

x, y = map(int, input().split("  "))
X, y = map(int, input().split("  "))
ptint{(x-X)*(y-Y)}

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

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

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

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

N,M,C=map(int,(input()).split())
List_B=[int(i) for i in (input()).split()]
t=0
for j in range(1,N+1):
  List_A=[int(k) for k in (input()).split()]
  if sum([x*y for (x,y) in zip(List_A,List_B)])>-C:
    t+=1
print(t)


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())
plint((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 * 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):
'''A - White Cells
https://atcoder.jp/contests/abc121/tasks/abc121_a

>>> main([3, 2], [2, 1])
1
>>> main([5, 5], [2, 3])
6
>>> main([2, 4], [2, 4])
0'''


def main(amount, portion):
    print((amount[0] - portion[0]) * (amount[1] - portion[1]))


if __name__ == "__main__":
    amount = map(int, input().split(' '))
    portion = map(int, input().split(' '))

    main(amount, portion)


'''A - White Cells
https://atcoder.jp/contests/abc121/tasks/abc121_a

>>> main([3, 2], [2, 1])
1
>>> main([5, 5], [2, 3])
6
>>> main([2, 4], [2, 4])
0'''


def main(amount, portion):
    print((amount[0] - portion[0]) * (amount[1] - portion[1]))


if __name__ == "__main__":
    amount = list(map(int, input().split(' ')))
    portion = list(map(int, input().split(' ')))

    main(amount, portion)


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):
in1 = input().split()
in2 = input().split()

H = in1[0]
W = in1[1]

h = in2[0]
w = in2[1]

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


in1 = input().split()
in2 = input().split()

H = int(in1[0])
W = int(in1[1])

h = int(in2[0])
w = int(in2[1])

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):
from sys import stdin

H,W = [int(x) for x in stdin.readline().rstrip().split()]
h,w = [int(x) for x in stdin.readline().rstrip().split()]

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

from sys import stdin

H,W = [int(x) for x in stdin.readline().rstrip().split()]
h,w = [int(x) for x in stdin.readline().rstrip().split()]

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

Verdicts: Wrong Answer

Accepted