101210: [AtCoder]ABC121 A - White Cells

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

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

Input

题意翻译

白色正方形单元格有 $H$ 行和 $W$ 列。 您将选择 $h$ 行和 $w$ 列,并绘制这些行或列中包含的所有单元格。 剩下多少白色方格? 可以证明,此计数与选择的行和列无关。

加入题单

上一题 下一题 算法标签: