Problem:


Score : 100 points

Problem Statement

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.

Constraints

All values in input are integers.

1 \leq H, W \leq 20

1 \leq h \leq H

1 \leq w \leq W

Input

Input is given from Standard Input in the following format:

H W
h w

Output

Print the number of white cells that will remain.

Sample Input 1

3 2
2 1

Sample Output 1

1

There are 3 rows and 2 columns of cells. When two rows and one column are chosen and painted in black, there is always one white cell that remains.

Sample Input 2

5 5
2 3

Sample Output 2

6

Sample Input 3

2 4
2 4

Sample Output 3

0



Sample input:
3 2
2 1


Sample output:
1

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i=0;i<(int)(n);i++)
#define all(x)    (x).begin(),(x).end()
typedef long long ll;
const int MOD = (int)1e9 + 7;

int main(){
  int h,w;
  cin >>h>>w;
  int x,y;
  cin>>x>>y;
  cout<<(h-x)*(w-y)<<endl;
}

Submission status: Runtime Error

Solution code:
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()

Submission status: Runtime Error

Solution code:
def main():
    W, H = map(i,input().split())
    h, w = map(i,input().split())

    point = W * H

    delete_h = h * W
    delete_w = w * H

    kaburi = h * w

    ans = point - (delete_h + delete_w - kaburi)


if __name__ == '__main__':
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())
s = input()

print(s[:k-1] + s[k-1].lower() + s[k:n])

Submission status: Runtime Error

Solution code:
n = int(input())
 
l = []
for i in range(n):
    l.append(input())

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

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

print("Yes")

Submission status: Runtime Error

Solution code:
H,W=input().split()
h,w=input().split()

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

print(ans)

Submission status: Runtime Error

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

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

print(ans)

Submission status: Runtime Error

Solution code:
H, W = mat(int, input().split())
h, w = mat(int, input().split())
print((H-h)*(W-w))

Submission status: Runtime Error

Solution code:
W,H=map(int,input())
w,h=map(int,input())
print(W*H-(h*W+w*H-w*h))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <iostream>

int main(){
    int H, W, h, w;

    std::cin >> H >> W;
    std::cin >> h >> w;

    std::cout << (H - h) * (W - w) << std::endl;

    return 0;
}

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
using namespace std;
typedef long long unsigned int ll;

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

int main() {
	int H, W, h, w;
	cin >> H >> W;
	cin >> h >> w;
	cout << (H - h) * (W - w);
	return 0;
}

Submission status: Runtime Error

Solution code:
import numpy as np

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

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

Submission status: Runtime Error

Solution code:
# abc121_a
H, W = map(int, input().split())
h, w = map(int, input().split())
print((H-h)*(W-w)9

Submission status: Runtime Error

Solution code:
H, W = map(int, input())
h, w = map(int, input())

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

Submission status: Runtime Error

Solution code:
H, W = map(int, input())
h, w = map(int, input())

print((H-h) * (H-h))

Submission status: Runtime Error

Solution code:
n, m, c = map(int, input().split())
b_list = list(map(int, input().split()))
count = 0

for _ in range(n):
    a_list = list(map(int, input().split()))
    sum = c

    for i in range(m):
        sum += a_list[i] * b_list[i]

    if sum > 0:
        count += 1

print(count)

Submission status: Runtime Error

Solution code:

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

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

Submission status: Runtime Error

Solution code:
H,W,h,w = (int(i) for i in input().split())
print((H-W)*(h-w))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
H,W = map(int, input())
h,w = map(int, input())

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

Submission status: Runtime Error

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

A-a=m
B-b=n

print(int(m*n))

Submission status: Runtime Error

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

A-a=x
B-b=y

print(int(x*y))

Submission status: Runtime Error

Solution code:
a,b,c,d=int(input().split())
print((a-c)*(b-d))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n, m, c = map(int,input().split())
B = list(map(int,input().split()))
A = [input().split() for l in range(n)]
cnt = 0
for i in range(n):
    sum = 0
    for j in range(m):
        sum += int(A[i][j]) * B[j]
    if sum + c > 0:
        cnt += 1
print(cnt)

Submission status: Runtime Error

Solution code:
H, W = map(int, input(),split())
h, w = map(int, input(),split())
print((H-h)*(W-w))

Submission status: Runtime Error

Solution code:
N, M = map(int, input().split(" "))
stores = dict()
p = 10000000000

for i in range(N):
    if 1 in stores and stores[1] >= M:
      break
    Ai, Bi = map(int, input().split(" "))
    if Ai in stores:
        stores[Ai] += Bi
    else:
        stores[Ai] = Bi
    p = min(p, Ai)


price = 0
while True:
    if p in stores:
        if M <= stores[p]:
            price += p * M
            break
        else:
            price += p * stores[p]
            M -= stores[p]
    p += 1
print(price)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
ap(int,input().split())

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
 
min = min(A, B, C, D, E)
 
ans = 4 + int(N/min)
if N % min != 0:
    ans = ans + 1
print(ans)

Submission status: Runtime Error

Solution code:
a = list(map(int,inputr().split()))
b = list(map(int,inputr().split()))
print((a[0]-b[0])*(a[1]-b[1]))

Submission status: Runtime Error

Solution code:
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()))
    ssum = sum([A[i]*B[i] for i in range(M)])+C
    if ssum>0:
        ans+=1
print(ans)

Submission status: Runtime Error

Solution code:
in1 = input().split()
in2 = input().split()

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

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split)
print(a*b -a-b+1)

Submission status: Runtime Error

Solution code:
H, W =int(input().split())
h, w =int(input().split())
print((H-h)*(W-w))

Submission status: Runtime Error

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

print(H*W - h*w)

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
c,d = map(int,input().split())
print(a*b-c-d+cd)

Submission status: Runtime Error

Solution code:
N, M, C = list(map(int, input().split()))
B = list(map(int, input().split())
A = []
 
for i in range(N):
 A.append(list(map(int, input().split())
 
def main():
cnt = 0
for i in range(N):
 val = C
 for j in range(M):
  val += A[i][j] * B[j]
  if val > 0:
  cnt += 1
return cnt
print(main)

Submission status: Runtime Error

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

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

def main():
cnt = 0
for i in range(N):
val = C
for j in range(M):
 val += A[i][j] * B[j]
if val > 0:
cnt += 1
return cnt
print(main)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
listA = [] #appendのために宣言が必要
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)

Submission status: Runtime Error

Solution code:
H,W,h,w=map(int,open(0));print((H-h)*(W-w))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=list(map(int,input().split()))
b=list(map(int,input().split()))
print(a[0]-b[0])*(a[1]-b[1])

Submission status: Runtime Error

Solution code:
a=list(int(input().split()))
b=list(int(input().split()))
print(a[0]-b[0])*(a[1]-b[1])

Submission status: Runtime Error

Solution code:
a=list(int(input().split()))
b=list(int(input().split()))

s=(a[0]-b[0])*(a[0]-b[0])
print(s)

Submission status: Runtime Error

Solution code:
a=list(int(input(),split()))
b=list(int(input(),split()))

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

Submission status: Runtime Error

Solution code:
N, M, C = list(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):
    sum = 0
    for j in range(M):
        sum += A[i - 1][j - 1] * B[j - 1]
    if sum > - C:
        ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
int main(){
  int a,b,h,w;
  cin>>a>>b>>h>>w;
  cout<<(a-h)*(b-w)<<endl;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
H=input()
W=input()
h=input()
w=input()

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

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

Submission status: Runtime Error

Solution code:
H=input()
W=input()
h=input()
w=input()

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

print(HW-wH-hH-wh)

Submission status: Runtime Error

Solution code:
H,W = map(int, input().split(" "))
h,w = map(int, input().split(" "))
print{(H-h)*(W-w)}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
H,W=int(input()).split()
h,w=int(input()).split()
print((H-h)*(W-w))

Submission status: Runtime Error

Solution code:
HW = raw_input().split()
hw = raw_input().split()

printint(int(HW[0]) * int(HW[1]) - int(HW[0]) * int(hw[1]) - int(HW[1]) * int(hw[0]) + int(hw[0]) * int(hw[1]))

Submission status: Runtime Error

Solution code:
HW = raw_input().split()
hw = raw_input().split()

print HW[0] * HW[1] - hw[0] * HW[1] - hw[1] * HW[0] + hw[0] * hw[1]

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
H=input()
W=input()
h=input()
w=input()
print(H*W-h*W-w*H+h*w)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
H, W = map(list, input().split())
h, w = map(list, input().split())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
H = int(input())
W = int(input())
h = int(input())
w = int(input())
tate = H-h
yoko = W-w
print(tate*yoko)

Submission status: Runtime Error

Solution code:
H = input()
W = input()
h = input()
w = input()
tate = H-h
yoko = W-w
print(tate*yoko)

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
H,W = map(int,input().rstrip().split())
h,w = map(int,input().rstrip().split())
cells = [[1]*W]*H
cells = cells[h:]
cells = list(zip(*cells))
cells = cells[w:]
cells = list(zip(*cells))
print(int(sum(list(map(sum,[*cells])))))

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
H,W = map(int,input().rstrip().split())
h,w = map(int,input().rstrip().split())
cells = [[1]*W]*H
cells = cells[h:]
cells = list(zip(*cells))
cells = cells[w:]
cells = list(zip(*cells))
print(sum(list(map(sum,[*cells]))))

Submission status: Runtime Error

Solution code:
H,W = map(int,input().rstrip().split())
h,w = map(int,input().rstrip().split())
cells = [[1]*W]*H
cells = cells[h:]
cells = list(zip(*cells))
cells = cells[w:]
cells = list(zip(*cells))
print(sum(list(map(sum,[*cells]))))

Submission status: Runtime Error

Solution code:
H,W = map(int,input().rstrip().split())
h,w = map(int,input().rstrip().split())
cells = [[1]*W]*H
del cells[:h]
cells = list(zip(*cells))
del cells[:w]
cells = list(zip(*cells))
print(sum(list(map(sum,[*cells]))))

Submission status: Runtime Error

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())
cells = [[1]*W]*H
del cells[:h]
cells = list(zip(*cells))
del cells[:w]
cells = list(zip(*cells))
print(sum(list(map(sum,[*cells]))))

Submission status: Runtime Error

Solution code:
H,W = map(int,input().split())
h,w = map(int,input().split())
cells = [[1]*W]*H
print(cells)
del cells[:h]
print(cells)
cells = list(zip(*cells))
del cells[:w]
cells = list(zip(*cells))
print(sum(list(map(sum,[*cells]))))

Submission status: Runtime Error

Solution code:
H,W = int(input()),int(input())
h,w = int(input()),int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n, m = (int(i) for i in input().split())
a = [list(map(int,input().split())) for i in range(n)]
b = sorted(a)
cnt = 0
money = 0
while True:
	for x,y in b:
		cnt += y
		money += x * y
		if m < cnt:
			money -= (cnt - m)*x
			print(money)
			exit()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import numpy as np
H, W = map(int, raw_input().split())
h, w = map(int, raw_input().split())

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

Submission status: Runtime Error

Solution code:
H,W = map(int,input())
h,w = map(int,input())
print(int(H * W - h * w))

Submission status: Runtime Error

Solution code:
a,b=map(int,input())
c,d=map(int,input())
print((a-c)*(b-d))

Submission status: Runtime Error

Solution code:
N, M = map(int, input().split())
A, B = zip(*(map(int, input().split()) for _ in range(N)))
C = sorted(zip(A, B))
ans = 0
m = M
for a, b in C:
    if m >= b:
        ans += a * b
        m -= b
    else:
        ans += a * m
        break
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
H, W = [int(i) for input().split()]
bh, bw = [int(i) for input().split()]

res = (H * W) - ((bh*W) + (bh*H) - (bh*bw))

print(res)

Submission status: Runtime Error

Solution code:
H, W = list(map(int, input()))
h, w = list(map(int, input()))

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = list(map(int, input().split()))
b = list(map(int, input().split()))

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
print((H-h)*(W-w))

Submission status: Runtime Error

Solution code:
h_all, w_all = map(int, input().split)
h_b, w_b = map(int, input().split)

print((h_all - h_b) * (w_all - w_b))

Submission status: Runtime Error

Solution code:
#coding:utf-8

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

for s in [H,W,h,w]:
    s = int(s)
    print(type(s))

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

Submission status: Runtime Error

Solution code:
def main():
  H,W,h,w=int(input().split())
  all_cells=H*W
  black_hypo=H*w+h*W
  over=h*w
  result=all_cells-black_hypo+over
  print(result)
main()

Submission status: Runtime Error

Solution code:
#coding:utf-8

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

for s in [H,W,h,w]:
    int(s)

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

Submission status: Runtime Error

Solution code:
#coding:utf-8

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

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

Submission status: Runtime Error

Solution code:
all_cells=H*W
black_hypo=H*w+h*W
over=h*w
result=all_cells-black_hypo+over
print(result)

Submission status: Runtime Error

Solution code:
import numpy as np
def binary(_x):
    x = _x
    l = int(np.log2(x) + 1)
    res = [0] * l
    
    for i in range(l):
        res[i] += x%2
        x = int(x/2)
    return res


def a_xor(lis, i, sub, sub_max):
    return lis[i] * ( ( sub_max - sub + 1 ) % 2 )


def b_xor(lis, i, sub, sub_max):
    return lis[i] * ( ( sub_max - sub ) % 2 )


def main():
    A, B = map(int, input().split())
    bin_a = binary(A)
    bin_b = binary(B)
    odd_even_vec = [0] * len(bin_b)

    #print("a")
    sub = 0
    sub_max = 0
    for i, bit in enumerate(bin_a):
        if i == 0:
            odd_even_vec[i] += bit%2
        else:
            k = i-1
            sub += bit * 2**k
            sub_max += 2**k
            odd_even_vec[i] += a_xor(bin_a, i, sub, sub_max)
        #print(odd_even_vec, sub, sub_max)

    #print("b")
    sub = 0
    sub_max = 0
    for i, bit in enumerate(bin_b):
        if i == 0:
            odd_even_vec[i] += bit%2
        else:
            k = i-1
            sub += bit * 2**k
            sub_max += 2**k
            odd_even_vec[i] += b_xor(bin_b, i, sub, sub_max)
            
        #print(odd_even_vec, sub, sub_max)
        
    res = 0
    for i, bit in enumerate(odd_even_vec):
        res += bit%2 * 2**i

    print (res)

    
main()

Submission status: Runtime Error

Solution code:
K,w = [int(x) for x in input().split()]
h,w = [int(x) for x in input().split()]
print (K*W -(K-h)*(W-w))

Submission status: Runtime Error

Solution code:
import numpy as np

def main():
    N, M = map(int, input().split())

    AB= np.array([list(map(int, list(input().split()))) for _ in range(N)])
    print(AB)
    
    AB_sort_by_A = np.sort(AB.view('i8,i8'), order=['f0'], axis=0).view(np.int)

    print(AB_sort_by_A)
    buyNum = 0
    money = 0
    for i in range(N):
        if buyNum >= M:
            break
        else:
            drinkVal, drinkNum = AB_sort_by_A[i]
            if M - buyNum > drinkNum:
                buyNum += drinkNum
                money += drinkVal * drinkNum
            else:
                money += drinkVal * (M-buyNum)
                break
    print(money)
        
            
    

    
    
    
if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
import numpy as np

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

N, M, C = getInt()
B = list(getInt())
ans = 0
for i in range(N):
  A = list(getInt())
  if sum(a*b for a,b in zip(A,B)) + C > 0:
    ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
import numpy as np

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

N, M, C = getInt()
B = list(getInt())
ans = 0
for i in range(N):
  A = list(getInt())
  if sum([a*b for a,b in zip(A,B)]) + C > 0:
    ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
import numpy as np

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

N, M, C = getInt()
B = list(getInt())
ans = 0
for i in range(N):
  A = list(getInt())
  if sum([a*b for (a,b) in (A,B)]) + C > 0:
    ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
import numpy as np

def main():
    """
    N, M, C = np.array([int(x) for x in input().split(' ')])
    b_arr = np.array([int(x) for x in input().split(' ')])
    a_mat = np.zeros((N,M))
    """
    N ,M, C = map(int, input().split())
    b_arr = np.array(list(map(int, input().split())))
    a_mat = np.array( [ list(map(int, input().split())) for i in range(N) ] )
    
   # for i in range(N):
    #    a_mat[i] = np.array(list(map(int, input().split())))
        #a_mat[i] = np.array([int(x) for x in input().split(' ')])

        #print ( len(list( np.where( a_mat.dot(b_arr)> -C ) )[0]) )
    print ( np.array(np.where(a_mat.dot(b_arr) > -C)).shape[1] )

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import numpy as np

def main():
    """
    N, M, C = np.array([int(x) for x in input().split(' ')])
    b_arr = np.array([int(x) for x in input().split(' ')])
    a_mat = np.zeros((N,M))
    """
    N ,M, C = list(map(int, input().split()))
    b_arr = np.array(list(map(int, input().split())))
    a_mat = np.zeros((N,M))
    
    for i in range(N):
        a_mat[i] = np.array(list(map(int, input().split())))
        #a_mat[i] = np.array([int(x) for x in input().split(' ')])

        #print ( len(list( np.where( a_mat.dot(b_arr)> -C ) )[0]) )
    print ( np.array(np.where(a_mat.dot(b_arr) > -C)).shape[1] )

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import numpy as np

def main():
    N, M, C = np.array([int(x) for x in input().split(' ')])
    b_arr = np.array([int(x) for x in input().split(' ')])
    a_mat = np.zeros((N,M))

    for i in range(N):
        a_mat[i] = np.array([int(x) for x in input().split(' ')])

    #print ( len(list( np.where( a_mat.dot(b_arr)> -C ) )[0]) )        
    print ( np.array(np.where(a_mat.dot(b_arr) > -C)).shape[1] )

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import numpy as np

def main():
    N, M, C = np.array([int(x) for x in input().split(' ')])
    b_arr = np.array([int(x) for x in input().split(' ')])
    a_mat = np.zeros((N,M))

    for i in range(N):
        a_mat[i] = np.array([int(x) for x in input().split(' ')])

    print ( len(list( np.where( a_mat.dot(b_arr)> -C ) )[0]) )

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import numpy as np

def main():
    N, M, C = np.array([int(x) for x in input().split(' ')])
    b_arr = np.array([int(x) for x in input().split(' ')])
    a_mat = np.zeros((N,M))

    for i in range(N):
        a_mat[i] = np.array([int(x) for x in input.split(' ')])

    print ( len(list( np.where( a_mat.dot(b_arr)> -C ) )[0]) )

if __name__ == '__main__':
    main()

Submission status: Runtime Error

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

N, _, C = get_ints()
B = list(get_ints())

n = 0
for _ in range(N):
  A = list(get_ints())
  J = sum(a * b for a, b in zip(A, B)) + C
  if J > 0:
  	n += 1
    
print(n)

Submission status: Runtime Error

Solution code:
i = list()
for x in range(2):
  i.append(map(int,input().split()))
print(i[0][0]-i[1][0])*(i[0][1]-i[1][1])

Submission status: Runtime Error

Solution code:
i = list()
for x in range(2):
  i.append(map(int,input().split()))
return (i[0][0]-i[1][0])*(i[0][1]-i[1][1])

Submission status: Runtime Error

Solution code:
#B
count = 0
n,m,c = map(int, input().split())
b = list(map(int, input().split()))
for i in range(n):
    a = list(map(int, input().split()))
    ab=0
    for j in range(n):
        ab = a[j] * b[j]
    if -c<ab:
        count += 1
print(count)

Submission status: Runtime Error

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

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

print(white-black)

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
j=0
while b>=2**j:
    j+=1
k=1
l=[0 for i in range(j)]
bia=[0 for i in range(j)]
A=a
i=0
while A>2**(k-1):
    l[i]=A%(2**k)
    m=(l[i]-2**(k-1))
    if m<=0:
        bia[i]=0
    else:
        if m%2==1:
            bia[i]=1
        else:
            bia[i]=0
    k+=1
    i+=1
if (A//2)%2==0:
    bia[0]=0
else:
    bia[0]=1
k=1
l=[0 for i in range(j)]
bib=[0 for i in range(j)]
B=b+1
i=0
while B>2**(k-1):
    l[i]=B%(2**k)
    m=(l[i]-2**(k-1))
    if m<=0:
        bib[i]=0
    else:
        if m%2==1:
            bib[i]=1
        else:
            bib[i]=0
    k+=1
    i+=1
if (B//2)%2==0:
    bib[0]=0
else:
    bib[0]=1
ans=0
for i in range(j):
    if bia[i]==bib[i]:
        ans=ans
    else:
        ans+=2**i
print(ans)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
H=int(input())
W=int(input())
h=int(input())
w=int(input())

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

Submission status: Runtime Error

Solution code:
s=(H-h)*(W-w)
print(s)

Submission status: Runtime Error

Solution code:
int(input(H W h w))

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

Submission status: Runtime Error

Solution code:
int(input(H,W,h,w))

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